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

# 下载视频文件

> 在异步视频任务完成后下载最终视频文件内容。

当你需要直接获取媒体文件，而不是处理临时结果地址时，应使用此接口。



## OpenAPI

````yaml api-reference/zh-Hans/zmodelVideo/minimax/download-video-file.json GET /v1/videos/{task_id}/content
openapi: 3.0.1
info:
  title: 视频文件下载
  version: 1.0.0
  description: 异步视频成品下载文档。公开统一入口为 `/v1/videos/{task_id}/content`，用于在任务完成后直接获取最终视频文件。
  license:
    name: Project License
    url: https://github.com/QuantumNous/new-api/blob/main/LICENSE
servers:
  - url: https://api.powertokens.ai
    description: Baze API 服务地址
security: []
tags:
  - name: Hailuo Video
    description: Hailuo 视频文件下载
paths:
  /v1/videos/{task_id}/content:
    get:
      tags:
        - Hailuo Video
      summary: 视频文件下载
      description: |-
        在异步视频任务完成后下载最终视频文件内容。

        当你需要直接获取媒体文件，而不是处理临时结果地址时，应使用此接口。
      operationId: minimaxDownloadVideoFile
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
          description: 公开视频任务 ID。
      responses:
        '200':
          description: 下载成功，直接返回视频二进制流。
          content:
            video/mp4:
              schema:
                type: string
                format: binary
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          content:
            application/json:
              examples:
                task_not_ready:
                  summary: 任务未完成
                  value:
                    code: task_not_ready
                    message: 任务尚未完成，暂不可下载
                    data: null
          description: 任务尚未完成，暂不可下载。
        '401':
          content:
            application/json:
              examples:
                unauthorized:
                  summary: 未授权
                  value:
                    code: access_denied
                    message: 无效的令牌
                    data: null
          description: 鉴权失败，例如未提供令牌或令牌无效。
        '404':
          description: 任务不存在，或任务尚未生成可下载内容。
          content:
            application/json:
              examples:
                not_found:
                  summary: 任务不存在
                  value:
                    code: task_not_found
                    message: 任务不存在或已过期
                    data: null
        '429':
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: 额度不足或速率受限
                  value:
                    code: insufficient_user_quota
                    message: 当前账户额度不足，请稍后重试
                    data: null
          description: 触发速率限制或账户额度不足。
        '500':
          content:
            application/json:
              examples:
                internal_error:
                  summary: 内部处理失败
                  value:
                    code: gen_relay_info_failed
                    message: 服务内部处理失败，请稍后重试
                    data: null
          description: 服务端处理请求时发生内部错误。
        '502':
          content:
            application/json:
              examples:
                bad_gateway:
                  summary: 上游响应异常
                  value:
                    code: bad_response_status_code
                    message: 上游服务返回了无效响应
                    data: null
          description: 上游服务返回异常响应。
        '503':
          content:
            application/json:
              examples:
                service_unavailable:
                  summary: 服务暂不可用
                  value:
                    code: get_channel_failed
                    message: 当前模型暂时无可用渠道，请稍后重试
                    data: null
          description: 上游服务暂不可用，或当前模型暂无可用渠道。
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: '在请求头中传入 `Authorization: Bearer <token>`。'

````