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

# 创建 MiniMax H3 视频再生成任务

支持两种方式（二选一）：

* **按任务 ID**：传平台已有生成任务的 `source_task_id`。
* **按源视频**：在 `content` 中传 `role=base_video` 的 768P 源视频，并原样附上生成该视频时的其他输入。

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

<Note>
  再生成任务的 `task_type` 为 `regeneration`，可通过 [查询 MiniMax H3 视频任务](/guides/minimax-h3-query-task) 和 [查询 MiniMax H3 视频任务列表](/guides/minimax-h3-list-tasks) 管理。
</Note>

## 请求示例

<CodeGroup>
  ```bash source_task_id theme={null}
  curl -X POST "https://{your-domain}/v1/videos/generations/regenerations" \
    -H "Authorization: Bearer $API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "minimax-h3",
      "source_task_id": "vidtask_768p_source_example",
      "resolution": "2K"
    }'
  ```

  ```json base_video · 文生 theme={null}
  {
    "model": "minimax-h3",
    "content": [
      {
        "type": "text",
        "text": "史诗级太空歌剧院线预告：女舰长独自站在巨大观景窗前，最后一支舰队正在集结并跃迁离去，强光爆闪、舰桥震动，她被留在原地。"
      },
      {
        "type": "video_url",
        "video_url": {
          "url": "https://example.com/h3-768p-source-text.mp4"
        },
        "role": "base_video"
      }
    ],
    "resolution": "2K"
  }
  ```

  ```json base_video · 图生 theme={null}
  {
    "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://example.com/h3-source-first-frame.png"
        },
        "role": "first_frame"
      },
      {
        "type": "video_url",
        "video_url": {
          "url": "https://example.com/h3-768p-source-image.mp4"
        },
        "role": "base_video"
      }
    ],
    "resolution": "2K"
  }
  ```

  ```json base_video · 多模态参考 theme={null}
  {
    "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://example.com/h3-reference-video.mp4"
        },
        "role": "reference_video"
      },
      {
        "type": "audio_url",
        "audio_url": {
          "url": "https://example.com/h3-reference-audio.mp3"
        },
        "role": "reference_audio"
      },
      {
        "type": "video_url",
        "video_url": {
          "url": "https://example.com/h3-768p-source-multimodal.mp4"
        },
        "role": "base_video"
      }
    ],
    "resolution": "2K"
  }
  ```
</CodeGroup>

## 请求参数

| 参数               | 类型        | 必填  | 说明                                                    |
| ---------------- | --------- | --- | ----------------------------------------------------- |
| `model`          | string    | 是   | 固定使用 `minimax-h3`。                                    |
| `source_task_id` | string    | 二选一 | 平台返回的 768P H3 原始生成任务 ID。                              |
| `content`        | object\[] | 二选一 | 生成 768P 源视频时的完整输入，并额外包含且只能包含一个 `role=base_video` 视频项。 |
| `resolution`     | string    | 是   | 当前固定为 `2K`。                                           |
| `aigc_watermark` | boolean   | 否   | 是否添加“AI生成”水印，默认关闭。                                    |

`source_task_id` 必须是平台返回的 MiniMax H3 768P 原始生成任务 ID，不能使用再生成任务、其他视频模型任务或 2K 任务。

## base\_video 输入要求

`content` 模式需要：

1. 原样提交生成 768P 源视频时实际送入模型的全部输入。
2. `text` 使用当时实际送入模型的最终 prompt。
3. 所有参考图片、视频和音频与生成源视频时保持一致。
4. 额外加入一个 768P 源视频项，设置 `type=video_url` 和 `role=base_video`。
5. `content` 中必须且只能包含一个 `base_video`。

### 源视频规格

| 项目        | 规格                            |
| --------- | ----------------------------- |
| 音轨        | 需要包含音轨，不支持无音轨视频               |
| 帧率        | 24 fps                        |
| 宽 / 高     | 均能被 32 整除                     |
| 面积（宽 × 高） | 不超过 768 × 1344，即 1,032,192 像素 |
| 总帧数       | 107–362 帧，每档递增 17 帧，约 4–15 秒  |

请求体总大小不能超过 64 MB。图片、视频和音频支持公网 URL 或对应的 Base64 Data URI；接近大小限制时请使用公网 URL。
其他输入媒体限制与 [创建 MiniMax H3 视频任务](/guides/minimax-h3-create-task#素材限制) 相同。

<Note>
  如果音频使用 Base64 Data URI，请使用 `data:audio/mp3;base64,...` 或 `data:audio/wav;base64,...`。沙箱实测 `data:audio/mpeg;base64,...` 会被 MiniMax 上游识别为 `.mpeg` 并拒绝；公网 `.mp3` 或 `.wav` 地址不受此限制。
</Note>

## 创建响应

HTTP 状态码：`202 Accepted`

```json theme={null}
{
  "id": "vidtask_regeneration_example",
  "object": "video.generation.task",
  "created": 1785987048,
  "model": "minimax-h3",
  "task_type": "regeneration",
  "resolution": "2K",
  "status": "queued",
  "expires_at": 1786159848
}
```

创建成功后，继续使用：

```text theme={null}
GET /v1/videos/generations/{id}
```

## 失败状态

| HTTP 状态码 | 错误类型                    | 场景                                |
| -------- | ----------------------- | --------------------------------- |
| `400`    | `invalid_request_error` | 分辨率不是 `2K`、模型不匹配、源任务不是原始 H3 生成任务。 |
| `401`    | `authentication_error`  | API Key 缺失或无效。                    |
| `402`    | `insufficient_balance`  | 当前账户余额不足。                         |
| `403`    | `model_not_visible`     | 模型不可见或当前 API Key 没有权限。            |
| `404`    | `task_not_found`        | 源任务不存在或不属于当前 API Key。             |
| `409`    | `source_task_not_ready` | 源任务尚未成功、缺少上游任务 ID 或时长信息。          |
| `500`    | `internal_error`        | 平台内部错误，任务未成功创建。                   |
