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

# 文生视频

> 视频生成 V2 接口，通过多模态 content 数组输入（文本 / 图片 / 视频 / 音频），支持文生视频、图生视频（首尾帧）、多模态参考生视频，2K 直出。



## OpenAPI

````yaml api-reference/zh-Hans/zmodelVideo/minimax/minimax-h3/text-to-video.json POST /minimax/v2/video_generation
openapi: 3.0.1
info:
  title: MiniMax API
  description: 创建视频生成任务。
  version: 1.0.0
servers:
  - url: https://baze-api.powerbuyin.top
security: []
paths:
  /minimax/v2/video_generation:
    post:
      summary: 文生视频 (t2va)
      description: >-
        视频生成 V2 接口，通过多模态 content 数组输入（文本 / 图片 / 视频 /
        音频），支持文生视频、图生视频（首尾帧）、多模态参考生视频，2K 直出。
      operationId: minimaxH3TextDrivenCreate
      parameters:
        - name: Content-Type
          in: header
          required: true
          description: 请求体的媒介类型，请设置为 `application/json`。
          schema:
            type: string
            enum:
              - application/json
            default: application/json
      requestBody:
        required: true
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoGenerationReq'
            examples:
              文生视频 (t2va):
                summary: 文生视频 (t2va)
                value:
                  model: MiniMax-H3
                  content:
                    - type: text
                      text: >-
                        史诗级太空歌剧院线预告：女舰长独自站在巨大观景窗前，最后一支舰队正在集结并跃迁离去，强光爆闪、舰桥震动，她被留在原地。
                  resolution: 2K
                  duration: 5
                  ratio: '16:9'
      responses:
        '200':
          description: |-
            创建成功后返回 task_id。使用该 task_id 调用查询任务接口获取任务状态与结果。

            查询任务成功响应示例
            ```json
            {
              "task": {
                "id": "424010985738629",
                "model": "MiniMax-H3",
                "status": "succeeded",
                "created_at": 1785125529,
                "updated_at": 1785125946,
                "content": {
                  "url": "https://your-cdn.example.com/h3-generated-2k-output.mp4"
                },
                "resolution": "2K",
                "duration": 5,
                "usage": {
                  "total_seconds": 5,
                  "input_seconds": 0,
                  "output_seconds": 5,
                  "input_image_count": 0
                },
                "ratio": "16:9",
                "task_type": "generation",
                "modality": "video"
              }
            }
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationResp'
              example:
                output:
                  task_id: '424010985738629'
      security:
        - bearerAuth: []
components:
  schemas:
    VideoGenerationReq:
      type: object
      required:
        - model
        - content
        - resolution
        - duration
      properties:
        model:
          type: string
          description: 模型名称。当前可用值：`MiniMax-H3`。
          enum:
            - MiniMax-H3
        content:
          type: array
          description: >-
            多模态输入内容数组，描述用于生成视频的信息。每个元素通过 type 区分类型（text / image_url / video_url
            / audio_url），并可通过 role 标注用途。


            每次请求必须包含一个非空 text 项（prompt 必填）；缺失会返回参数错误。

            支持的输入组合（对应不同生成场景）：


            文生视频：仅一个 text 元素。
          items:
            type: object
            required:
              - type
            properties:
              type:
                type: string
                description: 输入内容的类型。
                enum:
                  - text
              text:
                type: string
                description: >-
                  文本提示词（prompt），必填：所有场景都需包含一个非空 text，描述期望生成的视频。按字符数计算长度，单个 text
                  最多 7000 个字符。
        resolution:
          type: string
          description: 视频分辨率。当前可用值：768P、2K。
          enum:
            - 768P
            - 2K
        duration:
          type: integer
          description: 生成视频时长（秒），必选，整数。可用值：4~15。
          enum:
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
        ratio:
          type: string
          description: >-
            生成视频的宽高比，默认 adaptive（自动，由输入自适应选择最合适的宽高比，实际比例可在查询接口的 ratio 字段获取）。


            文生视频（t2va，content 仅含 text）：ratio 必填，且不能为 adaptive；可用值
            21:9、16:9、4:3、1:1、3:4、9:16。
          enum:
            - '21:9'
            - '16:9'
            - '4:3'
            - '1:1'
            - '3:4'
            - '9:16'
        callback_url:
          type: string
          description: >-
            任务状态变更的回调通知地址。配置后 MiniMax 服务器会先发送含 challenge 字段的验证请求（需 3 秒内原样返回
            challenge 完成验证），验证成功后每当任务状态变更即向该地址 POST 推送，推送体结构与查询任务接口的响应一致。


            回调 status
            取值：queued（排队中）、running（运行中）、succeeded（成功）、failed（失败）、cancelled（已取消）。
        aigc_watermark:
          type: boolean
          description: 是否在生成视频中添加 AIGC 标识水印，默认 false。
    VideoGenerationResp:
      type: object
      properties:
        task_id:
          type: string
          description: 任务 ID，用于后续查询任务状态与结果。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: '在请求头中传入 `Authorization: Bearer <token>`。'

````