> ## Documentation Index
> Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tải nội dung video MiniMax H3 xuống

> Tải tệp MP4 đã hoàn tất cho một tác vụ video MiniMax H3 thông qua đường dẫn nội dung hợp nhất.

Sử dụng endpoint này để tải tệp MP4 cho một tác vụ video MiniMax H3 đã hoàn tất.

## Trước khi tải xuống

* Tạo một tác vụ bằng [Tạo video MiniMax H3](./create).
* Thăm dò bằng [Truy xuất video MiniMax H3](./retrieve) cho đến khi `status` là `completed`.
* Truyền cùng một ID tác vụ vào endpoint này.

## Lưu trữ nội dung đa phương tiện đã hoàn tất

Nội dung phản hồi là dữ liệu `video/mp4` nhị phân. Hãy lưu các byte vào kho lưu trữ của riêng bạn khi ứng dụng cần quyền truy cập lâu dài vào nội dung đa phương tiện được tạo.


## OpenAPI

````yaml api/openapi/video/minimax-h3/get-retrieve-content.openapi.json GET /v1/videos/{task_id}/content
openapi: 3.1.0
info:
  title: MiniMax H3 Video Content API
  version: 1.0.0
  description: Download the completed MP4 file for a MiniMax H3 video task.
servers:
  - url: https://api.cometapi.com
security:
  - bearerAuth: []
paths:
  /v1/videos/{task_id}/content:
    get:
      summary: Download MiniMax H3 video content
      description: >-
        Download the generated MP4 file after a MiniMax H3 video task reaches
        completed status.
      operationId: minimax_h3_retrieve_video_content
      parameters:
        - name: task_id
          in: path
          required: true
          description: Task ID returned by POST /v1/videos.
          schema:
            type: string
          example: <task_id>
      responses:
        '200':
          description: Binary MP4 video content.
          content:
            video/mp4:
              schema:
                type: string
                format: binary
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          label: Download MP4
          source: |-
            curl "https://api.cometapi.com/v1/videos/<task_id>/content" \
              -H "Authorization: Bearer $COMETAPI_KEY" \
              --output minimax-h3.mp4
        - lang: Python
          label: Download MP4
          source: |
            import os
            from pathlib import Path

            import requests

            task_id = "<task_id>"
            response = requests.get(
                f"https://api.cometapi.com/v1/videos/{task_id}/content",
                headers={
                    "Authorization": "Bearer " + os.environ["COMETAPI_KEY"]
                },
                timeout=300,
            )
            response.raise_for_status()
            Path("minimax-h3.mp4").write_bytes(response.content)
        - lang: JavaScript
          label: Download MP4
          source: |
            import { writeFile } from "node:fs/promises";

            const taskId = "<task_id>";
            const response = await fetch(
              `https://api.cometapi.com/v1/videos/${taskId}/content`,
              { headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}` } },
            );

            if (!response.ok) {
              throw new Error(await response.text());
            }

            const video = new Uint8Array(await response.arrayBuffer());
            await writeFile("minimax-h3.mp4", video);
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer authentication. Use your CometAPI API key.

````