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

# 创建视频再生成任务

> 对符合 MiniMax-H3 768P 输出规格的源视频进行再生成，输出 2K 视频。

<Warning>
  本接口仅支持对符合 MiniMax-H3 768P 输出规格的生成视频进行再生成并输出 2K，不支持任意视频的通用超分处理。
</Warning>

<Note>
  再生成任务的 `task_type` 为 `regeneration`，可通过 H3 共用的[查询任务](/docs/api-reference/video-generation-v2-query)、[查询任务列表](/docs/api-reference/video-generation-v2-list)和[取消或删除任务](/docs/api-reference/video-generation-v2-delete)接口管理。
</Note>


## OpenAPI

````yaml api-reference/video/generation/api/v2-video-generation.json POST /v2/video_regeneration
openapi: 3.1.0
info:
  title: MiniMax API
  description: MiniMax video generation V2 (Hailuo-03) API
  license:
    name: MIT
  version: 2.0.0
servers:
  - url: https://api.minimaxi.com
security:
  - bearerAuth: []
paths:
  /v2/video_regeneration:
    post:
      tags:
        - Video V2
      summary: 创建视频再生成任务
      description: >-
        对符合 MiniMax-H3 768P 输出规格的源视频进行再生成，输出 2K 视频。`content` 必须且只能包含一个
        `type=video_url`、`role=base_video` 的源视频项；其中，**`text` 必须使用生成该 768P
        源视频时实际送入模型的最终 prompt，不可使用 H3-Context-IR 处理前的原始 prompt**。本接口为异步接口，创建成功后返回
        `task_id`，需通过[查询任务](/api-reference/video-generation-v2-query)接口轮询状态，任务成功后获取再生成视频。


        查询、列表以及取消或删除均复用 H3 共享任务接口；再生成任务的 `task_type` 为
        `regeneration`。当前支持模型：`MiniMax-H3`。
      operationId: videoRegenerationV2Create
      parameters:
        - name: Content-Type
          in: header
          required: true
          description: 请求体的媒介类型,请设置为 `application/json`。
          schema:
            type: string
            enum:
              - application/json
            default: application/json
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoRegenerationReq'
            examples:
              文生视频 (t2va):
                value:
                  model: MiniMax-H3
                  content:
                    - type: text
                      text: >-
                        史诗级太空歌剧院线预告：女舰长独自站在巨大观景窗前，最后一支舰队正在集结并跃迁离去，强光爆闪、舰桥震动，她被留在原地。
                    - type: video_url
                      video_url:
                        url: https://your-cdn.example.com/h3-t2va-768p.mp4
                      role: base_video
                  resolution: 2K
              图生视频 (i2va):
                value:
                  model: MiniMax-H3
                  content:
                    - type: text
                      text: >-
                        Pull focus to the people in the background and add more
                        steam to the ramen bowl.
                    - type: image_url
                      image_url:
                        url: >-
                          https://cdn.hailuoai.com/prod/hailuo_demo/testsets/H3_AA_I2VA/gallery/sr_v17_variants_seed42_43_20260724/inputs/4a3a90bf9100_KDmcbkhzYo5sjjxr9FqcVmWVnzb.png
                      role: first_frame
                    - type: video_url
                      video_url:
                        url: https://your-cdn.example.com/h3-i2va-768p.mp4
                      role: base_video
                  resolution: 2K
              多模态参考生视频 (r2va):
                value:
                  model: MiniMax-H3
                  content:
                    - type: text
                      text: >-
                        角色说话：Follow the wind, live free. Leave worries behind,
                        enjoy the moment，音色参考音频1
                    - type: video_url
                      video_url:
                        url: >-
                          https://cdn.hailuoai.com/prod/hailuo_demo/testsets/h3_promo_eval_ref2va/gallery/sr_v2p26_trio_seed42_20260724/inputs/297573323635_00_%E8%A7%86%E9%A2%911_YnyRbxEwio_video_20260525_163755_1927e9d3.mp4
                      role: reference_video
                    - type: audio_url
                      audio_url:
                        url: >-
                          https://cdn.hailuoai.com/prod/hailuo_demo/testsets/h3_promo_eval_ref2va/gallery/sr_v2p26_trio_seed42_20260724/inputs/f463d523c5ce_01_%E9%9F%B3%E9%A2%911_RSLcbpzJPo_6%E6%9C%885%E6%97%A5(1).mp3
                      role: reference_audio
                    - type: video_url
                      video_url:
                        url: https://your-cdn.example.com/h3-r2va-768p.mp4
                      role: base_video
                  resolution: 2K
        required: true
      responses:
        '200':
          description: >-
            创建成功后返回 `task_id`。使用该 `task_id`
            调用[查询任务](/api-reference/video-generation-v2-query)接口获取任务状态与结果。


            **查询任务成功响应示例**


            ```json

            {
              "task": {
                "id": "424010985738631",
                "model": "MiniMax-H3",
                "status": "succeeded",
                "created_at": 1785126000,
                "updated_at": 1785126300,
                "content": {
                  "url": "https://your-cdn.example.com/h3-regenerated-2k-output.mp4"
                },
                "resolution": "2K",
                "duration": 5,
                "usage": {
                  "total_seconds": 5,
                  "input_seconds": 0,
                  "output_seconds": 5,
                  "input_image_count": 0
                },
                "ratio": "",
                "task_type": "regeneration",
                "modality": "video"
              }
            }

            ```
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationV2Resp'
        '400':
          $ref: '#/components/responses/Err400'
        '401':
          $ref: '#/components/responses/Err401'
        '402':
          $ref: '#/components/responses/Err402'
        '422':
          $ref: '#/components/responses/Err422'
        '429':
          $ref: '#/components/responses/Err429'
        '500':
          $ref: '#/components/responses/Err500'
components:
  schemas:
    VideoRegenerationReq:
      type: object
      description: 视频再生成请求。
      required:
        - model
        - content
        - resolution
      properties:
        model:
          type: string
          description: 模型名称，必填。当前支持 `MiniMax-H3`。
          enum:
            - MiniMax-H3
        content:
          type: array
          description: >-
            视频再生成输入内容数组。请在数组中包含：


            - **必须原样提交生成 768P 源视频时实际送入模型的全部输入**。其中，**`text` 必须使用当时实际送入模型的最终
            prompt，不可使用 H3-Context-IR 处理前的原始
            prompt**；所有参考图片、视频和音频也必须与生成时一致。**任何输入不一致，都可能无法达到预期的再生成效果**

            - 一个 768P 源视频项，`type=video_url` 且 `role=base_video`；该项必须且只能有一个


            `base_video` 必须符合以下 MiniMax-H3 768P 输出规格。本接口不支持其他视频的通用超分。


            | 项目 | 规格 |

            | :--- | :--- |

            | 音轨 | 需包含音轨，不支持无音轨视频 |

            | 帧率 | 24 fps |

            | 宽 / 高 | 均需能被 32 整除 |

            | 面积（宽 × 高） | ≤ 768 × 1344（1,032,192 像素） |

            | 总帧数 | 107–362 帧，每档递增 17 帧（约 4–15 秒） |


            ---


            **输入媒体限制**：请求体总大小 ≤ 64 MB，大文件请用公网 URL，勿用 Base64。参考图片 / 视频 /
            音频的格式、单文件大小等限制同[创建视频生成任务](/api-reference/video-generation-v2-create)。
          items:
            $ref: '#/components/schemas/RegenContentItem'
          contains:
            type: object
            required:
              - type
              - video_url
              - role
            properties:
              type:
                const: video_url
              role:
                const: base_video
          minContains: 1
          maxContains: 1
        resolution:
          type: string
          description: 视频再生成的目标分辨率，必填。当前支持 `2K`。
          enum:
            - 2K
        callback_url:
          type: string
          description: 任务状态变更的回调 URL,可选。行为同创建视频生成任务的 `callback_url`。
        aigc_watermark:
          type: boolean
          description: 是否为生成视频添加 AIGC 水印，可选，默认 `false`。
          default: false
    VideoGenerationV2Resp:
      type: object
      properties:
        task_id:
          type: string
          description: 任务 ID，用于后续查询任务状态与结果。
      example:
        task_id: '424010985738629'
    RegenContentItem:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: 输入内容的类型。
          enum:
            - text
            - image_url
            - video_url
            - audio_url
        text:
          type: string
          description: >-
            **必须使用生成 768P 源视频时实际送入模型的最终 prompt，不可使用 H3-Context-IR 处理前的原始
            prompt**。按字符数计算长度，单个 `text` 最多 40000 个字符。
        image_url:
          type: object
          description: >-
            当 `type=image_url` 时的图片对象（格式 / 大小 / 尺寸 /
            数量限制参见[创建视频生成任务](/api-reference/video-generation-v2-create#body-content)接口的
            content 说明）。
          required:
            - url
          properties:
            url:
              type: string
              description: >-
                图片地址,支持:公网 URL;`mm_file://{file_id}`(引用平台已有文件,如上传或历史产物的
                file_id);`data:image/<格式>;base64,<Base64>` data URI(`<格式>` 小写)。
        video_url:
          type: object
          description: >-
            当 `type=video_url` 时的视频对象（参考视频，仅多模态参考场景；格式 / 大小 /
            时长限制参见[创建视频生成任务](/api-reference/video-generation-v2-create#body-content)接口的
            content 说明）。
          required:
            - url
          properties:
            url:
              type: string
              description: >-
                视频地址,支持:公网 URL;`mm_file://{file_id}`(引用平台已有文件的
                file_id);`data:video/mp4;base64,<Base64>` data URI。注意请求体总大小 ≤ 64
                MB、Base64 会放大约 33%,大视频请用公网 URL 或 mm_file://。
        audio_url:
          type: object
          description: >-
            当 `type=audio_url` 时的音频对象（参考音频，仅多模态参考场景；格式 / 大小 /
            时长限制参见[创建视频生成任务](/api-reference/video-generation-v2-create#body-content)接口的
            content 说明）。
          required:
            - url
          properties:
            url:
              type: string
              description: >-
                音频地址,支持:公网 URL;`mm_file://{file_id}`(引用平台已有文件的
                file_id);`data:audio/<格式>;base64,<Base64>` data URI(`<格式>` 小写)。
        role:
          type: string
          description: >-
            内容的位置或用途，条件必填：

            - **`base_video`：视频再生成源视频**（仅 `/v2/video_regeneration`
            使用）；**源视频项必须显式设置该 `role`，`content` 中必须且只能有 1 个。**

            - `first_frame`：首帧图片（图生视频；仅一张图且不填 role 时默认按 first_frame 处理）。

            - `last_frame`：尾帧图片（图生视频-首尾帧，需与 first_frame 成对）。

            - `reference_image`：参考图片（多模态参考生视频）。

            - `reference_video`：参考视频（多模态参考生视频）。

            - `reference_audio`：参考音频（多模态参考生视频，不可单独输入）。
          enum:
            - base_video
            - first_frame
            - last_frame
            - reference_image
            - reference_video
            - reference_audio
      description: >-
        视频再生成输入项：可以是原始生成 content 中的 text / image_url / video_url /
        audio_url，也可以是标记源视频的 base_video。base_video 项必须包含 `type`、`video_url` 和
        `role=base_video`。
    OaiError:
      type: object
      description: OpenAI 风格错误响应。出错时 HTTP 状态码为真实错误码(401/400/429/402/422/500…),响应体为该结构。
      properties:
        type:
          type: string
          description: 固定为 `error`。
          example: error
        error:
          $ref: '#/components/schemas/OaiErrorDetail'
        request_id:
          type: string
          description: 请求追踪 ID(便于排查)。
    OaiErrorDetail:
      type: object
      properties:
        type:
          type: string
          description: >-
            错误类型:`authorized_error`(401)/`bad_request_error`(400)/`rate_limit_error`(429)/`insufficient_balance_error`(402)/`unprocessable_entity_error`(422)/`overloaded_error`(529)/`server_error`(500)
            等。
        message:
          type: string
          description: 错误详情,结尾括号内为内部错误码(如 `... (1004)`)。
        http_code:
          type: string
          description: HTTP 状态码字符串,如 `401`。
  responses:
    Err400:
      description: 参数错误
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OaiError'
          example:
            type: error
            error:
              type: bad_request_error
              message: >-
                invalid params, content must include a non-empty text item
                (prompt is required) (2013)
              http_code: '400'
            request_id: 021785229015510a2c883cf675b9804d
    Err401:
      description: 鉴权失败
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OaiError'
          example:
            type: error
            error:
              type: authorized_error
              message: >-
                login fail: Please carry the API secret key in the
                'Authorization' field of the request header (1004)
              http_code: '401'
            request_id: 021785229015510a2c883cf675b9804d
    Err402:
      description: 余额/额度不足
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OaiError'
          example:
            type: error
            error:
              type: insufficient_balance_error
              message: insufficient balance (1008)
              http_code: '402'
            request_id: 021785229015510a2c883cf675b9804d
    Err422:
      description: 输入涉及敏感内容
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OaiError'
          example:
            type: error
            error:
              type: unprocessable_entity_error
              message: video description contains sensitive content (1026)
              http_code: '422'
            request_id: 021785229015510a2c883cf675b9804d
    Err429:
      description: 触发限流
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OaiError'
          example:
            type: error
            error:
              type: rate_limit_error
              message: rate limit, please retry later (1002)
              http_code: '429'
            request_id: 021785229015510a2c883cf675b9804d
    Err500:
      description: 服务端错误
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OaiError'
          example:
            type: error
            error:
              type: server_error
              message: internal error (1000)
              http_code: '500'
            request_id: 021785229015510a2c883cf675b9804d
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        `HTTP: Bearer Auth`
         - Security Scheme Type: http
         - HTTP Authorization Scheme: Bearer API_key，用于验证账户信息，可在 [账户管理>接口密钥](https://platform.minimaxi.com/user-center/basic-information/interface-key) 中查看。

````