> ## Documentation Index
> Fetch the complete documentation index at: https://api-tools.memories.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Stop Stream Video Understanding

> Stop an active live-stream understanding task.

<Info>
  **Product**: Visual Intelligence — Live Video Understanding
  **Use case**: Apply a custom AI prompt continuously to a live RTMP stream (e.g. captioning, activity recognition, custom monitoring), results to your callback every 5s
  **Mode**: Server-Pull (you give us an RTMP URL → we pull → results to your callback)
  **Host**: `https://stream.memories.ai`
  **Auth**: `Authorization: sk-mavi-...` (no `Bearer` prefix)
</Info>

Stop an active live-stream understanding task started via [Start Stream Video Understanding](/visual-intelligence/stream/video-stream-understanding-start). Once stopped, no further callbacks will be sent, and resources are released.

<Note>
  If the RTMP source stops on its own or was never reachable when `/streamConnect` was called, the task terminates automatically — you don't need to call this endpoint in that case.
</Note>

## Request Example

```python theme={null}
import requests

task_id = "5347085a-1747-4731-bdde-3856d09502c4"
url = f"https://stream.memories.ai/v1/understand/stop/{task_id}"
headers = {"Authorization": "sk-mavi-..."}

response = requests.post(url, headers=headers)
print(response.json())
```

## Stop Stream Response

```json theme={null}
{
  "status": 14,
  "task_id": "5347085a-1747-4731-bdde-3856d09502c4"
}
```

## Error Codes

| Code   | Meaning                                |
| ------ | -------------------------------------- |
| `-1`   | Invalid request or `task_id` not found |
| `5000` | Internal server error                  |


## OpenAPI

````yaml visual-intelligence/stream/understanding-openapi.json POST /v1/understand/stop/{task_id}
openapi: 3.0.0
info:
  title: Stream Video Understanding API
  version: 1.0.0
  description: Real-time AI analysis on live RTMP video streams using custom prompts.
servers:
  - url: https://stream.memories.ai
    description: Stream Understanding service
security: []
paths:
  /v1/understand/stop/{task_id}:
    post:
      tags:
        - Stream Understanding
      summary: Stop Stream Video Understanding
      description: Stop an active live-stream understanding task.
      operationId: stopStreamUnderstanding
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
          description: The task ID returned when starting the stream
          example: 5347085a-1747-4731-bdde-3856d09502c4
      responses:
        '200':
          description: Stream stopped successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 14
                  task_id:
                    type: string
                    example: 5347085a-1747-4731-bdde-3856d09502c4
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````