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

# H3 Context IR 创建视频

> MiniMax-H3 **Context IR** 增强创建。

**路径：** `POST https://api.omniall.ai/v1/videos/h3_context_ir`

对文本 / 图像 / 音视频做深度上下文理解与推理。字段与普通创建相同；也可在 `POST /v1/videos` 中设置 `context_ir_enabled: true`。

**模式互斥：** `first_frame` / `last_frame`（含 `image`、`images[0]`、`first_frame_url` 等）与 `reference_images` / `reference_videos` / `reference_audios`（或 content 中的 `reference_*`）**不能同时使用**。

**等价字段：** `first_frame_url` ≈ `first_frame` ≈ `image` ≈ `images[0]`。

**ratio 规则：**
- **文生视频（t2va）**：仅文本时 `ratio` 必填，且不能为 `adaptive`（可选 `21:9`/`16:9`/`4:3`/`1:1`/`3:4`/`9:16`）
- **图生视频（i2va）**：含首/尾帧时，输出比例跟随输入图，`ratio` 固定为 `adaptive`（传其它值会被忽略）
- **多模态参考（r2va）**：含 `reference_*` 时 `ratio` 可选，默认 `adaptive`，也可指定固定比例




## OpenAPI

````yaml zh-CN/openapi/minimax-h3-video.yaml POST /v1/videos/h3_context_ir
openapi: 3.1.0
info:
  title: Omniall AI — MiniMax-H3 生视频
  version: 1.0.0
  description: >-
    MiniMax-H3 异步创建视频。


    **路径：** `POST https://api.omniall.ai/v1/videos`


    亦可使用 `POST /v1/video/generations`。支持文生 / 图生（首尾帧）/ 多模态参考；分辨率 `480P` / `768P`
    / `1080P` / `2K`，时长 4–30 秒。


    **模式互斥：** `first_frame` / `last_frame`（含
    `image`、`images[0]`、`first_frame_url` 等）与 `reference_images` /
    `reference_videos` / `reference_audios`（或 content 中的
    `reference_*`）**不能同时使用**。


    **等价字段：** `first_frame_url` ≈ `first_frame` ≈ `image` ≈ `images[0]`。


    **ratio 规则：**

    - **文生视频（t2va）**：仅文本时 `ratio` 必填，且不能为 `adaptive`（可选
    `21:9`/`16:9`/`4:3`/`1:1`/`3:4`/`9:16`）

    - **图生视频（i2va）**：含首/尾帧时，输出比例跟随输入图，`ratio` 固定为 `adaptive`（传其它值会被忽略）

    - **多模态参考（r2va）**：含 `reference_*` 时 `ratio` 可选，默认 `adaptive`，也可指定固定比例


    鉴权：`Authorization: Bearer sk-...`
servers:
  - url: https://api.omniall.ai
security: []
paths:
  /v1/videos/h3_context_ir:
    post:
      tags:
        - MiniMax-H3
      summary: H3 Context IR 创建视频
      description: >
        MiniMax-H3 **Context IR** 增强创建。


        **路径：** `POST https://api.omniall.ai/v1/videos/h3_context_ir`


        对文本 / 图像 / 音视频做深度上下文理解与推理。字段与普通创建相同；也可在 `POST /v1/videos` 中设置
        `context_ir_enabled: true`。


        **模式互斥：** `first_frame` / `last_frame`（含
        `image`、`images[0]`、`first_frame_url` 等）与 `reference_images` /
        `reference_videos` / `reference_audios`（或 content 中的
        `reference_*`）**不能同时使用**。


        **等价字段：** `first_frame_url` ≈ `first_frame` ≈ `image` ≈ `images[0]`。


        **ratio 规则：**

        - **文生视频（t2va）**：仅文本时 `ratio` 必填，且不能为 `adaptive`（可选
        `21:9`/`16:9`/`4:3`/`1:1`/`3:4`/`9:16`）

        - **图生视频（i2va）**：含首/尾帧时，输出比例跟随输入图，`ratio` 固定为 `adaptive`（传其它值会被忽略）

        - **多模态参考（r2va）**：含 `reference_*` 时 `ratio` 可选，默认 `adaptive`，也可指定固定比例
      operationId: minimaxH3ContextIR
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
          description: Bearer API Key，例如 `Bearer sk-...`。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              description: MiniMax-H3 创建视频请求体。
              properties:
                model:
                  type: string
                  description: 模型 ID，固定使用 `MiniMax-H3`。
                  example: MiniMax-H3
                prompt:
                  type: string
                  description: 视频描述文本。也可用 `content` 中 `type=text`。
                  example: 一只猫在草地上奔跑，阳光明媚
                duration:
                  type: integer
                  minimum: 4
                  maximum: 30
                  description: 时长（秒），范围 4–30。也可用字符串 `seconds`。
                  example: 5
                seconds:
                  type: string
                  description: '`duration` 的字符串写法。'
                ratio:
                  type: string
                  enum:
                    - adaptive
                    - '21:9'
                    - '16:9'
                    - '4:3'
                    - '1:1'
                    - '3:4'
                    - '9:16'
                  description: 画幅。文生必填且不可 `adaptive`；图生固定 `adaptive`；多模态参考默认可 `adaptive`。
                  example: '16:9'
                aspect_ratio:
                  type: string
                  description: '`ratio` 别名。'
                resolution:
                  type: string
                  enum:
                    - 480P
                    - 768P
                    - 1080P
                    - 2K
                  description: 分辨率：`480P` / `768P` / `1080P` / `2K`。
                  example: 2K
                image:
                  type: string
                  description: 单张首帧图 URL（与 `first_frame` 等价）。勿与 reference_* 混用。
                images:
                  type: array
                  items:
                    type: string
                  description: 图片 URL 数组；单张时常作首帧。
                first_frame:
                  type: string
                  description: 首帧图 URL。别名：`first_frame_url`、`input_reference`。
                last_frame:
                  type: string
                  description: 尾帧图 URL。别名：`last_frame_url`。
                first_frame_url:
                  type: string
                  description: '`first_frame` 别名。'
                last_frame_url:
                  type: string
                  description: '`last_frame` 别名。'
                reference_images:
                  type: array
                  items:
                    type: string
                  description: 多模态参考图。勿与首/尾帧混用。
                reference_videos:
                  type: array
                  items:
                    type: string
                  description: 多模态参考视频。
                reference_audios:
                  type: array
                  items:
                    type: string
                  description: 多模态参考音频。
                context_ir_enabled:
                  type: boolean
                  description: >-
                    是否启用 Context IR（深度理解多模态素材）。也可走专用路径
                    `/v1/videos/h3_context_ir`。
                callback_url:
                  type: string
                  description: 任务完成回调 URL。
                content:
                  type: array
                  description: 原生多模态 content 数组（与扁平字段二选一或组合，规则同互斥）。
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - text
                          - image_url
                          - video_url
                          - audio_url
                      text:
                        type: string
                      role:
                        type: string
                        description: >-
                          `first_frame` / `last_frame` / `reference_image` /
                          `reference_video` / `reference_audio`
                      image_url:
                        type: object
                        properties:
                          url:
                            type: string
                      video_url:
                        type: object
                        properties:
                          url:
                            type: string
                      audio_url:
                        type: object
                        properties:
                          url:
                            type: string
                      url:
                        type: string
                        description: 简化写法媒体 URL。
            examples:
              文生视频:
                summary: 文生视频（t2va）
                value:
                  model: MiniMax-H3
                  prompt: 一只猫在草地上奔跑，阳光明媚
                  duration: 5
                  resolution: 2K
                  ratio: '16:9'
              图生视频-首帧:
                summary: 图生视频 · 首帧（i2va）
                value:
                  model: MiniMax-H3
                  prompt: 画面中蒸汽逐渐增多，镜头缓慢推近
                  duration: 5
                  resolution: 2K
                  first_frame: https://example.com/first.png
              图生视频-首尾帧:
                summary: 图生视频 · 首尾帧（i2va）
                value:
                  model: MiniMax-H3
                  prompt: 从清晨过渡到黄昏，云层缓慢流动
                  duration: 8
                  resolution: 768P
                  first_frame: https://example.com/morning.png
                  last_frame: https://example.com/dusk.png
              多模态参考-原生content:
                summary: 多模态参考 · 原生 content（r2va）
                value:
                  model: MiniMax-H3
                  content:
                    - type: text
                      text: 角色说话，镜头跟拍
                    - type: image_url
                      image_url:
                        url: https://example.com/char.png
                      role: reference_image
                    - type: video_url
                      video_url:
                        url: https://example.com/motion.mp4
                      role: reference_video
                    - type: audio_url
                      audio_url:
                        url: https://example.com/voice.mp3
                      role: reference_audio
                  duration: 5
                  resolution: 2K
                  ratio: adaptive
              多模态参考:
                summary: 多模态参考 · 扁平字段（r2va）
                value:
                  model: MiniMax-H3
                  prompt: 保持角色外观，运镜参考视频，节奏对齐音频
                  duration: 5
                  resolution: 2K
                  ratio: '16:9'
                  reference_images:
                    - https://example.com/char.png
                  reference_videos:
                    - https://example.com/motion.mp4
                  reference_audios:
                    - https://example.com/voice.mp3
      responses:
        '200':
          description: 任务已接受
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: 任务 ID。
                  task_id:
                    type: string
                  status:
                    type: string
                  object:
                    type: string
        '400':
          description: 请求无效
        '401':
          description: 未授权

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.