> ## 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.

# Video Summary

> Generate an AI summary of a video's content asynchronously.

<Info>
  **Product**: Visual Intelligence — Video Task APIs (application layer)
  **Use case**: Pre-packaged video analysis tasks built on top of the Video Model APIs — fixed prompt + workflow, you just POST a video and get a structured result. For full control over prompt and model selection, see Video Model APIs.
  **Host**: `https://mavi-backend.memories.ai/serve/api/v2`
  **Auth**: `Authorization: sk-mavi-...` (no `Bearer` prefix)
</Info>

Generates a narrative summary of a video using Gemini — what the video is about, key events, people, and storyline. Processes the full video context in one pass.

<Warning>
  This is an **async endpoint**. You must configure a webhook URL in [Webhooks Settings](https://api-platform.memories.ai/webhooks) before calling this endpoint, otherwise you will not receive the processing results. See [Webhooks Configuration Guide](/visual-intelligence/getting-started/webhooks) for details.
</Warning>

<Note>
  **Pricing:**

  * Input tokens: \$0.45/1M tokens
  * Output tokens: \$3.75/1M tokens
</Note>

### Code Example

<CodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://mavi-backend.memories.ai/serve/api/v2/transcriptions/async-summary \
    --header 'Authorization: sk-mavi-...' \
    --header 'Content-Type: application/json' \
    --data '{
      "asset_id": "re_657929111888723968"
    }'
  ```

  ```javascript fetch theme={null}
  const BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2/transcriptions";
  const API_KEY = "sk-mavi-...";

  const response = await fetch(`${BASE_URL}/async-summary`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': API_KEY
    },
    body: JSON.stringify({
      asset_id: 're_657929111888723968'
    })
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2/transcriptions"
  API_KEY = "sk-mavi-..."
  HEADERS = {
      "Authorization": f"{API_KEY}"
  }

  def async_generate_summary(asset_id: str):
      url = f"{BASE_URL}/async-summary"
      data = {"asset_id": asset_id}
      resp = requests.post(url, json=data, headers=HEADERS)
      return resp.json()

  # Usage example
  result = async_generate_summary("re_657929111888723968")
  print(result)
  ```
</CodeGroup>

### Request Body

| Parameter | Type   | Required | Description                                           |
| --------- | ------ | -------- | ----------------------------------------------------- |
| asset\_id | string | Yes      | The unique identifier of the video asset to summarize |

### Response

Returns the summary generation task information.

<ResponseExample>
  ```json Response theme={null}
  {
    "code": 200,
    "msg": "success",
    "data": {
      "task_id": "ec2449885ba84c4f943a80ff0633158e"
    },
    "failed": false,
    "success": true
  }
  ```

  ```json Callback Response theme={null}
  {
    "code": 200,
    "message": "SUCCESS",
    "data": {
      "data": {
        "summary": "The video shows a young woman named Kiara, who is an Omega from the Blood Moon Pack. She is being hunted by Wendigos, creatures that are attracted to her. Her own pack considers her a jinx and treats her badly, especially her stepmother and stepsister, because they believe she brings the Wendigos to them.\n\nOne day, while being chased by a Wendigo, Kiara is rescued by Alejandro Rossi, the Alpha of the Ironclaw Pack. He takes her to his home, where she learns that he is the \"Alpha King\" who protects all the packs. Kiara is surprised because she had been told he was cold-hearted and ruthless.\n\nAlejandro keeps Kiara at his home to investigate why Wendigos are drawn to her. He discovers that she has a connection to the Moon Goddess, who tells Kiara that Alejandro is her destined mate and that their love will be tested.\n\nKiara and Alejandro develop a strong bond. He heals her wounds and helps her train to become a strong wolf. They also spend time together, going out for donuts, which Kiara had never had before.\n\nHowever, their relationship faces challenges. Alejandro has another mate, Jasmine, who is possessive and tries to hurt Kiara. The video ends with a cliffhanger, as Jasmine confronts Kiara and threatens her.",
        "usage": {
          "duration": 0.0,
          "model": "gemini-2.5-flash",
          "output_tokens": 264,
          "prompt_tokens": 215102
        }
      },
      "msg": "Video summary completed successfully",
      "success": true
    },
    "task_id": "67d848a979ae40ce927cfccf862e5e96"
  }
  ```
</ResponseExample>

### Response Parameters

| Parameter     | Type    | Description                                      |
| ------------- | ------- | ------------------------------------------------ |
| code          | string  | Response code indicating the result status       |
| msg           | string  | Response message describing the operation result |
| data          | object  | Response data object containing task information |
| data.task\_id | string  | Unique identifier of the summary generation task |
| success       | boolean | Indicates whether the operation was successful   |
| failed        | boolean | Indicates whether the operation failed           |

### Callback Response Parameters

When the summary generation is complete, a callback will be sent to your configured webhook URL.

| Parameter                      | Type    | Description                                                         |
| ------------------------------ | ------- | ------------------------------------------------------------------- |
| code                           | string  | Response code (200 indicates success)                               |
| message                        | string  | Status message (e.g., "SUCCESS")                                    |
| data                           | object  | Response data object containing the summary result and metadata     |
| data.data                      | object  | Inner data object containing summary and usage information          |
| data.data.summary              | string  | The generated summary text of the video content                     |
| data.data.usage                | object  | Usage statistics for the API call                                   |
| data.data.usage.duration       | number  | Processing duration in seconds                                      |
| data.data.usage.model          | string  | The AI model used for summary generation (e.g., "gemini-2.5-flash") |
| data.data.usage.output\_tokens | integer | Number of tokens in the generated summary                           |
| data.data.usage.prompt\_tokens | integer | Number of tokens in the input prompt                                |
| data.msg                       | string  | Detailed message about the operation result                         |
| data.success                   | boolean | Indicates whether the summary generation was successful             |
| task\_id                       | string  | The task ID associated with this summary generation request         |


## OpenAPI

````yaml POST /transcriptions/async-summary
openapi: 3.1.0
info:
  title: MAVI API Reference
  description: REST APIs for memory management, search, and entity operations
  version: v1.0.1
servers:
  - url: https://mavi-backend.memories.ai/serve/api/v2
security:
  - ApiKeyAuth: []
paths:
  /transcriptions/async-summary:
    post:
      summary: Async Generate Summary
      description: Generate transcription summary asynchronously.
      operationId: async_summary
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                asset_id:
                  type: string
                  description: The transcription asset ID
                  example: re_657929111888723968
              required:
                - asset_id
      responses:
        '200':
          description: Summary generation task information
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: 200
                    description: Response code indicating the result status
                  msg:
                    type: string
                    example: success
                    description: Response message describing the operation result
                  data:
                    type: object
                    properties:
                      task_id:
                        type: string
                        example: ec2449885ba84c4f943a80ff0633158e
                        description: Unique identifier of the summary generation task
                    description: Response data object containing task information
                  success:
                    type: boolean
                    example: true
                    description: Indicates whether the operation was successful
                  failed:
                    type: boolean
                    example: false
                    description: Indicates whether the operation failed
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````