openapi: 3.0.3
info:
  title: API 文档
  version: 1.5.17
servers:
- url: 'https://api.imarouter.com'
tags:
- name: Seedance 视频
- name: MiniMax 视频
- name: Kling 视频
- name: Vidu 视频
- name: 豆包擦字幕
- name: Gemini 图片
- name: GPT Image
- name: 豆包 Seedream
- name: Wan 图片
- name: Wan2.6 视频
- name: HappyHorse 视频
- name: Midjourney
- name: 人像
- name: Chat
- name: Usage
- name: 音乐
- name: Pixverse 视频
- name: Veo 视频
- name: Seed TTS 语音
- name: PrunaAI 图片
security:
- BearerAuth: []
paths:
  /api/usage/token/user-balance:
    get:
      tags:
      - Usage
      summary: 按 SK 查询当前用户可消费余额（USD）
      description: '使用 `Authorization: Bearer sk-...` 查询当前 SK 所属用户的可消费美元余额。


        **返回值**

        - `balance_usd`：当前可用美元等价值余额。

        - `used_amount_usd`：累计美元等价值用量。


        **适用场景**

        - 客户端用 SK 直接查询当前账户还能消费多少美元等价值额度。

        - 对齐站内“额度余额”的美元展示。

        '
      operationId: getUserBalanceByToken
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: ''
                  data:
                    type: object
                    properties:
                      object:
                        type: string
                        example: user_balance
                      user_id:
                        type: integer
                        example: 1001
                      username:
                        type: string
                        example: demo-user
                      quota:
                        type: integer
                        example: 1250000
                      used_quota:
                        type: integer
                        example: 250000
                      balance_usd:
                        type: number
                        format: double
                        example: 2.5
                      used_amount_usd:
                        type: number
                        format: double
                        example: 0.5
                      quota_per_unit:
                        type: number
                        format: double
                        example: 500000
                      currency:
                        type: string
                        example: USD
              examples:
                success:
                  summary: 返回当前用户可消费余额（USD）
                  value:
                    success: true
                    message: ''
                    data:
                      object: user_balance
                      user_id: 1001
                      username: demo-user
                      quota: 1250000
                      used_quota: 250000
                      balance_usd: 2.5
                      used_amount_usd: 0.5
                      quota_per_unit: 500000
                      currency: USD
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
      - lang: curl-get-api-usage-token-user-balance
        label: 按 SK 查询当前用户可消费余额（USD）
        source: "curl https://api.imarouter.com/api/usage/token/user-balance \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'"
  /v1/music/generations:
    post:
      tags:
      - Music
      summary: 创建音乐生成任务
      description: '通过通用音乐端点提交 `sonic` 文生音乐任务。


        **实际请求路径：** `POST /v1/music/generations`


        **支持模型：**

        - `sonic`


        **参数说明：**

        - `prompt`：必填，最长 5000 字符

        - `custom_mode`：可选，默认 `true`

        - `model_version`：可选，默认 `sonic-v4`；支持 `sonic-v3-5`、`sonic-v4`、`sonic-v4-5`、`sonic-v4-5-plus`、`sonic-v5`

        - `auto_lyrics`、`make_instrumental`、`gpt_description_prompt`、`negative_tags`、`style_weight`、`tags`、`title`、`vocal_gender`、`weirdness_constraint`：可选扩展参数


        **结果查询：**

        - 提交成功后返回任务 ID，可通过 `GET /v1/music/generations/{task_id}` 查询状态和音乐结果。

        '
      operationId: createMusicGenerationTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImaMusicCreateTaskRequest'
            examples:
              sonic_basic:
                summary: sonic 基础文生音乐
                value:
                  model: sonic
                  prompt: Bright synth-pop with a catchy chorus
              sonic_custom:
                summary: sonic 自定义参数
                value:
                  model: sonic
                  prompt: A cinematic electronic track with soft female vocals
                  custom_mode: false
                  model_version: sonic-v5
                  tags: electronic, cinematic
                  title: Neon Skyline
                  vocal_gender: f
                  style_weight: 0
                  weirdness_constraint: 0
      responses:
        '200':
          description: 提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImaMusicCreateTaskResponse'
              examples:
                task_submitted:
                  summary: 音乐任务已受理
                  value:
                    id: task_music_202605130001
                    task_id: task_music_202605130001
                    object: music
                    model: sonic
                    status: submitted
                    progress: 0
                    created_at: 1778640000
        '400':
          description: 参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-sonic-basic
        label: sonic 基础文生音乐
        source: "curl https://api.imarouter.com/v1/music/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"sonic\",\n\
          \  \"prompt\": \"Bright synth-pop with a catchy chorus\"\n}'"
      - lang: curl-sonic-custom
        label: sonic 自定义参数
        source: "curl https://api.imarouter.com/v1/music/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"sonic\",\n\
          \  \"prompt\": \"A cinematic electronic track with soft female vocals\",\n  \"custom_mode\": false,\n  \"model_version\"\
          : \"sonic-v5\",\n  \"tags\": \"electronic, cinematic\",\n  \"title\": \"Neon Skyline\",\n  \"vocal_gender\": \"\
          f\",\n  \"style_weight\": 0,\n  \"weirdness_constraint\": 0\n}'"
  /v1/music/generations/{task_id}:
    get:
      tags:
      - Music
      summary: 查询音乐任务状态与结果
      description: '查询 `POST /v1/music/generations` 提交后的音乐任务。成功时 `data.data` 返回音乐结果数组。


        如返回音乐结果 URL，请及时下载并自行保存。'
      operationId: fetchMusicGenerationTask
      parameters:
      - in: path
        name: task_id
        required: true
        schema:
          type: string
        description: 提交创建接口返回的任务 ID。
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImaMusicTaskFetchResponse'
              examples:
                pending:
                  summary: 处理中
                  value:
                    code: success
                    data:
                      task_id: task_music_202605130001
                      status: processing
                      data: []
                      error: null
                success:
                  summary: 成功（多条音乐结果）
                  value:
                    code: success
                    data:
                      task_id: task_music_202605130001
                      status: succeeded
                      data:
                      - url: https://cdn.example.com/music/sonic-a.mp3
                        audio_url: https://cdn.example.com/music/sonic-a.mp3
                        title: Neon Skyline A
                        lyrics: Sample lyric text
                        duration: 180
                        metadata:
                          model_version: sonic-v5
                      - url: https://cdn.example.com/music/sonic-b.mp3
                        audio_url: https://cdn.example.com/music/sonic-b.mp3
                        title: Neon Skyline B
                        lyrics: Sample lyric text
                        duration: 182
                        metadata:
                          model_version: sonic-v5
                      amount_usd: 0.15
                      error: null
                failed:
                  summary: 失败
                  value:
                    code: success
                    data:
                      task_id: task_music_202605130001
                      status: failed
                      data: []
                      error:
                        message: task failed
        '400':
          description: 参数错误（如 task_id 不存在）
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-get-v1-music-generations-task-id
        label: 查询音乐任务状态与结果
        source: "curl https://api.imarouter.com/v1/music/generations/task_202604270001 \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN'"
  /v1/audio/speech:
    post:
      tags:
      - Seed TTS 语音
      summary: 创建 Seed TTS 语音任务
      description: '使用 OpenAI 兼容的 `POST /v1/audio/speech` 提交 `seed-tts-2.0` 语音合成任务。


        **实际请求路径：** `POST /v1/audio/speech`


        **支持模型：**

        - `seed-tts-2.0`


        **参数说明：**

        - `input` / `text` / `prompt` / `ssml`：至少提供一个文本输入，最多 10000 字符

        - `voice` / `speaker`：必填其一

        - `response_format`：可选，默认 `mp3`

        - `speed`：可选，语速倍率


        **结果查询：**

        - 提交成功后返回任务 ID，可通过 `GET /v1/audio/speech/{task_id}` 查询状态和音频结果。

        '
      operationId: createSeedTtsSpeechTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SeedTtsSpeechCreateRequest'
            examples:
              seed_tts_input_voice:
                summary: input + voice 示例
                value:
                  model: seed-tts-2.0
                  input: 你好，欢迎使用异步语音合成。
                  voice: zh_female_shuangkuaisisi_uranus
                  response_format: mp3
              seed_tts_ssml_speaker:
                summary: SSML + speaker 示例
                value:
                  model: seed-tts-2.0
                  ssml: <speak>你好，欢迎使用异步语音合成。</speak>
                  speaker: zh_female_shuangkuaisisi_uranus
      responses:
        '200':
          description: 提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeedTtsSpeechCreateResponse'
              examples:
                task_submitted:
                  summary: 返回语音任务 ID
                  value:
                    id: task_seed_tts_202605260001
                    task_id: task_seed_tts_202605260001
                    object: audio.speech
                    model: seed-tts-2.0
                    status: submitted
                    progress: 0
                    created_at: 1779720000
        '400':
          description: 参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-seed-tts-input-voice
        label: input + voice 示例
        source: "curl https://api.imarouter.com/v1/audio/speech \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seed-tts-2.0\"\
          ,\n  \"input\": \"你好，欢迎使用异步语音合成。\",\n  \"voice\": \"zh_female_shuangkuaisisi_uranus\",\n  \"response_format\": \"\
          mp3\"\n}'"
      - lang: curl-seed-tts-ssml-speaker
        label: SSML + speaker 示例
        source: "curl https://api.imarouter.com/v1/audio/speech \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seed-tts-2.0\"\
          ,\n  \"ssml\": \"<speak>你好，欢迎使用异步语音合成。</speak>\",\n  \"speaker\": \"zh_female_shuangkuaisisi_uranus\"\n}'"
  /v1/audio/speech/{task_id}:
    get:
      tags:
      - Seed TTS 语音
      summary: 查询 Seed TTS 语音任务
      description: '查询 `POST /v1/audio/speech` 提交后的 `seed-tts-2.0` 语音任务。


        成功时返回任务状态、音频格式、音频 URL 和用量信息（如有）。'
      operationId: getSeedTtsSpeechTask
      parameters:
      - in: path
        name: task_id
        required: true
        schema:
          type: string
        description: 提交创建接口返回的语音任务 ID。
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeedTtsSpeechFetchResponse'
              examples:
                queued:
                  summary: 排队中
                  value:
                    code: success
                    data:
                      task_id: task_seed_tts_202605260001
                      status: queued
                      format: mp3
                      url: ''
                      error: null
                      usage:
                        count: 0
                succeeded:
                  summary: 成功
                  value:
                    code: success
                    data:
                      task_id: task_seed_tts_202605260001
                      status: succeeded
                      format: mp3
                      url: https://cdn.example.com/audio/seed-tts-result.mp3
                      amount_usd: 0.003
                      error: null
                      usage:
                        count: 80
                failed:
                  summary: 失败
                  value:
                    code: success
                    data:
                      task_id: task_seed_tts_202605260001
                      status: failed
                      format: mp3
                      url: ''
                      error:
                        message: task failed
                      usage:
                        count: 0
        '400':
          description: 参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-get-v1-audio-speech-task-id
        label: 查询 Seed TTS 语音任务
        source: "curl https://api.imarouter.com/v1/audio/speech/task_202604270001 \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'"
  /v1/images/generations:
    post:
      tags:
      - Gemini 图片
      - GPT Image
      - 豆包 Seedream
      - Wan 图片
      - PrunaAI 图片
      summary: 生成 Gemini 图片
      description: "OpenAI Images 兼容端点。\n\n**实际请求路径：** `POST /v1/images/generations`\n\n支持的图片模型族：\n- Gemini 图片：`gemini-2.5-flash-image`、`gemini-3-pro-image-preview`、`gemini-3.1-flash-image-preview`\n\
        - GPT Image：`gpt-image-2`\n- 豆包 Seedream：`doubao-seedream-4-5-251128`、`doubao-seedream-5-0-lite-260128`\n- Wan 图片：`wan2.6-t2i`、`wan2.6-image`、`wan2.7-image`、`wan2.7-image-pro`\n\
        - PrunaAI 图片：`prunaai/p-image`、`prunaai/p-image-edit`\n- 不支持 `gemini-3-pro-preview`（text-to-text）\n\n本页展示 Gemini 图片请求体。\n\
        - `prompt`：必填，最长 10000 字符\n- `aspect_ratio`：可选，按模型枚举校验\n- `size`：可选；`gemini-3-pro-image-preview` 支持 `1K/2K/4K`，`gemini-2.5-flash-image`\
        \ 与 `gemini-3.1-flash-image-preview` 额外支持 `512px`\n- `image` / `images`：可选，用于 image-to-image，最多 14 张\n- 图片 URL 文件类型要求：`jpg/png`\n\
        \n提交成功后返回任务 ID，可通过 `GET /v1/images/generations/{task_id}` 查询状态和结果。\n\n**重要提示（必读）**\n- 30 天失效规则仅适用于接口返回的图片结果 URL，不代表输入的\
        \ `image` / `images` 会被平台主动过期。\n- 图片接口返回的结果 URL 为平台托管短期链接，建议客户端在接收后立即下载保存，默认约 30 天后失效。\n\n---\n\n### GPT Image\n\n\
        gpt-image-2 的 OpenAI Images 兼容提交端点。本文档用于在 gpt-image 分类下展示 `POST /v1/images/generations` 的 gpt-image-2 请求体。\n\n**实际请求路径：**\
        \ `POST /v1/images/generations`\n\n**支持模型：**\n- `gpt-image-2`\n\n**参数说明：**\n- `prompt`：必填\n- `size`：可选\n- `quality`：可选\n\
        - `image` / `images`：可选；传图片但不传 `mask` 时按 `image_to_image` 处理\n- `mask`：可选；当存在图片输入且传 `mask` 时按 `image_edit` 处理\n- 可选扩展字段：`background`、`input_fidelity`、`moderation`、`n`、`output_compression`、`output_format`\n\
        \n**重要提示（必读）**\n- 30 天失效规则仅适用于接口返回的图片结果 URL，不代表输入的 `image` / `images` 会被平台主动过期。\n- 图片接口返回的结果 URL 为平台托管短期链接，建议客户端在接收后立即下载保存，默认约\
        \ 30 天后失效。\n\n---\n\n### 豆包 Seedream\n\ndoubao-seedream-5-0-lite-260128 的 OpenAI Images 兼容提交端点。本文档用于在豆包 Seedream 分类下展示\
        \ `POST /v1/images/generations` 的请求体。\n\n**实际请求路径：** `POST /v1/images/generations`\n\n**支持模型：**\n- `doubao-seedream-5-0-lite-260128`\n\
        - `seedream-5-0-260128`\n\n**参数说明：**\n- `prompt`：必填，最长 600 字符\n- `size`：可选，支持 `2K`、`3K` 以及自定义像素尺寸：`2048x2048`、`2304x1728`、`1728x2304`、`2848x1600`、`1600x2848`、`2496x1664`、`1664x2496`、`3136x1344`、`3072x3072`、`3456x2592`、`2592x3456`、`4096x2304`、`2304x4096`、`2496x3744`、`3744x2496`、`4704x2016`\n\
        - `image` / `images`：可选；存在图片输入时按 image-to-image 处理，最多 14 张\n- `output_format`：可选，仅支持 `jpeg`、`png`\n- `optimize_prompt_options.mode`：可选，当前仅支持\
        \ `standard`\n\n提交成功后返回任务 ID，可通过 `GET /v1/images/generations/{task_id}` 查询状态和结果。\n\n**重要提示（必读）**\n- 30 天失效规则仅适用于接口返回的图片结果\
        \ URL，不代表输入的 `image` / `images` 会被平台主动过期。\n- 图片接口返回的结果 URL 为平台托管短期链接，建议客户端在接收后立即下载保存，默认约 30 天后失效。\n\n---\n\n### 豆包\
        \ Seedream\n\ndoubao-seedream-4-5-251128 的 OpenAI Images 兼容提交端点。\n\n**实际请求路径：** `POST /v1/images/generations`\n\n\
        **参数说明：**\n- `prompt`：必填，最长 600 字符\n- `size`：可选，支持 `2K`、`4K`、`2048x2048`、`2304x1728`、`1728x2304`、`2560x1440`、`1440x2560`、`2496x1664`、`1664x2496`、`3024x1296`\n\
        - `image` / `images`：可选；存在图片输入时按 image-to-image 处理，最多 14 张\n\n提交成功后返回任务 ID，可通过 `GET /v1/images/generations/{task_id}`\
        \ 查询状态和结果。\n\n---\n\n### Wan 图片\n\nWan 图片模型的 OpenAI Images 兼容提交端点。本文档用于在 Wan 图片分类下展示 `POST /v1/images/generations`\
        \ 的请求体。\n\n**实际请求路径：** `POST /v1/images/generations`\n\n**支持模型：**\n- `wan2.7-image`\n- `wan2.7-image-pro`（额外支持 4K）\n\
        \n**参数说明：**\n- `prompt`：必填\n- `image` / `images`：可选，存在图片输入时按 image-to-image 处理，最多 14 张\n- `size`：可选\n  - `wan2.7-image`：支持\
        \ `1K`、`2K` 或自定义 `宽*高`；总像素需在 `768*768` 到 `2048*2048` 之间，宽高比范围 `1:8` 到 `8:1`\n  - `wan2.7-image-pro`：支持 `1K`、`2K`、`4K`\
        \ 或自定义 `宽*高`\n  - 仅文生图（无图片输入、未启用组图）支持 `4K` 与最高到 `4096*4096` 的自定义尺寸；其余场景仅支持 `2K` 与 `2048*2048`\n- 可选扩展字段：`bbox_list`/`bboxList`、`color_palette`/`colorPalette`、`enable_sequential`/`enableSequential`、`seed`、`thinking_mode`/`thinkingMode`\n\
        \n**参数约束：**\n- `bbox_list` 仅适用于带输入图片的 image-to-image 场景；纯文本生图不要传该字段\n- `enable_sequential=true` 时不要同时传 `thinking_mode`\n\
        - `enable_sequential=true` 时不要同时传 `color_palette`\n\n提交成功后返回任务 ID，可通过 `GET /v1/images/generations/{task_id}` 查询状态和结果。\n\
        \n**重要提示（必读）**\n- 30 天失效规则仅适用于接口返回的图片结果 URL，不代表输入参数会被平台主动过期。\n- 图片接口返回的结果 URL 为平台托管短期链接，建议客户端在接收后立即下载保存，默认约 30 天后失效。\n\
        \n---\n\n### Wan 图片\n\nWan2.6 图片模型使用真实端点 `POST /v1/images/generations`。\n\n**支持模型：**\n- `wan2.6-t2i`：文生图，禁止传 `image`\
        \ / `images`\n- `wan2.6-image`：图生图，必须传 `image` 或 `images`\n\n**参数说明：**\n- `prompt`：必填，最长 2000 字符\n- `size`：可选，只支持枚举\
        \ `1280*1280`、`800*1200`、`1200*800`、`960*1280`、`1280*960`、`720*1280`、`1280*720`、`1344*576`\n- `negative_prompt`：可选，最长\
        \ 500 字符\n- `prompt_extend`：可选\n- `seed`：可选\n\n---\n\n### PrunaAI 图片\n\nPrunaAI 图片模型的 OpenAI Images 兼容提交端点。本文档用于在\
        \ PrunaAI 图片分类下展示 `POST /v1/images/generations` 的请求体。\n\n**实际请求路径：** `POST /v1/images/generations`\n\n**支持模型：**\n\
        - `prunaai/p-image`：文生图，必须提供 `prompt`\n- `prunaai/p-image-edit`：图片编辑，必须同时提供 `prompt` 与图片输入（`image`、`images` 或 `extra_fields.input.images`）\n\
        \n**参数说明：**\n- `prunaai/p-image` 支持 `prompt`、`size`、`aspect_ratio`、`width`、`height`、`seed`、`disable_safety_checker`\n\
        - `prunaai/p-image-edit` 支持 `prompt`、`image`、`images`、`extra_fields`、`aspect_ratio`、`turbo`、`seed`、`disable_safety_checker`\n\
        - `image` 或 `images` 用于提供输入图片；`extra_fields` 可承载扩展参数\n\n**结果查询：**\n- 提交成功后返回任务 ID，可通过 `GET /v1/images/generations/{task_id}`\
        \ 查询状态和结果。"
      operationId: createImageGenerationTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/GeminiImageGenerationRequest'
              - $ref: '#/components/schemas/GptImage2ImageGenerationRequest'
              - $ref: '#/components/schemas/DoubaoSeedream50LiteImageGenerationRequest'
              - $ref: '#/components/schemas/DoubaoSeedream45ImageGenerationRequest'
              - $ref: '#/components/schemas/Wan27ImageGenerationRequest'
              - $ref: '#/components/schemas/Wan26T2IImageGenerationRequest'
              - $ref: '#/components/schemas/Wan26I2IImageGenerationRequest'
              - $ref: '#/components/schemas/PrunaImageGenerationRequest'
              discriminator:
                propertyName: model
                mapping:
                  doubao-seedream-4-5-251128: '#/components/schemas/DoubaoSeedream45ImageGenerationRequest'
                  doubao-seedream-5-0-lite-260128: '#/components/schemas/DoubaoSeedream50LiteImageGenerationRequest'
                  gemini-2.5-flash-image: '#/components/schemas/ImaImageGenerationRequestGemini25Flash'
                  gemini-3-pro-image-preview: '#/components/schemas/ImaImageGenerationRequestGemini3Pro'
                  gemini-3.1-flash-image-preview: '#/components/schemas/ImaImageGenerationRequestGemini31Flash'
                  gpt-image-2: '#/components/schemas/GptImage2ImageGenerationRequest'
                  prunaai/p-image: '#/components/schemas/PrunaPImageGenerationRequest'
                  prunaai/p-image-edit: '#/components/schemas/PrunaPImageEditGenerationRequest'
                  seedream-5-0-260128: '#/components/schemas/DoubaoSeedream50LiteImageGenerationRequest'
                  wan2.6-image: '#/components/schemas/Wan26I2IImageGenerationRequest'
                  wan2.6-t2i: '#/components/schemas/Wan26T2IImageGenerationRequest'
                  wan2.7-image: '#/components/schemas/Wan27ImageGenerationRequest'
                  wan2.7-image-pro: '#/components/schemas/Wan27ImageGenerationRequest'
            examples:
              gemini3_pro_text_to_image:
                summary: gemini-3-pro-image-preview 文生图（16:9，2K）
                value:
                  model: gemini-3-pro-image-preview
                  prompt: a futuristic city at sunset
                  aspect_ratio: '16:9'
                  size: 2K
              gemini3_pro_single_image_to_image:
                summary: gemini-3-pro-image-preview 单图图生图（image 字段）
                value:
                  model: gemini-3-pro-image-preview
                  prompt: convert to cinematic film still style
                  image: https://example.com/source.jpg
                  aspect_ratio: '4:3'
                  size: 1K
              gemini3_pro_multi_image_to_image:
                summary: gemini-3-pro-image-preview 多图图生图（images 字段）
                value:
                  model: gemini-3-pro-image-preview
                  prompt: blend these references into one product poster
                  images:
                  - https://example.com/ref-1.jpg
                  - https://example.com/ref-2.png
                  aspect_ratio: '3:2'
                  size: 4K
              gemini31_flash_image_to_image:
                summary: gemini-3.1-flash-image-preview 图生图（1:1，1K）
                value:
                  model: gemini-3.1-flash-image-preview
                  prompt: turn this into watercolor style
                  images:
                  - https://example.com/input.jpg
                  aspect_ratio: '1:1'
                  size: 1K
              gemini31_flash_text_to_image_512:
                summary: gemini-3.1-flash-image-preview 文生图（512px）
                value:
                  model: gemini-3.1-flash-image-preview
                  prompt: minimalist icon set for weather app
                  aspect_ratio: '1:1'
                  size: 512px
              gemini25_flash_text_to_image:
                summary: gemini-2.5-flash-image 文生图（21:9，4K）
                value:
                  model: gemini-2.5-flash-image
                  prompt: compact watercolor postcard of a mountain village
                  aspect_ratio: '21:9'
                  size: 4K
              gemini25_flash_image_to_image:
                summary: gemini-2.5-flash-image 图生图（1:1，1K）
                value:
                  model: gemini-2.5-flash-image
                  prompt: convert this reference into a clean editorial illustration
                  images:
                  - https://example.com/reference.png
                  aspect_ratio: '1:1'
                  size: 1K
              gpt_image_gpt_image_2_text_to_image:
                summary: gpt-image-2 文生图
                value:
                  model: gpt-image-2
                  prompt: generate a glossy product hero image for a smartwatch
                  size: 1024x1024
                  quality: high
                  background: transparent
                  output_format: png
              gpt_image_gpt_image_2_image_edit:
                summary: gpt-image-2 图片编辑（带 mask）
                value:
                  model: gpt-image-2
                  prompt: replace the background with a clean studio backdrop
                  images:
                  - https://example.com/input.png
                  mask: https://example.com/mask.png
                  size: 1536x1024
                  quality: high
                  input_fidelity: high
                  moderation: low
                  output_format: png
              doubao_seedream_doubao_seedream_text_to_image:
                summary: doubao-seedream-5-0-lite-260128 文生图（2K/png/提示词优化）
                value:
                  model: doubao-seedream-5-0-lite-260128
                  prompt: generate a cinematic beverage poster with glossy lighting
                  size: 2K
                  output_format: png
                  optimize_prompt_options:
                    mode: standard
              doubao_seedream_doubao_seedream_image_to_image:
                summary: doubao-seedream-5-0-lite-260128 图生图（3K/png/提示词优化）
                value:
                  model: doubao-seedream-5-0-lite-260128
                  prompt: turn this reference into a cinematic poster
                  images:
                  - https://example.com/input.webp
                  size: 3K
                  output_format: png
                  optimize_prompt_options:
                    mode: standard
              doubao_seedream_seedream_5_text_to_image:
                summary: seedream-5-0-260128 文生图（3K/png）
                value:
                  model: seedream-5-0-260128
                  prompt: generate a clean product poster with soft studio lighting
                  size: 3K
                  output_format: png
              doubao_seedream_45_doubao_seedream_45_text_to_image:
                summary: doubao-seedream-4-5-251128 文生图（2K）
                value:
                  model: doubao-seedream-4-5-251128
                  prompt: generate a cinematic beverage poster with glossy lighting
                  size: 2K
              doubao_seedream_45_doubao_seedream_45_image_to_image:
                summary: doubao-seedream-4-5-251128 图生图（4K）
                value:
                  model: doubao-seedream-4-5-251128
                  prompt: turn this reference into a cinematic poster
                  images:
                  - https://example.com/input.webp
                  size: 4K
              wan_wan27_basic:
                summary: wan2.7-image 文生图基础示例（1024*1024，seed）
                value:
                  model: wan2.7-image
                  prompt: 电影感插画
                  size: 1024*1024
                  seed: 12345
              wan_wan27_advanced:
                summary: wan2.7-image-pro 图生图高级示例（bbox_list/color_palette）
                value:
                  model: wan2.7-image-pro
                  prompt: 电影感插画
                  images:
                  - https://cdn.example.com/reference.png
                  size: 1024*1024
                  bbox_list:
                  - - - 0
                      - 0
                      - 12
                      - 12
                  color_palette:
                  - hex: '#C2D1E6'
                    ratio: 50.00%
                  - hex: '#F4D06F'
                    ratio: 30.00%
                  - hex: '#7FA99B'
                    ratio: 20.00%
                  enable_sequential: false
                  seed: 12345
              wan26_wan26_t2i:
                summary: wan2.6-t2i 文生图（1280*1280，prompt_extend=false）
                value:
                  model: wan2.6-t2i
                  prompt: 一个美丽的日落海景
                  size: 1280*1280
                  prompt_extend: false
                  seed: 12345
              wan26_wan26_image:
                summary: wan2.6-image 图生图（1280*720，单张参考图）
                value:
                  model: wan2.6-image
                  prompt: 将参考图改成电影海报风格
                  images:
                  - https://example.com/reference.png
                  size: 1280*720
                  prompt_extend: false
              pruna_pruna_p_image_text_to_image:
                summary: prunaai/p-image 文生图
                value:
                  model: prunaai/p-image
                  prompt: a clean studio product photo of a ceramic cup
                  size: 1024x1024
                  aspect_ratio: '1:1'
                  seed: 0
              pruna_pruna_p_image_edit:
                summary: prunaai/p-image-edit 图片编辑
                value:
                  model: prunaai/p-image-edit
                  prompt: edit this image into a clean product-style composition
                  image: https://example.com/source.png
                  extra_fields:
                    input:
                      images:
                      - https://example.com/source.png
                      aspect_ratio: '1:1'
                      turbo: false
                      seed: 0
      responses:
        '200':
          description: 提交成功
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ImaImageCreateTaskResponse'
                - $ref: '#/components/schemas/PrunaImageCreateTaskResponse'
              examples:
                task_submitted:
                  summary: 返回任务 ID
                  value:
                    id: task_202603200001
                    task_id: task_202603200001
                    object: image
                    model: gemini-3.1-flash-image-preview
                    status: queued
                    progress: 0
                    created_at: 1774000000
                gpt_image_gpt_image_2_task_submitted:
                  summary: gpt-image-2 返回任务 ID
                  value:
                    id: task_gpt_image_2_202604230001
                    task_id: task_gpt_image_2_202604230001
                    object: image
                    model: gpt-image-2
                    status: queued
                    progress: 0
                    created_at: 1776952800
                doubao_seedream_doubao_seedream_task_submitted:
                  summary: doubao-seedream-5-0-lite-260128 返回任务 ID
                  value:
                    id: task_doubao_seedream_202604240001
                    task_id: task_doubao_seedream_202604240001
                    object: image
                    model: doubao-seedream-5-0-lite-260128
                    status: queued
                    progress: 0
                    created_at: 1777017600
                doubao_seedream_45_doubao_seedream_45_task_submitted:
                  summary: doubao-seedream-4-5-251128 返回任务 ID
                  value:
                    id: task_doubao_seedream_45_202604250001
                    task_id: task_doubao_seedream_45_202604250001
                    object: image
                    model: doubao-seedream-4-5-251128
                    status: queued
                    progress: 0
                    created_at: 1777100000
                wan_wan27_task_submitted:
                  summary: wan2.7-image / wan2.7-image-pro 返回任务 ID
                  value:
                    id: task_wan27_202604240001
                    task_id: task_wan27_202604240001
                    object: image
                    model: wan2.7-image-pro
                    status: queued
                    progress: 0
                    created_at: 1777017600
                wan26_wan26_task_submitted:
                  summary: 任务已受理
                  value:
                    id: task_wan26_image_202604250001
                    task_id: task_wan26_image_202604250001
                    object: image
                    model: wan2.6-t2i
                    status: queued
                    progress: 0
                    created_at: 1777100000
                pruna_pruna_task_submitted:
                  summary: PrunaAI 返回任务 ID
                  value:
                    id: task_pruna_202605260001
                    task_id: task_pruna_202605260001
                    object: image
                    model: prunaai/p-image
                    status: queued
                    progress: 0
                    created_at: 1780041600
        '400':
          description: 参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
      - lang: curl-gemini3-pro-text-to-image
        label: gemini-3-pro-image-preview 文生图（16:9，2K）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gemini-3-pro-image-preview\"\
          ,\n  \"prompt\": \"a futuristic city at sunset\",\n  \"aspect_ratio\": \"16:9\",\n  \"size\": \"2K\"\n}'"
      - lang: curl-gemini3-pro-single-image-to-image
        label: gemini-3-pro-image-preview 单图图生图（image 字段）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gemini-3-pro-image-preview\"\
          ,\n  \"prompt\": \"convert to cinematic film still style\",\n  \"image\": \"https://example.com/source.jpg\",\n\
          \  \"aspect_ratio\": \"4:3\",\n  \"size\": \"1K\"\n}'"
      - lang: curl-gemini3-pro-multi-image-to-image
        label: gemini-3-pro-image-preview 多图图生图（images 字段）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gemini-3-pro-image-preview\"\
          ,\n  \"prompt\": \"blend these references into one product poster\",\n  \"images\": [\n    \"https://example.com/ref-1.jpg\"\
          ,\n    \"https://example.com/ref-2.png\"\n  ],\n  \"aspect_ratio\": \"3:2\",\n  \"size\": \"4K\"\n}'"
      - lang: curl-gemini31-flash-image-to-image
        label: gemini-3.1-flash-image-preview 图生图（1:1，1K）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gemini-3.1-flash-image-preview\"\
          ,\n  \"prompt\": \"turn this into watercolor style\",\n  \"images\": [\n    \"https://example.com/input.jpg\"\n\
          \  ],\n  \"aspect_ratio\": \"1:1\",\n  \"size\": \"1K\"\n}'"
      - lang: curl-gemini31-flash-text-to-image-512
        label: gemini-3.1-flash-image-preview 文生图（512px）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gemini-3.1-flash-image-preview\"\
          ,\n  \"prompt\": \"minimalist icon set for weather app\",\n  \"aspect_ratio\": \"1:1\",\n  \"size\": \"512px\"\n\
          }'"
      - lang: curl-gemini25-flash-text-to-image
        label: gemini-2.5-flash-image 文生图（21:9，4K）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gemini-2.5-flash-image\"\
          ,\n  \"prompt\": \"compact watercolor postcard of a mountain village\",\n  \"aspect_ratio\": \"21:9\",\n  \"size\"\
          : \"4K\"\n}'"
      - lang: curl-gemini25-flash-image-to-image
        label: gemini-2.5-flash-image 图生图（1:1，1K）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gemini-2.5-flash-image\"\
          ,\n  \"prompt\": \"convert this reference into a clean editorial illustration\",\n  \"images\": [\n    \"https://example.com/reference.png\"\
          \n  ],\n  \"aspect_ratio\": \"1:1\",\n  \"size\": \"1K\"\n}'"
      - lang: curl-gpt-image-2-text-to-image
        label: gpt-image-2 文生图
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-image-2\"\
          ,\n  \"prompt\": \"generate a glossy product hero image for a smartwatch\",\n  \"size\": \"1024x1024\",\n  \"quality\"\
          : \"high\",\n  \"background\": \"transparent\",\n  \"output_format\": \"png\"\n}'"
      - lang: curl-gpt-image-2-image-edit
        label: gpt-image-2 图片编辑（带 mask）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-image-2\"\
          ,\n  \"prompt\": \"replace the background with a clean studio backdrop\",\n  \"images\": [\n    \"https://example.com/input.png\"\
          \n  ],\n  \"mask\": \"https://example.com/mask.png\",\n  \"size\": \"1536x1024\",\n  \"quality\": \"high\",\n  \"\
          input_fidelity\": \"high\",\n  \"moderation\": \"low\",\n  \"output_format\": \"png\"\n}'"
      - lang: curl-doubao-seedream-text-to-image
        label: doubao-seedream-5-0-lite-260128 文生图（2K/png/提示词优化）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"doubao-seedream-5-0-lite-260128\"\
          ,\n  \"prompt\": \"generate a cinematic beverage poster with glossy lighting\",\n  \"size\": \"2K\",\n  \"output_format\"\
          : \"png\",\n  \"optimize_prompt_options\": {\n    \"mode\": \"standard\"\n  }\n}'"
      - lang: curl-doubao-seedream-image-to-image
        label: doubao-seedream-5-0-lite-260128 图生图（3K/png/提示词优化）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"doubao-seedream-5-0-lite-260128\"\
          ,\n  \"prompt\": \"turn this reference into a cinematic poster\",\n  \"images\": [\n    \"https://example.com/input.webp\"\
          \n  ],\n  \"size\": \"3K\",\n  \"output_format\": \"png\",\n  \"optimize_prompt_options\": {\n    \"mode\": \"standard\"\
          \n  }\n}'"
      - lang: curl-seedream-5-text-to-image
        label: seedream-5-0-260128 文生图（3K/png）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedream-5-0-260128\"\
          ,\n  \"prompt\": \"generate a clean product poster with soft studio lighting\",\n  \"size\": \"3K\",\n  \"output_format\"\
          : \"png\"\n}'"
      - lang: curl-doubao-seedream-45-text-to-image
        label: doubao-seedream-4-5-251128 文生图（2K）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"doubao-seedream-4-5-251128\"\
          ,\n  \"prompt\": \"generate a cinematic beverage poster with glossy lighting\",\n  \"size\": \"2K\"\n}'"
      - lang: curl-doubao-seedream-45-image-to-image
        label: doubao-seedream-4-5-251128 图生图（4K）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"doubao-seedream-4-5-251128\"\
          ,\n  \"prompt\": \"turn this reference into a cinematic poster\",\n  \"images\": [\n    \"https://example.com/input.webp\"\
          \n  ],\n  \"size\": \"4K\"\n}'"
      - lang: curl-wan27-basic
        label: wan2.7-image 文生图基础示例（1024*1024，seed）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"wan2.7-image\"\
          ,\n  \"prompt\": \"电影感插画\",\n  \"size\": \"1024*1024\",\n  \"seed\": 12345\n}'"
      - lang: curl-wan27-advanced
        label: wan2.7-image-pro 图生图高级示例（bbox_list/color_palette）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"wan2.7-image-pro\"\
          ,\n  \"prompt\": \"电影感插画\",\n  \"images\": [\n    \"https://cdn.example.com/reference.png\"\n  ],\n  \"size\": \"\
          1024*1024\",\n  \"bbox_list\": [\n    [\n      [\n        0,\n        0,\n        12,\n        12\n      ]\n   \
          \ ]\n  ],\n  \"color_palette\": [\n    {\n      \"hex\": \"#C2D1E6\",\n      \"ratio\": \"50.00%\"\n    },\n   \
          \ {\n      \"hex\": \"#F4D06F\",\n      \"ratio\": \"30.00%\"\n    },\n    {\n      \"hex\": \"#7FA99B\",\n    \
          \  \"ratio\": \"20.00%\"\n    }\n  ],\n  \"enable_sequential\": false,\n  \"seed\": 12345\n}'"
      - lang: curl-wan26-t2i
        label: wan2.6-t2i 文生图（1280*1280，prompt_extend=false）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"wan2.6-t2i\"\
          ,\n  \"prompt\": \"一个美丽的日落海景\",\n  \"size\": \"1280*1280\",\n  \"prompt_extend\": false,\n  \"seed\": 12345\n}'"
      - lang: curl-wan26-image
        label: wan2.6-image 图生图（1280*720，单张参考图）
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"wan2.6-image\"\
          ,\n  \"prompt\": \"将参考图改成电影海报风格\",\n  \"images\": [\n    \"https://example.com/reference.png\"\n  ],\n  \"size\"\
          : \"1280*720\",\n  \"prompt_extend\": false\n}'"
      - lang: curl-pruna-p-image-text-to-image
        label: prunaai/p-image 文生图
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"prunaai/p-image\"\
          ,\n  \"prompt\": \"a clean studio product photo of a ceramic cup\",\n  \"size\": \"1024x1024\",\n  \"aspect_ratio\"\
          : \"1:1\",\n  \"seed\": 0\n}'"
      - lang: curl-pruna-p-image-edit
        label: prunaai/p-image-edit 图片编辑
        source: "curl https://api.imarouter.com/v1/images/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"prunaai/p-image-edit\"\
          ,\n  \"prompt\": \"edit this image into a clean product-style composition\",\n  \"image\": \"https://example.com/source.png\"\
          ,\n  \"extra_fields\": {\n    \"input\": {\n      \"images\": [\n        \"https://example.com/source.png\"\n  \
          \    ],\n      \"aspect_ratio\": \"1:1\",\n      \"turbo\": false,\n      \"seed\": 0\n    }\n  }\n}'"
  /v1/images/generations/{task_id}:
    get:
      tags:
      - Gemini 图片
      - GPT Image
      - 豆包 Seedream
      - Wan 图片
      - PrunaAI 图片
      summary: 查询 Gemini 图片任务
      description: '查询 `POST /v1/images/generations` 提交后的任务。

        成功响应中如出现 `amount_usd`，表示该图片任务完成后的美元金额。

        **重要提示（必读）**

        - 30 天失效规则仅适用于接口返回的图片结果 URL，不代表输入的 `image` / `images` 会被平台主动过期。

        - 查询成功后如返回图片结果 URL，请立即下载并自行持久化保存；平台不保证结果 URL 长期可访问，默认约 30 天后失效。


        ---


        ### GPT Image


        gpt-image-2 的 OpenAI Images 兼容查询端点。本文档用于在 gpt-image 分类下展示 `GET /v1/images/generations/{task_id}` 的查询结果结构。


        **实际请求路径：** `GET /v1/images/generations/{task_id}`


        成功响应中如出现 `amount_usd`，表示该图片任务完成后的美元金额。


        **重要提示（必读）**

        - 30 天失效规则仅适用于接口返回的图片结果 URL，不代表输入的 `image` / `images` 会被平台主动过期。

        - 查询成功后如返回图片结果 URL，请立即下载并自行持久化保存；平台不保证结果 URL 长期可访问，默认约 30 天后失效。


        ---


        ### 豆包 Seedream


        doubao-seedream-5-0-lite-260128 的 OpenAI Images 兼容查询端点。本文档用于在 Doubao Seedream 分类下展示 `GET /v1/images/generations/{task_id}`
        的结果结构。


        **实际请求路径：** `GET /v1/images/generations/{task_id}`


        成功响应中如出现 `amount_usd`，表示该图片任务完成后的美元金额。


        **重要提示（必读）**

        - 30 天失效规则仅适用于接口返回的图片结果 URL，不代表输入的 `image` / `images` 会被平台主动过期。

        - 查询成功后如返回图片结果 URL，请立即下载并自行持久化保存；平台不保证结果 URL 长期可访问，默认约 30 天后失效。


        ---


        ### Wan 图片


        Wan 图片模型的 OpenAI Images 兼容查询端点。本文档用于在 Wan Image 分类下展示 `GET /v1/images/generations/{task_id}` 的结果结构。


        **实际请求路径：** `GET /v1/images/generations/{task_id}`


        成功响应中如出现 `amount_usd`，表示该图片任务完成后的美元金额。


        **重要提示（必读）**

        - 30 天失效规则仅适用于接口返回的图片结果 URL，不代表输入参数会被平台主动过期。

        - 查询成功后如返回图片结果 URL，请立即下载并自行持久化保存；平台不保证结果 URL 长期可访问，默认约 30 天后失效。


        ---


        ### PrunaAI 图片


        PrunaAI 图片模型的 OpenAI Images 兼容查询端点。本文档用于在 PrunaAI 图片分类下展示 `GET /v1/images/generations/{task_id}` 的结果结构。


        **实际请求路径：** `GET /v1/images/generations/{task_id}`


        成功时返回任务状态和图片结果 URL。


        **重要提示（必读）**

        - 查询成功后如返回图片结果 URL，请立即下载并自行持久化保存；平台不保证结果 URL 长期可访问，默认约 30 天后失效。'
      operationId: fetchImageGenerationTask
      parameters:
      - in: path
        name: task_id
        required: true
        schema:
          type: string
        description: 提交创建接口返回的任务 ID。
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImaImageTaskFetchResponse'
              examples:
                pending:
                  summary: 处理中
                  value:
                    code: success
                    data:
                      task_id: task_202603200001
                      status: processing
                      format: png
                      url: ''
                      usage:
                        input_tokens: 9
                        output_tokens: 0
                        total_tokens: 9
                      error: null
                      metadata: null
                success:
                  summary: 成功
                  value:
                    code: success
                    data:
                      task_id: task_202603200001
                      status: succeeded
                      format: png
                      url: https://cdn.example.com/gen/abc123.png
                      amount_usd: 0.032
                      usage:
                        input_tokens: 9
                        output_tokens: 1505
                        total_tokens: 1514
                      error: null
                      metadata: null
                failed:
                  summary: 失败
                  value:
                    code: success
                    data:
                      task_id: task_202603200001
                      status: failed
                      format: png
                      url: ''
                      usage:
                        input_tokens: 9
                        output_tokens: 0
                        total_tokens: 9
                      error:
                        message: task failed
                      metadata: null
                gpt_image_gpt_image_2_success:
                  summary: gpt-image-2 成功
                  value:
                    code: success
                    data:
                      task_id: task_gpt_image_2_202604230001
                      status: succeeded
                      format: png
                      url: https://cdn.example.com/gen/gpt-image-2-abc123.png
                      amount_usd: 0.084
                      usage:
                        input_tokens: 120
                        output_tokens: 840
                        total_tokens: 960
                      error: null
                      metadata: null
                doubao_seedream_doubao_seedream_success:
                  summary: doubao-seedream-5-0-lite-260128 成功
                  value:
                    code: success
                    data:
                      task_id: task_doubao_seedream_202604240001
                      status: succeeded
                      format: png
                      url: https://cdn.example.com/gen/doubao-seedream-5-0-lite-260128-abc123.png
                      amount_usd: 0.14
                      usage:
                        input_tokens: 96
                        output_tokens: 2
                        total_tokens: 98
                      error: null
                      metadata: null
                wan_wan27_success:
                  summary: wan2.7-image-pro 成功
                  value:
                    code: success
                    data:
                      task_id: task_wan27_202604240001
                      status: succeeded
                      format: png
                      url: https://cdn.example.com/gen/wan2.7-image-pro-abc123.png
                      amount_usd: 0.22
                      usage:
                        image_count: 2
                        input_tokens: 100
                        output_tokens: 200
                        total_tokens: 300
                      error: null
                      metadata: null
                pruna_pruna_success:
                  summary: PrunaAI 图片成功
                  value:
                    code: success
                    data:
                      task_id: task_pruna_202605260001
                      status: succeeded
                      format: png
                      url: https://cdn.example.com/gen/pruna-p-image-abc123.png
                      amount_usd: 0.005
                      usage:
                        image_count: 1
                      error: null
                      metadata: null
        '400':
          description: 参数错误（如 task_id 不存在）
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
      - lang: curl-get-v1-images-generations-task-id
        label: 查询 Gemini 图片任务
        source: "curl https://api.imarouter.com/v1/images/generations/task_202604270001 \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN'"
      - lang: curl-gpt-image-curl-get-v1-images-generations-task-id
        label: 查询图片任务状态与结果（gpt-image-2）
        source: "curl https://api.imarouter.com/v1/images/generations/task_202604270001 \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN'"
      - lang: curl-doubao-seedream-curl-get-v1-images-generations-task-id
        label: 查询图片任务状态与结果（豆包 Seedream）
        source: "curl https://api.imarouter.com/v1/images/generations/task_202604270001 \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN'"
      - lang: curl-wan-curl-get-v1-images-generations-task-id
        label: 查询图片任务状态与结果（wan2.7-image / wan2.7-image-pro）
        source: "curl https://api.imarouter.com/v1/images/generations/task_202604270001 \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN'"
      - lang: curl-pruna-curl-get-v1-images-generations-task-id
        label: 查询 PrunaAI 图片任务
        source: "curl https://api.imarouter.com/v1/images/generations/task_202604270001 \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN'"
  /v1/videos:
    post:
      tags:
      - Seedance 视频
      - Wan2.6 视频
      - HappyHorse 视频
      - Kling 视频
      - Vidu 视频
      - Pixverse 视频
      - Veo 视频
      - MiniMax 视频
      summary: 创建 Seedance 视频任务
      description: '使用 Seedance 模型提交视频任务：

        - `seedance-2.0`

        - `seedance-2.0-fast`

        - `seedance-2.0-cn`

        - `seedance-2.0-fast-cn`

        - ~~`ima-pro`~~（海外渠道历史别名，已过期；向后兼容，请改用 `seedance-2.0` / `seedance-2.0-cn`）

        - ~~`ima-pro-fast`~~（海外渠道历史别名，已过期；向后兼容，请改用 `seedance-2.0-fast` / `seedance-2.0-fast-cn`）

        鉴权：请求头必须包含 `Authorization: Bearer sk-...`。

        审核透传：`x-moderation` 默认视为 `false`；如需开启审核透传，可额外传请求头 `x-moderation: enabled`。

        端点约束：`/v1/videos` 为视频任务端点，只接受视频模型；图片生成模型请使用 `/v1/images/generations`。

        **重要提示（必读）**

        - `images`、`metadata.reference_video_urls`、`metadata.reference_audio_urls`、`metadata.first_frame_image` 等输入 URL（含公网
        URL 或 `asset://...`）是任务输入引用，请在提交时确认可访问。

        常用字段：

        - 文本：`prompt`

        - 图片：`images`（支持多图）

        - 参考视频：`metadata.reference_video_urls`

        - 参考音频：`metadata.reference_audio_urls`

        - 音频开关：`metadata.audio`（版权风险场景建议先置为 `false`，即无背景音乐）

        - 尺寸：`size` 可传 `WxH`，但必须能归一化为支持的精确比例；例如 `854x480` 会归一化为 `427:240`，不是精确 `16:9`，会被拒绝为 `ratio is invalid: 427:240`。480p
        16:9 建议使用 `848x480` 或直接传 `metadata.resolution=480p`。


        **重要说明：按生成方式选择示例**

        - 文生视频（仅文本生成）：参考 `C01 文本（seedance-2.0-fast）`、`C01b 文本 1080p（seedance-2.0）`。

        - 图生视频（图片驱动生成）：参考 `C02 文本+图片(1图)`、`C03 单图默认参考图`、`C04 单图显式首帧`、`C05 两图默认参考图`、`C06 两图显式首尾帧`。

        - 参考生视频（参考视频/音频/人像协议参与生成）：参考 `C07 文本+视频`、`C08 文本+图片+音频`、`C09 文本+图片+视频`、`C10 文本+视频+音频`、`C11 文本+图片+视频+音频`、`C12 文本+人像+视频+音频`、`C15
        文本+视频人像协议`、`C16 文本+图片+音频人像协议`。

        - 反例与规避策略：参考 `C13 参考视频像素不足（601300）`、`C14 音乐版权风险场景（先禁背景音乐）`。


        组合逻辑（对齐 ima-router 当前行为）：

        - 文本（`prompt` 必填）

        - 文本 + 图片（`prompt` 可选）

        - 文本 + 视频（`prompt` 可选）

        - 文本 + 图片 + 音频（`prompt` 可选）

        - 文本 + 图片 + 视频（`prompt` 可选）

        - 文本 + 视频 + 音频（`prompt` 可选）

        - 文本 + 图片 + 视频 + 音频（`prompt` 可选）


        图片角色映射（重要）：

        - 默认模式（`role_mode=reference`）：图片统一映射为 `reference_image`

        - 帧模式（`role_mode=frame`）：单图映射 `first_frame`，双图映射 `first_frame + last_frame`

        - 帧模式不能与 `reference_video_urls`/`reference_audio_urls` 同时使用


        人物素材合规说明：

        - 使用自有虚拟人物或真人素材时，仅限素人，不支持明星人物。

        - 平台会对上传素材进行审核，以规避可能的法律风险。

        - 已支持通过 `/v1/assets/create` 上传人物素材（创建素材）并进入审核流程。

        - 建议流程：先调用 `/v1/assets/create` 上传并沉淀素材，再在 `/v1/videos` 请求中引用已审核素材。

        - 上传后可调用 `/v1/assets/get` 轮询素材状态，一般 10s 内即可获取结果。

        - 文档示例支持点击复制；复制后的请求体可直接交给 AI 自动识别并生成最终接入代码。

        - 如需批量接入素材，请优先走素材库接口而非临时直链。


        下方示例是请求体，不是返回体。


        ---


        ### Wan2.6 视频


        使用真实端点 `POST /v1/videos`。


        支持模型：

        - `wan2.6-t2v`：文生视频

        - `wan2.6-i2v`：图生视频

        - `wan2.6-i2v-flash`：快速图生视频

        - `wan2.6-r2v`：参考生视频，支持参考图或参考视频输入


        提交成功后返回任务 ID，可通过 `GET /v1/videos/{task_id}` 查询状态和结果。


        ---


        ### HappyHorse 视频


        使用真实端点 `POST /v1/videos` 提交 HappyHorse 1.0 视频任务。


        支持模型：

        - `happyhorse-1.0-t2v`：文生视频，类别 `text_to_video`

        - `happyhorse-1.0-i2v`：图生视频，类别 `image_to_video`

        - `happyhorse-1.0-r2v`：参考图生视频，类别 `reference_image_to_video`

        - `happyhorse-1.0-video-edit`：视频编辑，类别 `video_to_video`


        公共参数：

        - 分辨率：`720P`、`1080P`

        - 每个任务返回一个输出视频

        - `watermark` 不支持，提交会返回 400


        `t2v` / `i2v` / `r2v` 时长：

        - 时长：`3~15s`


        `video-edit`：

        - 该模型不直接提交 duration


        `t2v` 参数：

        - 必填：`model`、`prompt`

        - 可选：`duration` / `seconds`、`size`、`aspect_ratio`、`seed`

        - 不支持 `image`、`images`、`video_url`、`reference_video_urls`


        `i2v` 参数：

        - 必填：`model`，并且必须提供一个首帧图片来源

        - 图片来源任选其一：`image`、`images[0]`、`first_frame_url`、`media[0].url`

        - `media[0].type` 仅支持 `first_frame`

        - 最多 1 张图片，不支持参考视频输入

        - `prompt` 可选


        `r2v` 参数：

        - 必填：`model`、`prompt`，并且必须提供 1~9 张参考图

        - 参考图来源任选其一：`image`、`images`、`reference_image_urls`、`media[].url`、`metadata.reference_image_urls`

        - `media[].type` 仅支持 `reference_image`

        - 支持 `aspect_ratio`、`duration` / `seconds`、`size`、`seed`

        - 不支持参考视频输入


        `video-edit` 参数：

        - 必填：`model`、`prompt`，并且必须提供 1 个源视频

        - 视频来源任选其一：`video_url`、`media[].type=video`、`metadata.video_url`

        - 可选参考图：`reference_image_urls` 或 `media[].type=reference_image`，最多 5 张参考图

        - 支持 `size`、`audio_setting`、`seed`


        ---


        ### Kling 视频


        使用真实端点 `POST /v1/videos` 提交 `kling-v3-video` 任务。


        支持类别：

        - `text_to_video`

        - `image_to_video`

        - `first_last_frame_to_video`

        - `reference_image_to_video`


        参数说明：

        - 时长：`3~15s`

        - `mode`：`std` 或 `pro`

        - `sound`：`on` 或 `off`

        - `aspect_ratio`：`16:9`、`9:16` 或 `1:1`

        - `shot_type`：`customize` 或 `intelligence`

        - URL 图片输入使用 `image`、`images`、`first_frame_url` 或 `last_frame_url`，对应图生视频 / 首尾帧模式

        - `reference_image_to_video` 类别支持主体引用 `element_list: [{"element_id": 12345}]`

        - `camera_control` 支持 `kling-v3-video`

        - 每个任务返回一个输出视频


        ---


        ### Kling 视频


        使用真实端点 `POST /v1/videos` 提交 `kling-v3-omni-video` 任务。


        支持类别：

        - `text_to_video`

        - `image_to_video`

        - `first_last_frame_to_video`

        - `reference_image_to_video`


        参数说明：

        - 时长：`3~15s`

        - `mode`：`std` 或 `pro`

        - `sound`：`on` 或 `off`

        - `aspect_ratio`：`16:9`、`9:16` 或 `1:1`

        - `shot_type`：仅支持 `customize`

        - `video_url` / `video_list` 表示视频输入；该形态仅支持 `3~10s`，`sound=on` 与 `video_url` / `video_list` 组合会返回 400

        - `image_list` 使用 `image_url`，可选 `type` 仅支持 `first_frame` / `end_frame`

        - `element_list` 支持 `{ element_id }` 主体引用；媒体 URL 必须走 `image_list` 或 `video_list`

        - `image`、`images` 和参考图兼容字段可作为图片输入

        - 每个任务返回一个输出视频


        ---


        ### Kling 视频


        Kling 旧版视频模型的 OpenAI 兼容提交端点。本文档只展示 Kling 模型家族在 `POST /v1/videos` 下的请求体；不要把其他视频模型家族合并到本页。


        **实际请求路径：** `POST /v1/videos`


        **支持模型：**

        - `kling-v1`

        - `kling-v1-6`

        - `kling-v2-master`

        - `kling-v2-1-master`

        - `kling-v2-5-turbo`

        - `kling-v2-6`

        - `kling-video-o1`


        **参数说明：**

        - `prompt`：文本提示词。

        - `image`：可选首帧/参考图 URL。

        - `image_tail`：可选尾帧 URL，用于首尾帧模式。

        - `duration`：时长，支持 5 或 10 秒。

        - `aspect_ratio`：`1:1`、`16:9` 或 `9:16`。

        - `mode`：`std` 或 `pro`。


        **端点家族说明：** 本页属于 `/v1/videos` 的 Kling 家族文档页；机器导入 OpenAPI 会把它与同真实端点的其他家族合并为一个可发送请求的契约。


        ---


        ### Vidu 视频


        Vidu 视频模型的 OpenAI 兼容提交端点。本文档只展示 Vidu 模型家族在 `POST /v1/videos` 下的请求体；不要把其他视频模型家族合并到本页。


        **实际请求路径：** `POST /v1/videos`


        **支持模型：**

        - `viduq1`（固定 1080P/5s）

        - `viduq2`（文生视频，支持 540P~1080P）

        - `viduq2-pro`（仅图生视频，支持 540P~1080P）

        - `viduq2-turbo`（仅图生视频，支持 540P~1080P）

        - `viduq3-pro`（文生视频/图生视频，按秒计费）

        - `viduq3-turbo`（文生视频/图生视频，按秒计费）


        **参数说明：**

        - `prompt`：文生视频时必填。

        - `images`：图生视频时传图片 URL 数组。单图=参考图，双图=首尾帧。

        - `duration`：时长，默认 5。viduq1 固定 5s，viduq3 支持 1~16s。

        - `metadata.resolution`：分辨率，`540p`、`720p`、`1080p`。


        **端点家族说明：** 本页属于 `/v1/videos` 的 Vidu 家族文档页；机器导入 OpenAPI 会把它与同真实端点的其他家族合并为一个可发送请求的契约。


        ---


        ### Pixverse 视频


        Pixverse 视频模型的 OpenAI 兼容提交端点。本文档只展示 Pixverse 模型家族在 `POST /v1/videos` 下的请求体。


        **实际请求路径：** `POST /v1/videos`


        **支持模型：**

        - `pixverse-c1`

        - `pixverse-v6`


        **参数说明：**

        - `prompt`：必填。

        - `duration`：时长（秒），默认 5。

        - `size`：宽高比，默认 `16:9`，也支持 `9:16`、`1:1`。

        - `quality`：分辨率档位，支持 `360p`、`540p`、`720p`、`1080p`。

        - `metadata.audio` 或 `metadata.generate_audio_switch`：是否生成音频。

        - `metadata.img_id`：Pixverse 图片 ID；传入后按图生视频提交。


        提交成功后返回任务 ID，可通过 `GET /v1/videos/{task_id}` 查询状态和结果。


        ---


        ### Veo 视频


        Veo 视频模型的 OpenAI 兼容提交端点。本文档只展示 Veo 模型家族在 `POST /v1/videos` 下的请求体。


        **实际请求路径：** `POST /v1/videos`


        **支持模型：**

        - `veo-3.0-generate-001`

        - `veo-3.1-fast-generate-001`


        **参数说明：**

        - `prompt`：必填。

        - `duration` / `seconds` / `durationSeconds`：视频时长，当前公开契约仅支持 4 或 8 秒。

        - `resolution`：`veo-3.0-generate-001` 支持 `720p`、`1080p`；`veo-3.1-fast-generate-001` 支持 `720p`、`1080p`、`4k`。

        - `aspectRatio` / `aspect_ratio`：支持 `16:9`、`9:16`。

        - `image` / `images`：图片输入。`veo-3.1-fast-generate-001` 的参考图请使用 `images`（1~3 张 URL）。两张图默认按 `reference_image_to_video`；如果两张图是首尾帧，请设置
        `metadata.role_mode=frame`。Veo 3.1 的公开请求契约不读取 `reference_image_urls`。


        **端点家族说明：** 本页属于 `/v1/videos` 的 Veo 家族文档页；机器导入 OpenAPI 会把它与同真实端点的其他家族合并为一个可发送请求的契约。


        ---


        ### MiniMax 视频


        MiniMax 视频生成的 OpenAI 兼容提交端点。本文档用于在 MiniMax 视频分类下展示 `POST /v1/videos` 的 MiniMax 请求体。


        **实际请求路径：** `POST /v1/videos`


        **支持模型：**

        - `MiniMax-Hailuo-02`

        - `MiniMax-Hailuo-2.3`

        - `MiniMax-Hailuo-2.3-Fast`


        **约束：**

        - `MiniMax-Hailuo-2.3-Fast` 仅图生视频，必须传 `metadata.first_frame_image`

        - `duration` 仅支持 `6` 或 `10`

        - `size` 按模型能力校验：`512p`、`768p`、`1080p`


        **重要提示（必读）**

        - `metadata.first_frame_image` 等输入 URL 是任务输入引用，请在提交时确认可访问。'
      parameters:
      - name: x-moderation
        in: header
        required: false
        schema:
          type: string
          enum:
          - enabled
        example: enabled
        description: '可选审核透传请求头，默认视为 `false`。仅当传 `x-moderation: enabled` 时，服务端才会把该 header 透传到 Seedance 上游。'
      operationId: createImaProVideoTask
      x-playground-portrait-asset-models:
        seedance-2.0: seedance-upload
        seedance-2.0-fast: seedance-upload
        seedance-2.0-cn: seedance-upload-cn
        seedance-2.0-fast-cn: seedance-upload-cn
        ima-pro: seedance-upload
        ima-pro-fast: seedance-upload
      x-playground-portrait-asset-required: true
      x-playground-portrait-asset-status-ok: Active
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/ImaProVideoCreateRequest'
              - $ref: '#/components/schemas/Wan26VideoCreateRequest'
              - $ref: '#/components/schemas/Happyhorse10VideoCreateRequest'
              - $ref: '#/components/schemas/KlingV3VideoCreateRequest'
              - $ref: '#/components/schemas/KlingV3OmniVideoCreateRequest'
              - $ref: '#/components/schemas/KlingVideoRequest'
              - $ref: '#/components/schemas/ViduVideoRequest'
              - $ref: '#/components/schemas/PixverseVideoCreateRequest'
              - $ref: '#/components/schemas/VeoVideoCreateRequest'
              - $ref: '#/components/schemas/MiniMaxVideosCreateRequest'
              discriminator:
                propertyName: model
                mapping:
                  MiniMax-Hailuo-02: '#/components/schemas/MiniMaxVideosCreateRequest'
                  MiniMax-Hailuo-2.3: '#/components/schemas/MiniMaxVideosCreateRequest'
                  MiniMax-Hailuo-2.3-Fast: '#/components/schemas/MiniMaxVideosCreateRequest'
                  happyhorse-1.0-i2v: '#/components/schemas/Happyhorse10I2VVideoCreateRequest'
                  happyhorse-1.0-r2v: '#/components/schemas/Happyhorse10R2VVideoCreateRequest'
                  happyhorse-1.0-t2v: '#/components/schemas/Happyhorse10T2VVideoCreateRequest'
                  happyhorse-1.0-video-edit: '#/components/schemas/Happyhorse10VideoEditVideoCreateRequest'
                  ima-pro: '#/components/schemas/ImaProVideoCreateRequest'
                  ima-pro-fast: '#/components/schemas/ImaProVideoCreateRequest'
                  kling-v1: '#/components/schemas/KlingVideoRequest'
                  kling-v1-6: '#/components/schemas/KlingVideoRequest'
                  kling-v2-1-master: '#/components/schemas/KlingVideoRequest'
                  kling-v2-5-turbo: '#/components/schemas/KlingVideoRequest'
                  kling-v2-6: '#/components/schemas/KlingVideoRequest'
                  kling-v2-master: '#/components/schemas/KlingVideoRequest'
                  kling-v3-omni-video: '#/components/schemas/KlingV3OmniVideoCreateRequest'
                  kling-v3-video: '#/components/schemas/KlingV3VideoCreateRequest'
                  kling-video-o1: '#/components/schemas/KlingVideoRequest'
                  pixverse-c1: '#/components/schemas/PixverseVideoCreateRequest'
                  pixverse-v6: '#/components/schemas/PixverseVideoCreateRequest'
                  seedance-2.0: '#/components/schemas/ImaProVideoCreateRequest'
                  seedance-2.0-cn: '#/components/schemas/ImaProVideoCreateRequest'
                  seedance-2.0-fast: '#/components/schemas/ImaProVideoCreateRequest'
                  seedance-2.0-fast-cn: '#/components/schemas/ImaProVideoCreateRequest'
                  veo-3.0-generate-001: '#/components/schemas/VeoVideoCreateRequest'
                  veo-3.1-fast-generate-001: '#/components/schemas/VeoVideoCreateRequest'
                  viduq1: '#/components/schemas/ViduVideoRequest'
                  viduq2: '#/components/schemas/ViduVideoRequest'
                  viduq2-pro: '#/components/schemas/ViduVideoRequest'
                  viduq2-turbo: '#/components/schemas/ViduVideoRequest'
                  viduq3-pro: '#/components/schemas/ViduVideoRequest'
                  viduq3-turbo: '#/components/schemas/ViduVideoRequest'
                  wan2.6-i2v: '#/components/schemas/Wan26I2VVideoCreateRequest'
                  wan2.6-i2v-flash: '#/components/schemas/Wan26I2VFlashVideoCreateRequest'
                  wan2.6-r2v: '#/components/schemas/Wan26R2VVideoCreateRequest'
                  wan2.6-t2v: '#/components/schemas/Wan26T2VVideoCreateRequest'
            examples:
              C01_text_fast:
                summary: 文生 Fast 720p
                description: '`seedance-2.0-fast` 文生视频显式分辨率示例。实测 `metadata.resolution=1080p` 会被上游返回 `Invalid parameters`，文生视频建议使用
                  `720p` 或 `480p`。'
                value:
                  model: seedance-2.0-fast
                  prompt: 清晨城市延时摄影，暖色调，电影感。
                  duration: 5
                  metadata:
                    resolution: 720p
              C01b_text_pro_1080p:
                summary: 文生 Pro 1080p
                description: '`seedance-2.0` 文生视频显式 1080p 分辨率示例。实测创建成功并进入 `in_progress`。'
                value:
                  model: seedance-2.0
                  prompt: 清晨城市延时摄影，暖色调，电影感。
                  duration: 5
                  metadata:
                    resolution: 1080p
              C01c_invalid_size_854x480:
                summary: 反例：854x480
                description: '`854x480` 会归一化为 `427:240`，不是精确 `16:9`，预期提交失败：`ratio is invalid: 427:240`。如需 480p 16:9，请使用 `848x480`
                  或 `metadata.resolution=480p`。'
                value:
                  model: seedance-2.0
                  prompt: 清晨城市延时摄影，暖色调，电影感。
                  duration: 4
                  size: 854x480
                  metadata:
                    audio: false
              C02_text_image_pro:
                summary: 单图图生
                value:
                  model: seedance-2.0
                  prompt: C02 单图基础示例（1图）
                  images:
                  - https://file.fashionlabs.cn/doc_image/r2v_tea_pic1.jpg
                  duration: 10
                  metadata:
                    aspect_ratio: '16:9'
                    audio: true
                    role_mode: reference
              C03_single_image_ref_pro:
                summary: 单图参考图
                description: 未传 `role_mode`，按默认 `reference_image` 处理。
                value:
                  model: seedance-2.0
                  prompt: C03 单图默认参考图（1图）
                  images:
                  - https://file.fashionlabs.cn/doc_image/r2v_tea_pic1.jpg
                  duration: 5
                  metadata:
                    aspect_ratio: '9:16'
                    role_mode: reference
              C04_single_image_ref_fast:
                summary: 单图首帧 Fast
                description: '`role_mode=frame`，单图按 `first_frame` 处理。'
                value:
                  model: seedance-2.0-fast
                  prompt: C04 单图显式首帧（1图，fast）
                  images:
                  - https://file.fashionlabs.cn/doc_image/r2v_tea_pic1.jpg
                  duration: 10
                  metadata:
                    role_mode: frame
                    aspect_ratio: '21:9'
              C05_two_images_ref_pro:
                summary: 双图参考图
                description: '未传 `role_mode`，两图按 `reference_image + reference_image` 处理。

                  '
                value:
                  model: seedance-2.0
                  prompt: C05 两图默认参考图（2图）
                  images:
                  - https://dev-jiman.oss-cn-hangzhou.aliyuncs.com/jm/20260316/ac5fe9ec6640426bafd6200b254b4b5f.png
                  - https://dev-jiman.oss-cn-hangzhou.aliyuncs.com/jm/20260316/321175f98af24025b835debeb18002cc.png
                  duration: 5
                  metadata:
                    aspect_ratio: '16:9'
                    role_mode: reference
              C06_two_images_ref_fast:
                summary: 首尾帧 Fast
                description: '`role_mode=frame`，两图按 `first_frame + last_frame` 处理。

                  '
                value:
                  model: seedance-2.0-fast
                  prompt: C06 两图显式首尾帧（2图，fast）
                  images:
                  - https://dev-jiman.oss-cn-hangzhou.aliyuncs.com/jm/20260316/ac5fe9ec6640426bafd6200b254b4b5f.png
                  - https://dev-jiman.oss-cn-hangzhou.aliyuncs.com/jm/20260316/321175f98af24025b835debeb18002cc.png
                  duration: 15
                  metadata:
                    role_mode: frame
                    aspect_ratio: '4:3'
              C07_text_video_pro:
                summary: 参考视频
                value:
                  model: seedance-2.0
                  duration: 10
                  metadata:
                    aspect_ratio: '16:9'
                    reference_video_urls:
                    - https://file.fashionlabs.cn/doc_video/r2v_tea_video1.mp4
              C08_text_image_audio_pro:
                summary: 图片+音频
                value:
                  model: seedance-2.0
                  images:
                  - https://file.fashionlabs.cn/doc_image/r2v_tea_pic1.jpg
                  duration: 10
                  metadata:
                    aspect_ratio: '16:9'
                    audio: true
                    reference_audio_urls:
                    - https://file.fashionlabs.cn/doc_audio/r2v_tea_audio1.mp3
              C09_text_image_video_pro:
                summary: 图片+视频
                value:
                  model: seedance-2.0
                  images:
                  - https://file.fashionlabs.cn/doc_image/r2v_tea_pic1.jpg
                  duration: 10
                  metadata:
                    aspect_ratio: '16:9'
                    reference_video_urls:
                    - https://file.fashionlabs.cn/doc_video/r2v_tea_video1.mp4
              C10_text_video_audio_pro:
                summary: 视频+音频
                value:
                  model: seedance-2.0
                  duration: 10
                  metadata:
                    aspect_ratio: '16:9'
                    audio: true
                    reference_video_urls:
                    - https://file.fashionlabs.cn/doc_video/r2v_tea_video1.mp4
                    reference_audio_urls:
                    - https://file.fashionlabs.cn/doc_audio/r2v_tea_audio1.mp3
              C11_text_image_video_audio_pro:
                summary: 图片+视频+音频
                value:
                  model: seedance-2.0
                  images:
                  - https://file.fashionlabs.cn/doc_image/r2v_tea_pic1.jpg
                  duration: 10
                  metadata:
                    aspect_ratio: '16:9'
                    audio: true
                    reference_video_urls:
                    - https://file.fashionlabs.cn/doc_video/r2v_tea_video1.mp4
                    reference_audio_urls:
                    - https://file.fashionlabs.cn/doc_audio/r2v_tea_audio1.mp3
              C12_text_portrait_video_audio_pro:
                summary: 人像+视频+音频
                description: '人像参考图场景示例：

                  - 第一张为公网普通参考图 URL（非人像图）

                  - 第二张为素材库人像协议 `asset://asset-20260319150455-wmb65`

                  - 参考音频使用 15 秒样例（上限 15 秒）

                  - 参考视频最多 3 条，且总时长不超过 15 秒

                  - 严重提醒：使用 `asset://...` 人像协议前，必须确认素材创建时的 `model` 与当前视频模型同渠道；国内视频模型配 `ima-pro-upload-cn`，海外视频模型配 `seedance-upload`，混用会导致协议调用失败

                  两张图片均按 `reference_image` 语义处理。

                  '
                value:
                  model: seedance-2.0
                  prompt: 15秒电影级环球旅行MV，两位主角全程面向镜头，丝滑转场串联多地标。
                  images:
                  - https://ima-ga.esxscloud.com/aiagent/src/d/20260209/in/1770621940910426538_0.png
                  - asset://asset-20260319150455-wmb65
                  duration: 15
                  metadata:
                    aspect_ratio: '16:9'
                    audio: true
                    role_mode: reference
                    reference_video_urls:
                    - https://file2.fashionlabs.cn/aiagent/src/d/20260319/in/ac45807a51f68c21556b7872827a4569.mp4
                    reference_audio_urls:
                    - https://file2.fashionlabs.cn/aiagent/src/d510cae243c24eafcfadf3a9e3b6c6ad_%5Bcut_15sec%5D.mp3
              C13_ref_video_pixel_too_low_negative_case:
                summary: 反例：视频像素不足
                description: '该示例用于演示常见失败场景（参数错误）：

                  - 参考视频画面像素（宽×高）必须在 `[409600,927408]` 范围内

                  - 当参考视频像素低于 `409600`（例如低于 `640x640`）时，任务会失败并出现错误码 `601300`

                  - 参考视频最多 3 条，且总时长 `<=15s`

                  '
                value:
                  model: seedance-2.0
                  prompt: 反例演示：参考视频像素不足会触发 601300
                  images:
                  - asset://asset-20260319150455-wmb65
                  duration: 10
                  metadata:
                    aspect_ratio: '16:9'
                    audio: true
                    role_mode: reference
                    reference_video_urls:
                    - https://dev-jiman.oss-cn-hangzhou.aliyuncs.com/jm/20260323/6788a25956614761b77f99005080cbe0.mp4
                    reference_audio_urls:
                    - https://file2.fashionlabs.cn/aiagent/src/d510cae243c24eafcfadf3a9e3b6c6ad_%5Bcut_15sec%5D.mp3
              C14_music_copyright_risk_no_bgm:
                summary: 版权风险：无背景音乐
                description: '当素材/诉求可能触发音乐版权争议时，建议先用“无背景音乐”方案进行验证：

                  - `metadata.audio=false`（先不加背景音乐）

                  - 提示词明确“无字幕、无背景音乐”

                  - 仅保留剧情人声、环境音效、动作音效

                  '
                value:
                  model: seedance-2.0
                  prompt: 全程无字幕、无背景音乐，仅保留三类清晰声音——剧情人声（清晰可辨，无杂音、无失真）、环境音效（贴合场景，自然不突兀）、动作音效（贴合人物细微动作，真实细腻）。
                  images:
                  - https://ark-project.tos-cn-beijing.volces.com/doc_image/r2v_tea_pic2.jpg
                  duration: 10
                  metadata:
                    aspect_ratio: '16:9'
                    audio: false
              C15_text_asset_video_pro:
                summary: 视频人像协议
                description: '视频人像协议示例：

                  - `metadata.reference_video_urls` 可直接传素材库视频人像协议 `asset://asset-20260416161659-z97x5`

                  - 该素材应先通过 `/v1/assets/create` 以 `asset_type=Video` 创建并审核通过

                  - 视频人像素材按参考视频语义处理，不放入 `images`

                  - 严重提醒：使用 `asset://...` 人像协议前，必须确认素材创建时的 `model` 与当前视频模型同渠道；国内视频模型配 `ima-pro-upload-cn`，海外视频模型配 `seedance-upload`，混用会导致协议调用失败

                  - 素材协议仅用于提交时引用，请确认该 `asset://...` 属于当前调用 SK 对应用户且提交时可访问

                  '
                value:
                  model: seedance-2.0
                  prompt: 使用视频素材作为参考，生成一段同风格的电影感短片，保持镜头节奏自然。
                  duration: 10
                  metadata:
                    aspect_ratio: '16:9'
                    audio: true
                    reference_video_urls:
                    - asset://asset-20260416161659-z97x5
              C16_text_image_asset_audio_pro:
                summary: 音频人像协议
                description: '音频人像协议示例：

                  - `metadata.reference_audio_urls` 可直接传素材库音频人像协议 `asset://asset-20260409133902-bz4kq`

                  - 该素材应先通过 `/v1/assets/create` 以 `asset_type=Audio` 创建、审核通过，并且属于当前调用 SK 对应用户

                  - 音频人像素材按参考音频语义处理；图片参考仍放入 `images`

                  - 注意：使用音频人像协议时，`images` 或 `metadata.reference_video_urls` 至少需要提供一个

                  - 该示例使用“文本+图片+音频”组合，避免纯文本+音频导致上游参数不合法

                  - 严重提醒：使用 `asset://...` 人像协议前，必须确认素材创建时的 `model` 与当前视频模型同渠道；国内视频模型配 `ima-pro-upload-cn`，海外视频模型配 `seedance-upload`，混用会导致协议调用失败

                  - 素材协议仅用于提交时引用，请确认该 `asset://...` 属于当前调用 SK 对应用户且提交时可访问

                  '
                value:
                  model: seedance-2.0
                  prompt: 使用音频素材作为参考，生成一段节奏匹配、氛围一致的电影感短片。
                  images:
                  - https://ima-ga.esxscloud.com/upload/1775559248448_433.png
                  duration: 10
                  metadata:
                    aspect_ratio: '16:9'
                    audio: true
                    reference_audio_urls:
                    - asset://asset-20260409133902-bz4kq
              wan26_wan26_t2v_720p_5s:
                summary: wan2.6-t2v 文生视频
                value:
                  model: wan2.6-t2v
                  prompt: 清晨城市延时摄影，暖色调，电影感。
                  duration: 5
                  size: 720P
              wan26_wan26_i2v_flash_audio:
                summary: wan2.6-i2v-flash 有声图生视频
                value:
                  model: wan2.6-i2v-flash
                  prompt: 让照片中的猫在草地上奔跑
                  images:
                  - https://example.com/cat.png
                  duration: 10
                  size: 1080P
                  audio: true
              wan26_wan26_i2v_audio:
                summary: wan2.6-i2v 有声图生视频
                value:
                  model: wan2.6-i2v
                  prompt: 让参考图中的人物自然转身看向镜头
                  images:
                  - https://example.com/person.png
                  duration: 5
                  size: 720P
              wan26_wan26_r2v_reference_image:
                summary: wan2.6-r2v 参考图生视频
                value:
                  model: wan2.6-r2v
                  prompt: 按参考图主体生成电影感镜头
                  images:
                  - https://example.com/reference.png
                  duration: 10
                  size: 1080P
              wan26_wan26_r2v_reference_video:
                summary: wan2.6-r2v 参考视频生视频
                value:
                  model: wan2.6-r2v
                  prompt: 保持参考视频节奏和风格，生成相似镜头
                  duration: 5
                  size: 720P
                  reference_video_urls:
                  - https://example.com/reference.mp4
              happyhorse_happyhorse_t2v_8s_720p:
                summary: HappyHorse 文生视频（8s / 720P）
                value:
                  model: happyhorse-1.0-t2v
                  prompt: A luminous futuristic horse runs through a neon city street with cinematic motion.
                  duration: 8
                  size: 720P
                  aspect_ratio: '1:1'
                  seed: 42
              happyhorse_happyhorse_t2v_15s_1080p:
                summary: HappyHorse 文生视频（15s / 1080P）
                value:
                  model: happyhorse-1.0-t2v
                  prompt: A white horse races along a sunset coastline in slow motion with dramatic light.
                  duration: 15
                  size: 1080P
                  aspect_ratio: '16:9'
              happyhorse_happyhorse_i2v_first_frame_8s_720p:
                summary: HappyHorse 图生视频（image / 8s / 720P）
                value:
                  model: happyhorse-1.0-i2v
                  image: https://cdn.example.com/input/horse.png
                  prompt: Animate the horse with subtle cinematic forward motion and natural mane movement.
                  duration: 8
                  size: 720P
                  seed: 42
              happyhorse_happyhorse_i2v_media_5s_1080p:
                summary: HappyHorse 图生视频（media / 5s / 1080P）
                value:
                  model: happyhorse-1.0-i2v
                  media:
                  - type: first_frame
                    url: https://cdn.example.com/input/horse-first-frame.png
                  duration: 5
                  size: 1080P
              happyhorse_happyhorse_r2v_references_8s_720p:
                summary: HappyHorse 参考图生视频（reference_image_urls / 8s / 720P）
                value:
                  model: happyhorse-1.0-r2v
                  prompt: Animate the same character references into a cinematic running shot.
                  reference_image_urls:
                  - https://cdn.example.com/input/horse-reference-a.png
                  - https://cdn.example.com/input/horse-reference-b.png
                  duration: 8
                  size: 720P
                  aspect_ratio: '9:16'
                  seed: 42
              happyhorse_happyhorse_r2v_media_5s_1080p:
                summary: HappyHorse 参考图生视频（media / 5s / 1080P）
                value:
                  model: happyhorse-1.0-r2v
                  prompt: Keep the character identity consistent while changing the background to a studio scene.
                  media:
                  - type: reference_image
                    url: https://cdn.example.com/input/horse-reference.png
                  duration: 5
                  size: 1080P
              happyhorse_happyhorse_video_edit_video_url_1080p:
                summary: HappyHorse 视频编辑（video_url / 1080P）
                value:
                  model: happyhorse-1.0-video-edit
                  prompt: Keep the main subject while replacing the scene with a clean studio background.
                  video_url: https://cdn.example.com/input/happyhorse-source.mp4
                  reference_image_urls:
                  - https://cdn.example.com/input/happyhorse-reference.png
                  size: 1080P
                  audio_setting: auto
                  seed: 42
              happyhorse_happyhorse_video_edit_media_720p:
                summary: HappyHorse 视频编辑（media / 720P）
                value:
                  model: happyhorse-1.0-video-edit
                  prompt: Preserve the main subject and apply a clean editorial color grade.
                  media:
                  - type: video
                    url: https://cdn.example.com/input/happyhorse-source.mp4
                  - type: reference_image
                    url: https://cdn.example.com/input/happyhorse-reference.png
                  size: 720P
                  audio_setting: origin
              kling_v3_video_kling_v3_video_text_std_noaudio:
                summary: Kling v3 Video 文生视频 std/无音频
                value:
                  model: kling-v3-video
                  prompt: A cinematic tracking shot of a horse running through rain at night.
                  duration: 5
                  aspect_ratio: '16:9'
                  mode: std
                  sound: 'off'
              kling_v3_video_kling_v3_video_image_pro_audio:
                summary: Kling v3 Video 图生视频 pro/有音频
                value:
                  model: kling-v3-video
                  prompt: Animate this reference into a smooth camera push-in.
                  image: https://cdn.example.com/input/kling-reference.png
                  duration: 8
                  aspect_ratio: '9:16'
                  mode: pro
                  sound: 'on'
              kling_v3_video_kling_v3_video_first_last_frame:
                summary: Kling v3 Video 首尾帧
                value:
                  model: kling-v3-video
                  prompt: Create a fluid transition from the first frame to the last frame.
                  images:
                  - https://cdn.example.com/input/kling-first-frame.png
                  - https://cdn.example.com/input/kling-last-frame.png
                  duration: 6
                  aspect_ratio: '16:9'
                  mode: std
                  sound: 'off'
              kling_v3_video_kling_v3_video_reference_images:
                summary: Kling v3 Video 主体 element 引用
                value:
                  model: kling-v3-video
                  prompt: Keep the same subject identity and generate a cinematic action shot.
                  element_list:
                  - element_id: 12345
                  duration: 10
                  aspect_ratio: '1:1'
                  mode: pro
                  sound: 'off'
              kling_v3_omni_video_kling_v3_omni_text_std_noaudio:
                summary: Kling v3 Omni Video 文生视频 std/无音频
                value:
                  model: kling-v3-omni-video
                  prompt: A cinematic shot of a glass sculpture forming from light.
                  duration: 5
                  aspect_ratio: '16:9'
                  mode: std
                  sound: 'off'
              kling_v3_omni_video_kling_v3_omni_text_pro_audio_no_voice:
                summary: Kling v3 Omni Video 文生视频 pro/有音频无语音
                value:
                  model: kling-v3-omni-video
                  prompt: A neon city sequence with ambient rain and distant traffic sound.
                  duration: 8
                  aspect_ratio: '16:9'
                  mode: pro
                  sound: 'on'
              kling_v3_omni_video_kling_v3_omni_reference_images:
                summary: Kling v3 Omni Video 参考图
                value:
                  model: kling-v3-omni-video
                  prompt: Preserve the character identity and generate a polished product-style clip.
                  image_list:
                  - https://cdn.example.com/input/kling-ref-a.png
                  - https://cdn.example.com/input/kling-ref-b.png
                  duration: 10
                  mode: pro
                  sound: 'off'
              kling_v3_omni_video_kling_v3_omni_reference_video:
                summary: Kling v3 Omni Video 参考视频 std/无音频
                value:
                  model: kling-v3-omni-video
                  prompt: Use the source video as motion reference and generate a cleaner cinematic version.
                  video_list:
                  - video_url: https://cdn.example.com/input/kling-reference-video.mp4
                  duration: 7
                  mode: std
                  sound: 'off'
              kling_kling_v1_6_text2video:
                summary: Kling v1.6 文生视频
                value:
                  model: kling-v1-6
                  prompt: A cat playing with a ball of yarn in a sunny room
                  duration: 5
                  aspect_ratio: '16:9'
                  mode: std
                  cfg_scale: 0.5
              kling_kling_v2_5_image2video:
                summary: Kling v2.5 图生视频首尾帧
                value:
                  model: kling-v2-5-turbo
                  prompt: Smooth transition between two scenes
                  image: https://example.com/first_frame.jpg
                  image_tail: https://example.com/last_frame.jpg
                  duration: 5
                  aspect_ratio: '16:9'
                  mode: pro
                  cfg_scale: 0.5
              vidu_viduq1_text2video:
                summary: viduq1 文生视频（1080P/5s）
                value:
                  model: viduq1
                  prompt: A golden retriever running on a sunny beach with waves crashing in the background
              vidu_viduq2_text2video_720p:
                summary: viduq2 文生视频（720P/5s）
                value:
                  model: viduq2
                  prompt: A cinematic drone shot above a quiet lake at sunrise
                  duration: 5
                  metadata:
                    resolution: 720p
              vidu_viduq2pro_img2video:
                summary: viduq2-pro 图生视频（单图参考）
                value:
                  model: viduq2-pro
                  prompt: The person slowly turns and smiles
                  images:
                  - https://example.com/reference.jpg
                  duration: 5
              vidu_viduq3pro_text2video:
                summary: viduq3-pro 文生视频（720P/10s）
                value:
                  model: viduq3-pro
                  prompt: A cat playing with a ball of yarn in a cozy room with warm lighting
                  duration: 10
                  metadata:
                    resolution: 720p
              pixverse_pixverse_c1_text_720p:
                summary: Pixverse C1 文生 720p
                value:
                  model: pixverse-c1
                  prompt: A cinematic city street at night with neon reflections
                  duration: 5
                  size: '16:9'
                  quality: 720p
              pixverse_pixverse_v6_text_audio:
                summary: Pixverse V6 文生 1080p 有声
                value:
                  model: pixverse-v6
                  prompt: A slow push-in shot of a product on a clean studio table
                  duration: 5
                  size: '9:16'
                  quality: 1080p
                  metadata:
                    audio: true
              veo_veo30_text_720p:
                summary: Veo 3.0 文生 720p
                value:
                  model: veo-3.0-generate-001
                  prompt: A cinematic drone shot over a coastal city at sunrise
                  duration: 4
                  resolution: 720p
                  aspectRatio: '16:9'
              veo_veo31_fast_text_1080p:
                summary: Veo 3.1 Fast 文生 1080p
                value:
                  model: veo-3.1-fast-generate-001
                  prompt: A vertical fashion runway clip with smooth camera motion
                  durationSeconds: 8
                  resolution: 1080p
                  aspectRatio: '9:16'
              minimax_hailuo_02_text2video:
                summary: MiniMax-Hailuo-02 文生视频
                value:
                  model: MiniMax-Hailuo-02
                  prompt: A cat playing with a ball of yarn
                  duration: 6
                  size: 1080p
              minimax_hailuo_23_text2video:
                summary: MiniMax-Hailuo-2.3 文生视频
                value:
                  model: MiniMax-Hailuo-2.3
                  prompt: A cinematic drone shot above a quiet lake at sunrise
                  duration: 6
                  size: 1080p
              minimax_hailuo_fast_img2video:
                summary: MiniMax-Hailuo-2.3-Fast 图生视频
                value:
                  model: MiniMax-Hailuo-2.3-Fast
                  prompt: A gentle camera movement over a cup of tea
                  duration: 6
                  size: 1080p
                  metadata:
                    first_frame_image: https://example.com/photo.jpeg
      responses:
        '200':
          description: 任务提交成功
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ImaProCreateResponse'
                - $ref: '#/components/schemas/VideoTaskResponse'
              examples:
                创建成功:
                  value:
                    id: task_202603131631387ETKUBM91MTD72X9
                    task_id: task_202603131631387ETKUBM91MTD72X9
                    object: video
                    model: seedance-2.0-fast
                    status: ''
                    progress: 0
                    created_at: 1773395498
                角色图场景图_创建成功:
                  summary: 对应“两图（角色+场景）非首尾帧”请求
                  value:
                    id: task_kfOFFyhQAA1kGTnfdvhcMvhq7K1zIfZ4
                    task_id: task_kfOFFyhQAA1kGTnfdvhcMvhq7K1zIfZ4
                    object: video
                    model: seedance-2.0
                    status: in_progress
                    progress: 0
                    created_at: 1773561120
                wan26_wan26_video_task_submitted:
                  summary: 任务已受理
                  value:
                    id: task_wan26_202604250001
                    task_id: task_wan26_202604250001
                    object: video
                    model: wan2.6-t2v
                    status: in_progress
                    progress: 0
                    created_at: 1777100000
                happyhorse_happyhorse_video_task_submitted:
                  summary: 任务已受理
                  value:
                    id: task_happyhorse_202604270001
                    task_id: task_happyhorse_202604270001
                    object: video
                    model: happyhorse-1.0-t2v
                    status: in_progress
                    progress: 0
                    created_at: 1777200000
                happyhorse_happyhorse_i2v_task_submitted:
                  summary: 图生视频任务已受理
                  value:
                    id: task_happyhorse_i2v_202604270001
                    task_id: task_happyhorse_i2v_202604270001
                    object: video
                    model: happyhorse-1.0-i2v
                    status: in_progress
                    progress: 0
                    created_at: 1777200000
                happyhorse_happyhorse_r2v_task_submitted:
                  summary: 参考图生视频任务已受理
                  value:
                    id: task_happyhorse_r2v_202604270001
                    task_id: task_happyhorse_r2v_202604270001
                    object: video
                    model: happyhorse-1.0-r2v
                    status: in_progress
                    progress: 0
                    created_at: 1777200000
                happyhorse_happyhorse_video_edit_task_submitted:
                  summary: 视频编辑任务已受理
                  value:
                    id: task_happyhorse_video_edit_202604270001
                    task_id: task_happyhorse_video_edit_202604270001
                    object: video
                    model: happyhorse-1.0-video-edit
                    status: in_progress
                    progress: 0
                    created_at: 1777200000
                kling_v3_video_kling_v3_video_task_submitted:
                  summary: 任务已受理
                  value:
                    id: task_kling_v3_video_202604270001
                    task_id: task_kling_v3_video_202604270001
                    object: video
                    model: kling-v3-video
                    status: in_progress
                    progress: 0
                    created_at: 1777200000
                kling_v3_omni_video_kling_v3_omni_task_submitted:
                  summary: 任务已受理
                  value:
                    id: task_kling_v3_omni_202604270001
                    task_id: task_kling_v3_omni_202604270001
                    object: video
                    model: kling-v3-omni-video
                    status: in_progress
                    progress: 0
                    created_at: 1777200000
                kling_kling_task_submitted:
                  summary: 任务已受理
                  value:
                    id: task_kling_202605220001
                    task_id: task_kling_202605220001
                    object: video
                    model: kling-v1-6
                    status: in_progress
                    progress: 0
                    created_at: 1779400000
                vidu_vidu_task_submitted:
                  summary: 任务已受理
                  value:
                    id: task_vidu_202605220001
                    task_id: task_vidu_202605220001
                    object: video
                    model: viduq3-pro
                    status: in_progress
                    progress: 0
                    created_at: 1779400000
                pixverse_pixverse_task_submitted:
                  summary: Pixverse 返回任务 ID
                  value:
                    id: task_pixverse_202605220001
                    task_id: task_pixverse_202605220001
                    object: video
                    model: pixverse-v6
                    status: in_progress
                    progress: 0
                    created_at: 1779400000
                veo_veo_task_submitted:
                  summary: Veo 返回任务 ID
                  value:
                    id: task_veo_202605220001
                    task_id: task_veo_202605220001
                    object: video
                    model: veo-3.1-fast-generate-001
                    status: in_progress
                    progress: 0
                    created_at: 1779400000
        '400':
          description: 参数错误或任务创建请求不合法
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/TaskErrorResponse'
                - $ref: '#/components/schemas/ErrorResponse'
              examples:
                缺少模型:
                  value:
                    code: missing_model
                    message: model field is required
                    data: null
                文本组合缺少提示词:
                  value:
                    code: invalid_request
                    message: prompt is required
                    data: null
                文本内容缺失: 需要文本内容
                任务ID为空:
                  value:
                    code: '500'
                    message: status_code=500, task_id is empty
                    data: null
                role_mode非法:
                  value:
                    code: invalid_request
                    message: metadata.role_mode must be one of [reference, frame]
                    data: null
                图片模型误用视频端点:
                  value:
                    code: invalid_model_endpoint
                    message: image generation models are not supported on /v1/videos
                    data: null
                frame模式与参考媒体冲突:
                  value:
                    code: invalid_request
                    message: frame mode cannot be mixed with reference video/audio
                    data: null
                视频像素超限:
                  value:
                    code: '500'
                    message: the parameter video pixel count specified in the request must be less than or equal to 927408
                    data: null
                暂不支持人像:
                  value:
                    code: '500'
                    message: 暂不支持人像
                    data: null
                参考音频超时长:
                  value:
                    code: invalid_request
                    message: reference audio duration must be <= 15s
                    data: null
                三条参考视频总时长超限:
                  value:
                    code: invalid_request
                    message: total duration of reference videos must be <= 15s
                    data: null
                MiniMaxFast分辨率不支持720p:
                  value:
                    code: '2013'
                    message: 'hailuo api error: invalid params, model MiniMax-Hailuo-2.3-Fast does not support resolution
                      720P, supported resolutions: 768P, 1080P'
                    data: null
                wan26_invalid_duration:
                  value:
                    code: invalid_request
                    message: duration must be one of [5 10 15] for wan2.6-t2v
                    data: null
                wan26_missing_price:
                  value:
                    code: invalid_request
                    message: wan2.6 video pricing sku is not configured
                    data: null
                happyhorse_invalid_duration:
                  summary: 不支持的时长
                  value:
                    code: invalid_request
                    message: duration must be one of [3 4 5 6 7 8 9 10 11 12 13 14 15] for happyhorse-1.0-t2v
                    data: null
                happyhorse_invalid_i2v_media:
                  summary: 图生视频图片输入不合法
                  value:
                    code: invalid_request
                    message: happyhorse-1.0-i2v supports at most 1 image input
                    data: null
                happyhorse_invalid_r2v_media:
                  summary: 参考图输入不合法
                  value:
                    code: invalid_request
                    message: happyhorse-1.0-r2v supports at most 9 reference images
                    data: null
                happyhorse_invalid_video_edit_media:
                  summary: 视频编辑输入不合法
                  value:
                    code: invalid_request
                    message: happyhorse-1.0-video-edit supports at most 5 reference images
                    data: null
                happyhorse_invalid_video_edit_prompt:
                  summary: 缺少视频编辑提示词
                  value:
                    code: invalid_request
                    message: prompt is required for happyhorse-1.0-video-edit
                    data: null
                happyhorse_invalid_watermark:
                  summary: 水印参数不对外开放
                  value:
                    code: invalid_request
                    message: happyhorse-1.0-r2v watermark is not supported
                    data: null
                happyhorse_missing_price:
                  summary: 缺少模型配置
                  value:
                    code: invalid_request
                    message: happyhorse video configuration is unavailable
                    data: null
                kling_v3_video_invalid_duration:
                  summary: 不支持的时长
                  value:
                    code: invalid_request
                    message: duration must be one of [3 4 5 6 7 8 9 10 11 12 13 14 15] for kling-v3-video
                    data: null
                kling_v3_video_invalid_mode:
                  summary: 不支持的模式
                  value:
                    code: invalid_request
                    message: kling-v3-video mode must be one of [pro std]
                    data: null
                kling_v3_video_missing_price:
                  summary: 缺少模型配置
                  value:
                    code: invalid_request
                    message: model configuration is unavailable
                    data: null
                kling_v3_omni_video_invalid_duration:
                  summary: 不支持的时长
                  value:
                    code: invalid_request
                    message: duration must be one of [3 4 5 6 7 8 9 10 11 12 13 14 15] for kling-v3-omni-video
                    data: null
                kling_v3_omni_video_invalid_sound_reference_video:
                  summary: 有声与参考视频互斥
                  value:
                    code: invalid_request
                    message: kling-v3-omni-video sound=on cannot be combined with video_list or video_url reference video
                    data: null
                kling_v3_omni_video_invalid_motion_control_duration:
                  summary: 参考视频时长超限
                  value:
                    code: invalid_request
                    message: kling-v3-omni-video video_url or video_list motion_control duration must not exceed 10 seconds
                    data: null
                kling_v3_omni_video_missing_price:
                  summary: 缺少模型配置
                  value:
                    code: invalid_request
                    message: exact per-call pricing sku is not configured
                    data: null
                kling_image_pixel_invalid:
                  summary: 输入图片像素不合法
                  value:
                    code: '500'
                    message: Image pixel is invalid
                    data: null
                vidu_model_not_supported:
                  summary: 仅图生视频模型发送纯文本
                  value:
                    code: invalid_request
                    message: model viduq2-pro only supports image-to-video, please provide images
                    data: null
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                未提供token:
                  value:
                    error:
                      code: ''
                      message: token not provided
                      type: new_api_error
                token不可用:
                  value:
                    error:
                      code: ''
                      message: token status is unavailable
                      type: new_api_error
        '500':
          description: 上游创建任务失败或服务内部错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
              examples:
                任务创建失败: 任务创建失败
                任务创建失败_taskid为空: 任务创建失败_taskid 为空
                任务创建失败_像素超限: 任务创建失败_像素超限
                任务创建失败_暂不支持人像: 任务创建失败_暂不支持人像
      x-codeSamples:
      - lang: curl-c01-text-fast
        label: 文生 Fast 720p
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0-fast\",\n  \"prompt\"\
          : \"清晨城市延时摄影，暖色调，电影感。\",\n  \"duration\": 5,\n  \"metadata\": {\n    \"resolution\": \"720p\"\n  }\n}'"
      - lang: curl-c01b-text-pro-1080p
        label: 文生 Pro 1080p
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"prompt\"\
          : \"清晨城市延时摄影，暖色调，电影感。\",\n  \"duration\": 5,\n  \"metadata\": {\n    \"resolution\": \"1080p\"\n  }\n}'"
      - lang: curl-c01c-invalid-size-854x480
        label: 反例：854x480
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"prompt\"\
          : \"清晨城市延时摄影，暖色调，电影感。\",\n  \"duration\": 4,\n  \"size\": \"854x480\",\n  \"metadata\": {\n    \"audio\": false\n\
          \  }\n}'"
      - lang: curl-c02-text-image-pro
        label: 单图图生
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"prompt\"\
          : \"C02 单图基础示例（1图）\",\n  \"images\": [\n    \"https://file.fashionlabs.cn/doc_image/r2v_tea_pic1.jpg\"\n  ],\n \
          \ \"duration\": 10,\n  \"metadata\": {\n    \"aspect_ratio\": \"16:9\",\n    \"audio\": true,\n    \"role_mode\"\
          : \"reference\"\n  }\n}'"
      - lang: curl-c03-single-image-ref-pro
        label: 单图参考图
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"prompt\"\
          : \"C03 单图默认参考图（1图）\",\n  \"images\": [\n    \"https://file.fashionlabs.cn/doc_image/r2v_tea_pic1.jpg\"\n  ],\n\
          \  \"duration\": 5,\n  \"metadata\": {\n    \"aspect_ratio\": \"9:16\",\n    \"role_mode\": \"reference\"\n  }\n\
          }'"
      - lang: curl-c04-single-image-ref-fast
        label: 单图首帧 Fast
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0-fast\",\n  \"prompt\"\
          : \"C04 单图显式首帧（1图，fast）\",\n  \"images\": [\n    \"https://file.fashionlabs.cn/doc_image/r2v_tea_pic1.jpg\"\n  ],\n\
          \  \"duration\": 10,\n  \"metadata\": {\n    \"role_mode\": \"frame\",\n    \"aspect_ratio\": \"21:9\"\n  }\n}'"
      - lang: curl-c05-two-images-ref-pro
        label: 双图参考图
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"prompt\"\
          : \"C05 两图默认参考图（2图）\",\n  \"images\": [\n    \"https://dev-jiman.oss-cn-hangzhou.aliyuncs.com/jm/20260316/ac5fe9ec6640426bafd6200b254b4b5f.png\"\
          ,\n    \"https://dev-jiman.oss-cn-hangzhou.aliyuncs.com/jm/20260316/321175f98af24025b835debeb18002cc.png\"\n  ],\n\
          \  \"duration\": 5,\n  \"metadata\": {\n    \"aspect_ratio\": \"16:9\",\n    \"role_mode\": \"reference\"\n  }\n\
          }'"
      - lang: curl-c06-two-images-ref-fast
        label: 首尾帧 Fast
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0-fast\",\n  \"prompt\"\
          : \"C06 两图显式首尾帧（2图，fast）\",\n  \"images\": [\n    \"https://dev-jiman.oss-cn-hangzhou.aliyuncs.com/jm/20260316/ac5fe9ec6640426bafd6200b254b4b5f.png\"\
          ,\n    \"https://dev-jiman.oss-cn-hangzhou.aliyuncs.com/jm/20260316/321175f98af24025b835debeb18002cc.png\"\n  ],\n\
          \  \"duration\": 15,\n  \"metadata\": {\n    \"role_mode\": \"frame\",\n    \"aspect_ratio\": \"4:3\"\n  }\n}'"
      - lang: curl-c07-text-video-pro
        label: 参考视频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"duration\"\
          : 10,\n  \"metadata\": {\n    \"aspect_ratio\": \"16:9\",\n    \"reference_video_urls\": [\n      \"https://file.fashionlabs.cn/doc_video/r2v_tea_video1.mp4\"\
          \n    ]\n  }\n}'"
      - lang: curl-c08-text-image-audio-pro
        label: 图片+音频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"images\"\
          : [\n    \"https://file.fashionlabs.cn/doc_image/r2v_tea_pic1.jpg\"\n  ],\n  \"duration\": 10,\n  \"metadata\":\
          \ {\n    \"aspect_ratio\": \"16:9\",\n    \"audio\": true,\n    \"reference_audio_urls\": [\n      \"https://file.fashionlabs.cn/doc_audio/r2v_tea_audio1.mp3\"\
          \n    ]\n  }\n}'"
      - lang: curl-c09-text-image-video-pro
        label: 图片+视频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"images\"\
          : [\n    \"https://file.fashionlabs.cn/doc_image/r2v_tea_pic1.jpg\"\n  ],\n  \"duration\": 10,\n  \"metadata\":\
          \ {\n    \"aspect_ratio\": \"16:9\",\n    \"reference_video_urls\": [\n      \"https://file.fashionlabs.cn/doc_video/r2v_tea_video1.mp4\"\
          \n    ]\n  }\n}'"
      - lang: curl-c10-text-video-audio-pro
        label: 视频+音频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"duration\"\
          : 10,\n  \"metadata\": {\n    \"aspect_ratio\": \"16:9\",\n    \"audio\": true,\n    \"reference_video_urls\": [\n\
          \      \"https://file.fashionlabs.cn/doc_video/r2v_tea_video1.mp4\"\n    ],\n    \"reference_audio_urls\": [\n \
          \     \"https://file.fashionlabs.cn/doc_audio/r2v_tea_audio1.mp3\"\n    ]\n  }\n}'"
      - lang: curl-c11-text-image-video-audio-pro
        label: 图片+视频+音频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"images\"\
          : [\n    \"https://file.fashionlabs.cn/doc_image/r2v_tea_pic1.jpg\"\n  ],\n  \"duration\": 10,\n  \"metadata\":\
          \ {\n    \"aspect_ratio\": \"16:9\",\n    \"audio\": true,\n    \"reference_video_urls\": [\n      \"https://file.fashionlabs.cn/doc_video/r2v_tea_video1.mp4\"\
          \n    ],\n    \"reference_audio_urls\": [\n      \"https://file.fashionlabs.cn/doc_audio/r2v_tea_audio1.mp3\"\n\
          \    ]\n  }\n}'"
      - lang: curl-c12-text-portrait-video-audio-pro
        label: 人像+视频+音频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"prompt\"\
          : \"15秒电影级环球旅行MV，两位主角全程面向镜头，丝滑转场串联多地标。\",\n  \"images\": [\n    \"https://ima-ga.esxscloud.com/aiagent/src/d/20260209/in/1770621940910426538_0.png\"\
          ,\n    \"asset://asset-20260319150455-wmb65\"\n  ],\n  \"duration\": 15,\n  \"metadata\": {\n    \"aspect_ratio\"\
          : \"16:9\",\n    \"audio\": true,\n    \"role_mode\": \"reference\",\n    \"reference_video_urls\": [\n      \"\
          https://file2.fashionlabs.cn/aiagent/src/d/20260319/in/ac45807a51f68c21556b7872827a4569.mp4\"\n    ],\n    \"reference_audio_urls\"\
          : [\n      \"https://file2.fashionlabs.cn/aiagent/src/d510cae243c24eafcfadf3a9e3b6c6ad_%5Bcut_15sec%5D.mp3\"\n \
          \   ]\n  }\n}'"
      - lang: curl-c13-ref-video-pixel-too-low-negative-case
        label: 反例：视频像素不足
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"prompt\"\
          : \"反例演示：参考视频像素不足会触发 601300\",\n  \"images\": [\n    \"asset://asset-20260319150455-wmb65\"\n  ],\n  \"duration\"\
          : 10,\n  \"metadata\": {\n    \"aspect_ratio\": \"16:9\",\n    \"audio\": true,\n    \"role_mode\": \"reference\"\
          ,\n    \"reference_video_urls\": [\n      \"https://dev-jiman.oss-cn-hangzhou.aliyuncs.com/jm/20260323/6788a25956614761b77f99005080cbe0.mp4\"\
          \n    ],\n    \"reference_audio_urls\": [\n      \"https://file2.fashionlabs.cn/aiagent/src/d510cae243c24eafcfadf3a9e3b6c6ad_%5Bcut_15sec%5D.mp3\"\
          \n    ]\n  }\n}'"
      - lang: curl-c14-music-copyright-risk-no-bgm
        label: 版权风险：无背景音乐
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"prompt\"\
          : \"全程无字幕、无背景音乐，仅保留三类清晰声音——剧情人声（清晰可辨，无杂音、无失真）、环境音效（贴合场景，自然不突兀）、动作音效（贴合人物细微动作，真实细腻）。\",\n  \"images\": [\n    \"\
          https://ark-project.tos-cn-beijing.volces.com/doc_image/r2v_tea_pic2.jpg\"\n  ],\n  \"duration\": 10,\n  \"metadata\"\
          : {\n    \"aspect_ratio\": \"16:9\",\n    \"audio\": false\n  }\n}'"
      - lang: curl-c15-text-asset-video-pro
        label: 视频人像协议
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"prompt\"\
          : \"使用视频素材作为参考，生成一段同风格的电影感短片，保持镜头节奏自然。\",\n  \"duration\": 10,\n  \"metadata\": {\n    \"aspect_ratio\": \"16:9\"\
          ,\n    \"audio\": true,\n    \"reference_video_urls\": [\n      \"asset://asset-20260416161659-z97x5\"\n    ]\n\
          \  }\n}'"
      - lang: curl-c16-text-image-asset-audio-pro
        label: 音频人像协议
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\",\n  \"prompt\"\
          : \"使用音频素材作为参考，生成一段节奏匹配、氛围一致的电影感短片。\",\n  \"images\": [\n    \"https://ima-ga.esxscloud.com/upload/1775559248448_433.png\"\
          \n  ],\n  \"duration\": 10,\n  \"metadata\": {\n    \"aspect_ratio\": \"16:9\",\n    \"audio\": true,\n    \"reference_audio_urls\"\
          : [\n      \"asset://asset-20260409133902-bz4kq\"\n    ]\n  }\n}'"
      - lang: curl-wan26-t2v-720p-5s
        label: wan2.6-t2v 文生视频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"wan2.6-t2v\",\n  \"prompt\": \"\
          清晨城市延时摄影，暖色调，电影感。\",\n  \"duration\": 5,\n  \"size\": \"720P\"\n}'"
      - lang: curl-wan26-i2v-flash-audio
        label: wan2.6-i2v-flash 有声图生视频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"wan2.6-i2v-flash\",\n  \"prompt\"\
          : \"让照片中的猫在草地上奔跑\",\n  \"images\": [\n    \"https://example.com/cat.png\"\n  ],\n  \"duration\": 10,\n  \"size\"\
          : \"1080P\",\n  \"audio\": true\n}'"
      - lang: curl-wan26-i2v-audio
        label: wan2.6-i2v 有声图生视频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"wan2.6-i2v\",\n  \"prompt\": \"\
          让参考图中的人物自然转身看向镜头\",\n  \"images\": [\n    \"https://example.com/person.png\"\n  ],\n  \"duration\": 5,\n  \"size\"\
          : \"720P\"\n}'"
      - lang: curl-wan26-r2v-reference-image
        label: wan2.6-r2v 参考图生视频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"wan2.6-r2v\",\n  \"prompt\": \"\
          按参考图主体生成电影感镜头\",\n  \"images\": [\n    \"https://example.com/reference.png\"\n  ],\n  \"duration\": 10,\n  \"size\"\
          : \"1080P\"\n}'"
      - lang: curl-wan26-r2v-reference-video
        label: wan2.6-r2v 参考视频生视频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"wan2.6-r2v\",\n  \"prompt\": \"\
          保持参考视频节奏和风格，生成相似镜头\",\n  \"duration\": 5,\n  \"size\": \"720P\",\n  \"reference_video_urls\": [\n    \"https://example.com/reference.mp4\"\
          \n  ]\n}'"
      - lang: curl-happyhorse-t2v-8s-720p
        label: HappyHorse 文生视频（8s / 720P）
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"happyhorse-1.0-t2v\",\n  \"prompt\"\
          : \"A luminous futuristic horse runs through a neon city street with cinematic motion.\",\n  \"duration\": 8,\n\
          \  \"size\": \"720P\",\n  \"aspect_ratio\": \"1:1\",\n  \"seed\": 42\n}'"
      - lang: curl-happyhorse-t2v-15s-1080p
        label: HappyHorse 文生视频（15s / 1080P）
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"happyhorse-1.0-t2v\",\n  \"prompt\"\
          : \"A white horse races along a sunset coastline in slow motion with dramatic light.\",\n  \"duration\": 15,\n \
          \ \"size\": \"1080P\",\n  \"aspect_ratio\": \"16:9\"\n}'"
      - lang: curl-happyhorse-i2v-first-frame-8s-720p
        label: HappyHorse 图生视频（image / 8s / 720P）
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"happyhorse-1.0-i2v\",\n  \"image\"\
          : \"https://cdn.example.com/input/horse.png\",\n  \"prompt\": \"Animate the horse with subtle cinematic forward\
          \ motion and natural mane movement.\",\n  \"duration\": 8,\n  \"size\": \"720P\",\n  \"seed\": 42\n}'"
      - lang: curl-happyhorse-i2v-media-5s-1080p
        label: HappyHorse 图生视频（media / 5s / 1080P）
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"happyhorse-1.0-i2v\",\n  \"media\"\
          : [\n    {\n      \"type\": \"first_frame\",\n      \"url\": \"https://cdn.example.com/input/horse-first-frame.png\"\
          \n    }\n  ],\n  \"duration\": 5,\n  \"size\": \"1080P\"\n}'"
      - lang: curl-happyhorse-r2v-references-8s-720p
        label: HappyHorse 参考图生视频（reference_image_urls / 8s / 720P）
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"happyhorse-1.0-r2v\",\n  \"prompt\"\
          : \"Animate the same character references into a cinematic running shot.\",\n  \"reference_image_urls\": [\n   \
          \ \"https://cdn.example.com/input/horse-reference-a.png\",\n    \"https://cdn.example.com/input/horse-reference-b.png\"\
          \n  ],\n  \"duration\": 8,\n  \"size\": \"720P\",\n  \"aspect_ratio\": \"9:16\",\n  \"seed\": 42\n}'"
      - lang: curl-happyhorse-r2v-media-5s-1080p
        label: HappyHorse 参考图生视频（media / 5s / 1080P）
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"happyhorse-1.0-r2v\",\n  \"prompt\"\
          : \"Keep the character identity consistent while changing the background to a studio scene.\",\n  \"media\": [\n\
          \    {\n      \"type\": \"reference_image\",\n      \"url\": \"https://cdn.example.com/input/horse-reference.png\"\
          \n    }\n  ],\n  \"duration\": 5,\n  \"size\": \"1080P\"\n}'"
      - lang: curl-happyhorse-video-edit-video-url-1080p
        label: HappyHorse 视频编辑（video_url / 1080P）
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"happyhorse-1.0-video-edit\",\n\
          \  \"prompt\": \"Keep the main subject while replacing the scene with a clean studio background.\",\n  \"video_url\"\
          : \"https://cdn.example.com/input/happyhorse-source.mp4\",\n  \"reference_image_urls\": [\n    \"https://cdn.example.com/input/happyhorse-reference.png\"\
          \n  ],\n  \"size\": \"1080P\",\n  \"audio_setting\": \"auto\",\n  \"seed\": 42\n}'"
      - lang: curl-happyhorse-video-edit-media-720p
        label: HappyHorse 视频编辑（media / 720P）
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"happyhorse-1.0-video-edit\",\n\
          \  \"prompt\": \"Preserve the main subject and apply a clean editorial color grade.\",\n  \"media\": [\n    {\n\
          \      \"type\": \"video\",\n      \"url\": \"https://cdn.example.com/input/happyhorse-source.mp4\"\n    },\n  \
          \  {\n      \"type\": \"reference_image\",\n      \"url\": \"https://cdn.example.com/input/happyhorse-reference.png\"\
          \n    }\n  ],\n  \"size\": \"720P\",\n  \"audio_setting\": \"origin\"\n}'"
      - lang: curl-kling-v3-video-text-std-noaudio
        label: Kling v3 Video 文生视频 std/无音频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v3-video\",\n  \"prompt\"\
          : \"A cinematic tracking shot of a horse running through rain at night.\",\n  \"duration\": 5,\n  \"aspect_ratio\"\
          : \"16:9\",\n  \"mode\": \"std\",\n  \"sound\": \"off\"\n}'"
      - lang: curl-kling-v3-video-image-pro-audio
        label: Kling v3 Video 图生视频 pro/有音频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v3-video\",\n  \"prompt\"\
          : \"Animate this reference into a smooth camera push-in.\",\n  \"image\": \"https://cdn.example.com/input/kling-reference.png\"\
          ,\n  \"duration\": 8,\n  \"aspect_ratio\": \"9:16\",\n  \"mode\": \"pro\",\n  \"sound\": \"on\"\n}'"
      - lang: curl-kling-v3-video-first-last-frame
        label: Kling v3 Video 首尾帧
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v3-video\",\n  \"prompt\"\
          : \"Create a fluid transition from the first frame to the last frame.\",\n  \"images\": [\n    \"https://cdn.example.com/input/kling-first-frame.png\"\
          ,\n    \"https://cdn.example.com/input/kling-last-frame.png\"\n  ],\n  \"duration\": 6,\n  \"aspect_ratio\": \"\
          16:9\",\n  \"mode\": \"std\",\n  \"sound\": \"off\"\n}'"
      - lang: curl-kling-v3-video-reference-images
        label: Kling v3 Video 主体 element 引用
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v3-video\",\n  \"prompt\"\
          : \"Keep the same subject identity and generate a cinematic action shot.\",\n  \"element_list\": [\n    {\n    \
          \  \"element_id\": 12345\n    }\n  ],\n  \"duration\": 10,\n  \"aspect_ratio\": \"1:1\",\n  \"mode\": \"pro\",\n\
          \  \"sound\": \"off\"\n}'"
      - lang: curl-kling-v3-omni-text-std-noaudio
        label: Kling v3 Omni Video 文生视频 std/无音频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v3-omni-video\",\n  \"prompt\"\
          : \"A cinematic shot of a glass sculpture forming from light.\",\n  \"duration\": 5,\n  \"aspect_ratio\": \"16:9\"\
          ,\n  \"mode\": \"std\",\n  \"sound\": \"off\"\n}'"
      - lang: curl-kling-v3-omni-text-pro-audio-no-voice
        label: Kling v3 Omni Video 文生视频 pro/有音频无语音
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v3-omni-video\",\n  \"prompt\"\
          : \"A neon city sequence with ambient rain and distant traffic sound.\",\n  \"duration\": 8,\n  \"aspect_ratio\"\
          : \"16:9\",\n  \"mode\": \"pro\",\n  \"sound\": \"on\"\n}'"
      - lang: curl-kling-v3-omni-reference-images
        label: Kling v3 Omni Video 参考图
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v3-omni-video\",\n  \"prompt\"\
          : \"Preserve the character identity and generate a polished product-style clip.\",\n  \"image_list\": [\n    \"\
          https://cdn.example.com/input/kling-ref-a.png\",\n    \"https://cdn.example.com/input/kling-ref-b.png\"\n  ],\n\
          \  \"duration\": 10,\n  \"mode\": \"pro\",\n  \"sound\": \"off\"\n}'"
      - lang: curl-kling-v3-omni-reference-video
        label: Kling v3 Omni Video 参考视频 std/无音频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v3-omni-video\",\n  \"prompt\"\
          : \"Use the source video as motion reference and generate a cleaner cinematic version.\",\n  \"video_list\": [\n\
          \    {\n      \"video_url\": \"https://cdn.example.com/input/kling-reference-video.mp4\"\n    }\n  ],\n  \"duration\"\
          : 7,\n  \"mode\": \"std\",\n  \"sound\": \"off\"\n}'"
      - lang: curl-kling-v1-6-text2video
        label: Kling v1.6 文生视频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v1-6\",\n  \"prompt\": \"\
          A cat playing with a ball of yarn in a sunny room\",\n  \"duration\": 5,\n  \"aspect_ratio\": \"16:9\",\n  \"mode\"\
          : \"std\",\n  \"cfg_scale\": 0.5\n}'"
      - lang: curl-kling-v2-5-image2video
        label: Kling v2.5 图生视频首尾帧
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v2-5-turbo\",\n  \"prompt\"\
          : \"Smooth transition between two scenes\",\n  \"image\": \"https://example.com/first_frame.jpg\",\n  \"image_tail\"\
          : \"https://example.com/last_frame.jpg\",\n  \"duration\": 5,\n  \"aspect_ratio\": \"16:9\",\n  \"mode\": \"pro\"\
          ,\n  \"cfg_scale\": 0.5\n}'"
      - lang: curl-viduq1-text2video
        label: viduq1 文生视频（1080P/5s）
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"viduq1\",\n  \"prompt\": \"A golden\
          \ retriever running on a sunny beach with waves crashing in the background\"\n}'"
      - lang: curl-viduq2-text2video-720p
        label: viduq2 文生视频（720P/5s）
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"viduq2\",\n  \"prompt\": \"A cinematic\
          \ drone shot above a quiet lake at sunrise\",\n  \"duration\": 5,\n  \"metadata\": {\n    \"resolution\": \"720p\"\
          \n  }\n}'"
      - lang: curl-viduq2pro-img2video
        label: viduq2-pro 图生视频（单图参考）
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"viduq2-pro\",\n  \"prompt\": \"\
          The person slowly turns and smiles\",\n  \"images\": [\n    \"https://example.com/reference.jpg\"\n  ],\n  \"duration\"\
          : 5\n}'"
      - lang: curl-viduq3pro-text2video
        label: viduq3-pro 文生视频（720P/10s）
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"viduq3-pro\",\n  \"prompt\": \"\
          A cat playing with a ball of yarn in a cozy room with warm lighting\",\n  \"duration\": 10,\n  \"metadata\": {\n\
          \    \"resolution\": \"720p\"\n  }\n}'"
      - lang: curl-pixverse-c1-text-720p
        label: Pixverse C1 文生 720p
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"pixverse-c1\",\n  \"prompt\":\
          \ \"A cinematic city street at night with neon reflections\",\n  \"duration\": 5,\n  \"size\": \"16:9\",\n  \"quality\"\
          : \"720p\"\n}'"
      - lang: curl-pixverse-v6-text-audio
        label: Pixverse V6 文生 1080p 有声
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"pixverse-v6\",\n  \"prompt\":\
          \ \"A slow push-in shot of a product on a clean studio table\",\n  \"duration\": 5,\n  \"size\": \"9:16\",\n  \"\
          quality\": \"1080p\",\n  \"metadata\": {\n    \"audio\": true\n  }\n}'"
      - lang: curl-veo30-text-720p
        label: Veo 3.0 文生 720p
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"veo-3.0-generate-001\",\n  \"\
          prompt\": \"A cinematic drone shot over a coastal city at sunrise\",\n  \"duration\": 4,\n  \"resolution\": \"720p\"\
          ,\n  \"aspectRatio\": \"16:9\"\n}'"
      - lang: curl-veo31-fast-text-1080p
        label: Veo 3.1 Fast 文生 1080p
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"veo-3.1-fast-generate-001\",\n\
          \  \"prompt\": \"A vertical fashion runway clip with smooth camera motion\",\n  \"durationSeconds\": 8,\n  \"resolution\"\
          : \"1080p\",\n  \"aspectRatio\": \"9:16\"\n}'"
      - lang: curl-hailuo-02-text2video
        label: MiniMax-Hailuo-02 文生视频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-Hailuo-02\",\n  \"prompt\"\
          : \"A cat playing with a ball of yarn\",\n  \"duration\": 6,\n  \"size\": \"1080p\"\n}'"
      - lang: curl-hailuo-23-text2video
        label: MiniMax-Hailuo-2.3 文生视频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-Hailuo-2.3\",\n  \"prompt\"\
          : \"A cinematic drone shot above a quiet lake at sunrise\",\n  \"duration\": 6,\n  \"size\": \"1080p\"\n}'"
      - lang: curl-hailuo-fast-img2video
        label: MiniMax-Hailuo-2.3-Fast 图生视频
        source: "curl https://api.imarouter.com/v1/videos \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-Hailuo-2.3-Fast\",\n \
          \ \"prompt\": \"A gentle camera movement over a cup of tea\",\n  \"duration\": 6,\n  \"size\": \"1080p\",\n  \"\
          metadata\": {\n    \"first_frame_image\": \"https://example.com/photo.jpeg\"\n  }\n}'"
  /v1/videos/subtitle-erase:
    post:
      tags:
      - 豆包擦字幕
      summary: 创建豆包擦字幕任务
      description: '独立端点：`POST /v1/videos/subtitle-erase`。

        用于提交豆包视频擦字幕任务，请求参数为：

        - `model`：模型名称（必填）

        - `doubao-video-subtitle-erase-cn`：国内模型

        - `doubao-video-subtitle-erase`：海外模型

        - `video_url`：待处理视频地址（必填，`http/https`）

        该能力不复用 `POST /v1/videos` 通用视频生成端点。请按用户所属分组/可用渠道选择国内或海外模型。

        查询方式：

        - 独立查询端点：`GET /v1/videos/subtitle-erase/{task_id}`

        - 同一个 `task_id` 也支持通用视频查询端点：`GET /v1/videos/{task_id}`'
      operationId: createImaProSubtitleEraseTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImaProSubtitleEraseRequest'
            examples:
              domestic_model:
                summary: 国内模型
                value:
                  model: doubao-video-subtitle-erase-cn
                  video_url: https://example.com/input.mp4
      responses:
        '200':
          description: 受理成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImaProCreateResponse'
              examples:
                已受理:
                  value:
                    id: task_202604220001
                    task_id: task_202604220001
                    object: video
                    model: doubao-video-subtitle-erase
                    status: in_progress
                    progress: 0
                    created_at: 1776816000
        '400':
          description: 参数错误或模型不可用
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
              examples:
                参数错误:
                  value:
                    code: invalid_request
                    message: video_url must be http or https
                    data: null
                价格未配置:
                  value:
                    code: model_price_not_configured
                    message: model price not configured for doubao-video-subtitle-erase-cn
                    data: null
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
      - lang: curl-domestic-model
        label: 国内模型
        source: "curl https://api.imarouter.com/v1/videos/subtitle-erase \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"doubao-video-subtitle-erase-cn\"\
          ,\n  \"video_url\": \"https://example.com/input.mp4\"\n}'"
  /v1/videos/subtitle-erase/{task_id}:
    get:
      tags:
      - 豆包擦字幕
      summary: 查询豆包擦字幕任务
      description: '独立查询端点：`GET /v1/videos/subtitle-erase/{task_id}`。

        查询响应结构与通用视频任务查询保持一致（OpenAI 视频对象风格）。

        已上线的独立查询端点；同一个 `task_id` 也可通过 `GET /v1/videos/{task_id}` 查询。

        **严重告知（必读）**

        - 查询成功后如返回 `results.url`、`metadata.url` 等结果资源 URL，请立即下载并自行持久化保存。

        - 平台不保证结果资源 URL 长期可访问，默认约 30 天后失效；不要把查询结果中的 URL 当作永久存储地址。

        '
      operationId: getImaProSubtitleEraseTask
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
        description: 创建擦字幕任务时返回的 `task_id`
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImaProQueryResponse'
              examples:
                处理中:
                  value:
                    id: task_202604220001
                    task_id: task_202604220001
                    object: video
                    model: doubao-video-subtitle-erase
                    status: in_progress
                    progress: 45
                    created_at: 1776816000
                    error: null
                    usage: null
                    metadata: null
                已完成:
                  value:
                    id: task_202604220001
                    task_id: task_202604220001
                    object: video
                    model: doubao-video-subtitle-erase
                    status: succeeded
                    progress: 100
                    created_at: 1776816000
                    results:
                    - content_type: video
                      url: https://cdn.example.com/subtitle-erased.mp4
                    usage: null
                    error: null
                    metadata: null
        '400':
          description: task_id 非法或请求参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
        '404':
          description: 任务不存在
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
        '500':
          description: 查询任务失败（上游或服务内部异常）
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
      - lang: curl-get-v1-videos-subtitle-erase-task-id
        label: 查询豆包擦字幕任务
        source: "curl https://api.imarouter.com/v1/videos/subtitle-erase/task_202604270001 \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN'"
  /v1/videos/{task_id}:
    get:
      tags:
      - Seedance 视频
      - Wan2.6 视频
      - HappyHorse 视频
      - Kling 视频
      - Pixverse 视频
      - Veo 视频
      summary: 查询 Seedance 视频任务
      description: '使用创建接口返回的公开 `task_id` 轮询任务结果（OpenAI 视频对象风格）。

        适用于所有视频任务（Seedance、MiniMax Hailuo 等），通用查询端点。

        鉴权：请求头必须包含 `Authorization: Bearer sk-...`。

        当上游返回时，响应中会透出：

        - `results`（视频结果数组）

        - `usage`（token 用量）

        - `error`（失败时的错误对象）

        **严重告知（必读）**

        - 查询成功后如返回 `results.url`、`metadata.url` 等结果资源 URL，请立即下载并自行持久化保存。

        - 平台不保证结果资源 URL 长期可访问，默认约 30 天后失效；不要把查询结果中的 URL 当作永久存储地址。


        ---


        ### Wan2.6 视频


        使用真实端点 `GET /v1/videos/{task_id}`。成功响应中如出现 `amount_usd`，表示任务完成后的美元金额。


        ---


        ### HappyHorse 视频


        使用真实端点 `GET /v1/videos/{task_id}` 查询 `happyhorse-1.0-t2v`、`happyhorse-1.0-i2v`、`happyhorse-1.0-r2v` 或 `happyhorse-1.0-video-edit`
        任务状态。成功响应中如出现 `amount_usd`，表示任务完成后的美元金额。


        ---


        ### Kling 视频


        使用真实端点 `GET /v1/videos/{task_id}` 查询 `kling-v3-video` 任务。成功响应中如出现 `amount_usd`，表示任务完成后的美元金额。


        ---


        ### Kling 视频


        使用真实端点 `GET /v1/videos/{task_id}` 查询 `kling-v3-omni-video` 任务。成功响应中如出现 `amount_usd`，表示任务完成后的美元金额。


        ---


        ### Pixverse 视频


        查询 `POST /v1/videos` 提交后的 Pixverse 视频任务。


        **实际请求路径：** `GET /v1/videos/{task_id}`


        成功响应中如出现 `amount_usd`，表示任务完成后的美元金额。任务结果 URL 为平台托管短期链接，建议接收后立即下载并保存。


        ---


        ### Veo 视频


        查询 `POST /v1/videos` 提交后的 Veo 视频任务。


        **实际请求路径：** `GET /v1/videos/{task_id}`


        成功响应中如出现 `amount_usd`，表示任务完成后的美元金额。任务结果 URL 为平台托管短期链接，建议接收后立即下载并保存。'
      operationId: getImaProVideoTask
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
        description: 创建任务时返回的 `task_id`
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImaProQueryResponse'
              examples:
                处理中:
                  value:
                    id: task_202603131631387ETKUBM91MTD72X9
                    task_id: task_202603131631387ETKUBM91MTD72X9
                    object: video
                    model: seedance-2.0-fast
                    status: in_progress
                    progress: 42
                    created_at: 1773395498
                已完成:
                  value:
                    id: task_202603131631387ETKUBM91MTD72X9
                    task_id: task_202603131631387ETKUBM91MTD72X9
                    object: video
                    model: seedance-2.0-fast
                    status: completed
                    progress: 100
                    amount_usd: 2.2743
                    created_at: 1773395498
                    completed_at: 1773395600
                    results:
                    - url: https://file.fashionlabs.cn/aiagent/src/d/20260313/in/742dd3d75edb57c57d70f62e2f94059e.mp4
                      size: 4444046
                      content_type: video
                    usage:
                      completion_tokens: 324900
                      total_tokens: 324900
                角色图场景图_已完成:
                  summary: 对应“两图（角色+场景）非首尾帧”任务查询成功
                  description: '该任务由 `images[2]` 组合创建。图片在服务端按 `reference_image` 语义处理，

                    不会自动推断为 `first_frame + last_frame`。

                    '
                  value:
                    id: task_kfOFFyhQAA1kGTnfdvhcMvhq7K1zIfZ4
                    task_id: task_kfOFFyhQAA1kGTnfdvhcMvhq7K1zIfZ4
                    object: video
                    model: seedance-2.0
                    status: completed
                    progress: 100
                    amount_usd: 2.2743
                    created_at: 1773561120
                    completed_at: 1773562786
                    metadata:
                      url: https://file2.fashionlabs.cn/aiagent/src/d/20260316/in/e0a3e95679cf76ae58827854a7a0e74a.mp4
                    results:
                    - url: https://file2.fashionlabs.cn/aiagent/src/d/20260316/in/e0a3e95679cf76ae58827854a7a0e74a.mp4
                      width: 1280
                      height: 720
                      duration: 10
                      size: 4053581
                      content_type: video
                    usage:
                      completion_tokens: 324900
                      total_tokens: 324900
                单图_reference_image_已完成:
                  summary: 对应“单图 reference_image”任务查询成功
                  description: '该任务由单图创建。图片在服务端按 `reference_image` 语义处理，

                    不会自动推断为 `first_frame`。

                    '
                  value:
                    id: task_single_ref_image_demo_20260317
                    task_id: task_single_ref_image_demo_20260317
                    object: video
                    model: seedance-2.0-fast
                    status: completed
                    progress: 100
                    amount_usd: 1.13715
                    created_at: 1773666000
                    completed_at: 1773666120
                    results:
                    - url: https://file.fashionlabs.cn/aiagent/src/d/20260317/in/single_ref_image_demo.mp4
                      width: 720
                      height: 1280
                      duration: 5
                      size: 1987654
                      content_type: video
                    usage:
                      completion_tokens: 162450
                      total_tokens: 162450
                单图_frame_已完成:
                  summary: 对应“单图 frame 模式”任务查询成功
                  description: '该任务提交时设置 `metadata.role_mode=frame`，

                    单图按 `first_frame` 语义处理。

                    '
                  value:
                    id: task_single_frame_demo_20260317
                    task_id: task_single_frame_demo_20260317
                    object: video
                    model: seedance-2.0-fast
                    status: completed
                    progress: 100
                    amount_usd: 1.13715
                    created_at: 1773667000
                    completed_at: 1773667130
                    results:
                    - url: https://file.fashionlabs.cn/aiagent/src/d/20260317/in/single_frame_demo.mp4
                      width: 720
                      height: 1280
                      duration: 5
                      size: 2065432
                      content_type: video
                    usage:
                      completion_tokens: 162450
                      total_tokens: 162450
                失败:
                  value:
                    id: task_Qx7xsV8zGQHf5xz7xePS0m4B4fLrmtlp
                    task_id: task_Qx7xsV8zGQHf5xz7xePS0m4B4fLrmtlp
                    object: video
                    model: seedance-2.0
                    status: failed
                    progress: 100
                    created_at: 1773494530
                    completed_at: 1773508363
                    metadata:
                      url: 'video generation failed: internal error: 601300'
                    error:
                      code: task_failed
                      message: 'video generation failed: internal error: 601300'
                失败_参考视频像素不足601300:
                  summary: 参考视频像素不足（参数错误）
                  description: '常见触发条件：

                    - `metadata.reference_video_urls` 中存在像素不达标视频

                    - 豆包 seedance-2-0 r2v 要求参考视频像素（宽×高）`>=409600`

                    - 例如小于 `640x640` 会触发错误码 `601300`

                    '
                  value:
                    id: task_6HwrcAuc83ypDhrNQA5k2s9kM4uFVRz
                    task_id: task_6HwrcAuc83ypDhrNQA5k2s9kM4uFVRz
                    object: video
                    model: seedance-2.0
                    status: failed
                    progress: 100
                    created_at: 1774300000
                    completed_at: 1774300120
                    metadata:
                      url: 'video generation failed: reference video pixel count too low (code: 601300)'
                    error:
                      code: task_failed
                      message: '601300: reference video pixel count must be >= 409600 (at least 640x640)'
                wan26_wan26_video_completed:
                  summary: 已完成
                  value:
                    id: task_wan26_202604250001
                    task_id: task_wan26_202604250001
                    object: video
                    model: wan2.6-t2v
                    status: completed
                    progress: 100
                    amount_usd: 0.43006
                    created_at: 1777100000
                    completed_at: 1777100060
                    results:
                    - url: https://cdn.example.com/video/wan26.mp4
                      width: 1280
                      height: 720
                      duration: 5
                      content_type: video
                happyhorse_happyhorse_video_completed:
                  summary: 已完成
                  value:
                    id: task_happyhorse_202604270001
                    task_id: task_happyhorse_202604270001
                    object: video
                    model: happyhorse-1.0-t2v
                    status: completed
                    progress: 100
                    amount_usd: 0.986301
                    created_at: 1777200000
                    completed_at: 1777200060
                    results:
                    - url: https://cdn.example.com/video/happyhorse.mp4
                      width: 1280
                      height: 720
                      duration: 8
                      content_type: video
                happyhorse_happyhorse_i2v_video_completed:
                  summary: 图生视频已完成
                  value:
                    id: task_happyhorse_i2v_202604270001
                    task_id: task_happyhorse_i2v_202604270001
                    object: video
                    model: happyhorse-1.0-i2v
                    status: completed
                    progress: 100
                    amount_usd: 0.986301
                    created_at: 1777200000
                    completed_at: 1777200060
                    results:
                    - url: https://cdn.example.com/video/happyhorse-i2v.mp4
                      width: 1280
                      height: 720
                      duration: 8
                      content_type: video
                happyhorse_happyhorse_r2v_video_completed:
                  summary: 参考图生视频已完成
                  value:
                    id: task_happyhorse_r2v_202604270001
                    task_id: task_happyhorse_r2v_202604270001
                    object: video
                    model: happyhorse-1.0-r2v
                    status: completed
                    progress: 100
                    amount_usd: 0.986301
                    created_at: 1777200000
                    completed_at: 1777200060
                    results:
                    - url: https://cdn.example.com/video/happyhorse-r2v.mp4
                      width: 1280
                      height: 720
                      duration: 8
                      content_type: video
                happyhorse_happyhorse_video_edit_completed:
                  summary: 视频编辑已完成
                  value:
                    id: task_happyhorse_video_edit_202604270001
                    task_id: task_happyhorse_video_edit_202604270001
                    object: video
                    model: happyhorse-1.0-video-edit
                    status: completed
                    progress: 100
                    amount_usd: 0.739726
                    created_at: 1777200000
                    completed_at: 1777200060
                    results:
                    - url: https://cdn.example.com/video/happyhorse-video-edit.mp4
                      width: 1280
                      height: 720
                      duration: 6
                      content_type: video
                    usage:
                      input_video_duration: 6
                      output_video_duration: 6
                kling_v3_video_kling_v3_video_completed:
                  summary: 已完成
                  value:
                    id: task_kling_v3_video_202604270001
                    task_id: task_kling_v3_video_202604270001
                    object: video
                    model: kling-v3-video
                    status: completed
                    progress: 100
                    amount_usd: 0.410959
                    created_at: 1777200000
                    completed_at: 1777200060
                    results:
                    - url: https://cdn.example.com/video/kling-v3-video.mp4
                      width: 1280
                      height: 720
                      duration: 5
                      content_type: video
                kling_v3_omni_video_kling_v3_omni_completed:
                  summary: 已完成
                  value:
                    id: task_kling_v3_omni_202604270001
                    task_id: task_kling_v3_omni_202604270001
                    object: video
                    model: kling-v3-omni-video
                    status: completed
                    progress: 100
                    amount_usd: 0.42
                    created_at: 1777200000
                    completed_at: 1777200060
                    results:
                    - url: https://cdn.example.com/video/kling-v3-omni-video.mp4
                      width: 1280
                      height: 720
                      duration: 5
                      content_type: video
                pixverse_pixverse_completed:
                  summary: Pixverse 成功
                  value:
                    id: task_pixverse_202605220001
                    task_id: task_pixverse_202605220001
                    object: video
                    model: pixverse-v6
                    status: completed
                    progress: 100
                    created_at: 1779400000
                    completed_at: 1779400060
                    results:
                    - url: https://cdn.example.com/video/pixverse-v6.mp4
                      width: 1920
                      height: 1080
                      duration: 5
                      content_type: video
                veo_veo_completed:
                  summary: Veo 成功
                  value:
                    id: task_veo_202605220001
                    task_id: task_veo_202605220001
                    object: video
                    model: veo-3.1-fast-generate-001
                    status: completed
                    progress: 100
                    amount_usd: 0.72
                    created_at: 1779400000
                    completed_at: 1779400090
                    results:
                    - url: https://cdn.example.com/video/veo-3.1-fast.mp4
                      width: 1080
                      height: 1920
                      duration: 8
                      content_type: video
                    usage:
                      durationSeconds: 8
                      resolution: 1080p
        '400':
          description: task_id 无效或请求参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
              examples:
                task_id为空:
                  value:
                    code: invalid_request
                    message: task_id is required
                    data: null
        '404':
          description: 任务不存在
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
              examples:
                task不存在:
                  value:
                    code: task_not_exist
                    message: task_not_exist
                    data: null
        '500':
          description: 查询任务失败（上游或服务内部异常）
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
              examples:
                查询失败:
                  value:
                    code: get_task_failed
                    message: failed to fetch task from upstream
                    data: null
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
      - lang: curl-get-v1-videos-task-id
        label: 查询 Seedance 视频任务
        source: "curl https://api.imarouter.com/v1/videos/task_202604270001 \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'"
      - lang: curl-wan26-curl-get-v1-videos-task-id
        label: 查询 Wan2.6 视频任务
        source: "curl https://api.imarouter.com/v1/videos/task_202604270001 \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'"
      - lang: curl-happyhorse-curl-get-v1-videos-task-id
        label: 查询 HappyHorse 视频任务
        source: "curl https://api.imarouter.com/v1/videos/task_202604270001 \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'"
      - lang: curl-kling-v3-video-curl-get-v1-videos-task-id
        label: 查询 Kling v3 Video 任务
        source: "curl https://api.imarouter.com/v1/videos/task_202604270001 \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'"
      - lang: curl-kling-v3-omni-video-curl-get-v1-videos-task-id
        label: 查询 Kling v3 Omni Video 任务
        source: "curl https://api.imarouter.com/v1/videos/task_202604270001 \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'"
      - lang: curl-pixverse-curl-get-v1-videos-task-id
        label: 查询 Pixverse 视频任务
        source: "curl https://api.imarouter.com/v1/videos/task_202604270001 \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'"
      - lang: curl-veo-curl-get-v1-videos-task-id
        label: 查询 Veo 视频任务
        source: "curl https://api.imarouter.com/v1/videos/task_202604270001 \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'"
  /api/v1/contents/generations/tasks:
    post:
      tags:
      - Seedance 视频
      summary: 创建 Seedance 内容生成视频任务
      description: '使用 Seedance 2.0 contents task 请求体提交视频任务。


        **请求路径：** `POST /api/v1/contents/generations/tasks`


        **支持模型：**

        - `seedance-2.0`

        - `seedance-2.0-fast`

        - `seedance-2.0-cn`

        - `seedance-2.0-fast-cn`


        **公开入参：** 图片、视频和音频地址必须使用公网 `https://...` URL。提交成功后返回任务 ID，客户端使用 `GET /api/v1/contents/generations/tasks/{task_id}`
        轮询结果。


        **Case 封装：** 示例按官方请求形态归类为文生、首帧、首尾帧、多模态参考，并分别覆盖音频视频和静音视频；示例 key 以 `seedance_` 开头，便于 Playground 和第三方 SDK 按场景选择。'
      operationId: createSeedanceContentsGenerationTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SeedanceContentsGenerationTaskRequest'
            examples:
              seedance_text_audio:
                summary: 文生音频视频
                value:
                  model: seedance-2.0
                  content:
                  - type: text
                    text: A cinematic city skyline at sunrise, warm light, smooth camera motion.
                  resolution: 720p
                  ratio: '16:9'
                  duration: 5
                  generate_audio: true
              seedance_text_silent:
                summary: 文生静音视频
                value:
                  model: seedance-2.0
                  content:
                  - type: text
                    text: A quiet cinematic city skyline at sunrise with smooth camera motion.
                  resolution: 720p
                  ratio: '16:9'
                  duration: 5
                  generate_audio: false
              seedance_fast_text_silent:
                summary: Fast 文生静音
                value:
                  model: seedance-2.0-fast
                  content:
                  - type: text
                    text: A quiet cinematic city skyline at sunrise with smooth camera motion.
                  resolution: 720p
                  ratio: '16:9'
                  duration: 5
                  generate_audio: false
              seedance_first_frame_audio:
                summary: 首帧音频视频
                value:
                  model: seedance-2.0
                  content:
                  - type: text
                    text: The subject turns toward warm light while ambient sound follows the motion.
                  - type: image_url
                    image_url:
                      url: https://ima-ga.esxscloud.com/aiagent/src/d/20260209/in/1770621940910426538_0.png
                    role: first_frame
                  resolution: 720p
                  ratio: adaptive
                  duration: 5
                  generate_audio: true
              seedance_first_frame_silent:
                summary: 首帧静音视频
                value:
                  model: seedance-2.0
                  content:
                  - type: text
                    text: The camera slowly pushes in while the subject turns toward the light.
                  - type: image_url
                    image_url:
                      url: https://ima-ga.esxscloud.com/aiagent/src/d/20260209/in/1770621940910426538_0.png
                    role: first_frame
                  resolution: 720p
                  ratio: adaptive
                  duration: 5
                  generate_audio: false
                  return_last_frame: true
              seedance_first_last_audio:
                summary: 首尾帧音频视频
                value:
                  model: seedance-2.0
                  content:
                  - type: text
                    text: Animate a gentle transition between the first and last frame with natural sound.
                  - type: image_url
                    image_url:
                      url: https://ima-ga.esxscloud.com/aiagent/src/d/20260209/in/1770621940910426538_0.png
                    role: first_frame
                  - type: image_url
                    image_url:
                      url: https://ima-ga.esxscloud.com/upload/1775559248448_433.png
                    role: last_frame
                  resolution: 720p
                  ratio: adaptive
                  duration: 6
                  generate_audio: true
              seedance_first_last_silent:
                summary: 首尾帧静音
                value:
                  model: seedance-2.0
                  content:
                  - type: text
                    text: Animate a gentle transition between the first frame and last frame.
                  - type: image_url
                    image_url:
                      url: https://ima-ga.esxscloud.com/aiagent/src/d/20260209/in/1770621940910426538_0.png
                    role: first_frame
                  - type: image_url
                    image_url:
                      url: https://ima-ga.esxscloud.com/upload/1775559248448_433.png
                    role: last_frame
                  resolution: 720p
                  ratio: adaptive
                  duration: 6
                  generate_audio: false
              seedance_multimodal_https_audio:
                summary: 多模态 HTTPS 音频视频
                value:
                  model: seedance-2.0
                  content:
                  - type: text
                    text: Create a smooth product reveal video with matching motion and sound.
                  - type: image_url
                    image_url:
                      url: https://ima-ga.esxscloud.com/aiagent/src/d/20260209/in/1770621940910426538_0.png
                    role: reference_image
                  - type: video_url
                    video_url:
                      url: https://file2.fashionlabs.cn/aiagent/src/d/20260319/in/ac45807a51f68c21556b7872827a4569.mp4
                    role: reference_video
                  - type: audio_url
                    audio_url:
                      url: https://file2.fashionlabs.cn/aiagent/src/d510cae243c24eafcfadf3a9e3b6c6ad_%5Bcut_15sec%5D.mp3
                    role: reference_audio
                  resolution: 720p
                  ratio: '16:9'
                  duration: 10
                  generate_audio: true
              seedance_multimodal_https_silent:
                summary: 多模态 HTTPS 静音视频
                value:
                  model: seedance-2.0
                  content:
                  - type: text
                    text: Create a smooth product reveal video using the reference image and video motion.
                  - type: image_url
                    image_url:
                      url: https://ima-ga.esxscloud.com/aiagent/src/d/20260209/in/1770621940910426538_0.png
                    role: reference_image
                  - type: video_url
                    video_url:
                      url: https://file2.fashionlabs.cn/aiagent/src/d/20260319/in/ac45807a51f68c21556b7872827a4569.mp4
                    role: reference_video
                  resolution: 720p
                  ratio: '16:9'
                  duration: 10
                  generate_audio: false
      responses:
        '200':
          description: 提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImaProCreateResponse'
              examples:
                task_submitted:
                  summary: 返回任务 ID
                  value:
                    id: task_v1VZnoqtCP9tD6eFIqbqqSZKnMHtg9fp
                    task_id: task_v1VZnoqtCP9tD6eFIqbqqSZKnMHtg9fp
                    object: video
                    model: seedance-2.0
                    status: in_progress
                    progress: 0
                    created_at: 1780390610
        '400':
          description: 参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
              examples:
                unsupported_model:
                  summary: 模型不支持
                  value:
                    code: invalid_request
                    message: unsupported contents generation task model "seedance-1.5-pro"; only seedance-2.0, seedance-2.0-fast,
                      seedance-2.0-cn and seedance-2.0-fast-cn are supported
                    data: null
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: 任务创建失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
      x-codeSamples:
      - lang: curl-seedance-text-audio
        label: 文生音频视频
        source: "curl https://api.imarouter.com/api/v1/contents/generations/tasks \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\"\
          ,\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"A cinematic city skyline at sunrise, warm\
          \ light, smooth camera motion.\"\n    }\n  ],\n  \"resolution\": \"720p\",\n  \"ratio\": \"16:9\",\n  \"duration\"\
          : 5,\n  \"generate_audio\": true\n}'"
      - lang: curl-seedance-text-silent
        label: 文生静音视频
        source: "curl https://api.imarouter.com/api/v1/contents/generations/tasks \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\"\
          ,\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"A quiet cinematic city skyline at sunrise\
          \ with smooth camera motion.\"\n    }\n  ],\n  \"resolution\": \"720p\",\n  \"ratio\": \"16:9\",\n  \"duration\"\
          : 5,\n  \"generate_audio\": false\n}'"
      - lang: curl-seedance-fast-text-silent
        label: Fast 文生静音
        source: "curl https://api.imarouter.com/api/v1/contents/generations/tasks \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0-fast\"\
          ,\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"A quiet cinematic city skyline at sunrise\
          \ with smooth camera motion.\"\n    }\n  ],\n  \"resolution\": \"720p\",\n  \"ratio\": \"16:9\",\n  \"duration\"\
          : 5,\n  \"generate_audio\": false\n}'"
      - lang: curl-seedance-first-frame-audio
        label: 首帧音频视频
        source: "curl https://api.imarouter.com/api/v1/contents/generations/tasks \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\"\
          ,\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"The subject turns toward warm light while\
          \ ambient sound follows the motion.\"\n    },\n    {\n      \"type\": \"image_url\",\n      \"image_url\": {\n \
          \       \"url\": \"https://ima-ga.esxscloud.com/aiagent/src/d/20260209/in/1770621940910426538_0.png\"\n      },\n\
          \      \"role\": \"first_frame\"\n    }\n  ],\n  \"resolution\": \"720p\",\n  \"ratio\": \"adaptive\",\n  \"duration\"\
          : 5,\n  \"generate_audio\": true\n}'"
      - lang: curl-seedance-first-frame-silent
        label: 首帧静音视频
        source: "curl https://api.imarouter.com/api/v1/contents/generations/tasks \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\"\
          ,\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"The camera slowly pushes in while the subject\
          \ turns toward the light.\"\n    },\n    {\n      \"type\": \"image_url\",\n      \"image_url\": {\n        \"url\"\
          : \"https://ima-ga.esxscloud.com/aiagent/src/d/20260209/in/1770621940910426538_0.png\"\n      },\n      \"role\"\
          : \"first_frame\"\n    }\n  ],\n  \"resolution\": \"720p\",\n  \"ratio\": \"adaptive\",\n  \"duration\": 5,\n  \"\
          generate_audio\": false,\n  \"return_last_frame\": true\n}'"
      - lang: curl-seedance-first-last-audio
        label: 首尾帧音频视频
        source: "curl https://api.imarouter.com/api/v1/contents/generations/tasks \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\"\
          ,\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"Animate a gentle transition between the\
          \ first and last frame with natural sound.\"\n    },\n    {\n      \"type\": \"image_url\",\n      \"image_url\"\
          : {\n        \"url\": \"https://ima-ga.esxscloud.com/aiagent/src/d/20260209/in/1770621940910426538_0.png\"\n   \
          \   },\n      \"role\": \"first_frame\"\n    },\n    {\n      \"type\": \"image_url\",\n      \"image_url\": {\n\
          \        \"url\": \"https://ima-ga.esxscloud.com/upload/1775559248448_433.png\"\n      },\n      \"role\": \"last_frame\"\
          \n    }\n  ],\n  \"resolution\": \"720p\",\n  \"ratio\": \"adaptive\",\n  \"duration\": 6,\n  \"generate_audio\"\
          : true\n}'"
      - lang: curl-seedance-first-last-silent
        label: 首尾帧静音
        source: "curl https://api.imarouter.com/api/v1/contents/generations/tasks \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\"\
          ,\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"Animate a gentle transition between the\
          \ first frame and last frame.\"\n    },\n    {\n      \"type\": \"image_url\",\n      \"image_url\": {\n       \
          \ \"url\": \"https://ima-ga.esxscloud.com/aiagent/src/d/20260209/in/1770621940910426538_0.png\"\n      },\n    \
          \  \"role\": \"first_frame\"\n    },\n    {\n      \"type\": \"image_url\",\n      \"image_url\": {\n        \"\
          url\": \"https://ima-ga.esxscloud.com/upload/1775559248448_433.png\"\n      },\n      \"role\": \"last_frame\"\n\
          \    }\n  ],\n  \"resolution\": \"720p\",\n  \"ratio\": \"adaptive\",\n  \"duration\": 6,\n  \"generate_audio\"\
          : false\n}'"
      - lang: curl-seedance-multimodal-https-audio
        label: 多模态 HTTPS 音频视频
        source: "curl https://api.imarouter.com/api/v1/contents/generations/tasks \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\"\
          ,\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"Create a smooth product reveal video with\
          \ matching motion and sound.\"\n    },\n    {\n      \"type\": \"image_url\",\n      \"image_url\": {\n        \"\
          url\": \"https://ima-ga.esxscloud.com/aiagent/src/d/20260209/in/1770621940910426538_0.png\"\n      },\n      \"\
          role\": \"reference_image\"\n    },\n    {\n      \"type\": \"video_url\",\n      \"video_url\": {\n        \"url\"\
          : \"https://file2.fashionlabs.cn/aiagent/src/d/20260319/in/ac45807a51f68c21556b7872827a4569.mp4\"\n      },\n  \
          \    \"role\": \"reference_video\"\n    },\n    {\n      \"type\": \"audio_url\",\n      \"audio_url\": {\n    \
          \    \"url\": \"https://file2.fashionlabs.cn/aiagent/src/d510cae243c24eafcfadf3a9e3b6c6ad_%5Bcut_15sec%5D.mp3\"\n\
          \      },\n      \"role\": \"reference_audio\"\n    }\n  ],\n  \"resolution\": \"720p\",\n  \"ratio\": \"16:9\"\
          ,\n  \"duration\": 10,\n  \"generate_audio\": true\n}'"
      - lang: curl-seedance-multimodal-https-silent
        label: 多模态 HTTPS 静音视频
        source: "curl https://api.imarouter.com/api/v1/contents/generations/tasks \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-2.0\"\
          ,\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"Create a smooth product reveal video using\
          \ the reference image and video motion.\"\n    },\n    {\n      \"type\": \"image_url\",\n      \"image_url\": {\n\
          \        \"url\": \"https://ima-ga.esxscloud.com/aiagent/src/d/20260209/in/1770621940910426538_0.png\"\n      },\n\
          \      \"role\": \"reference_image\"\n    },\n    {\n      \"type\": \"video_url\",\n      \"video_url\": {\n  \
          \      \"url\": \"https://file2.fashionlabs.cn/aiagent/src/d/20260319/in/ac45807a51f68c21556b7872827a4569.mp4\"\n\
          \      },\n      \"role\": \"reference_video\"\n    }\n  ],\n  \"resolution\": \"720p\",\n  \"ratio\": \"16:9\"\
          ,\n  \"duration\": 10,\n  \"generate_audio\": false\n}'"
  /api/v1/contents/generations/tasks/{task_id}:
    get:
      tags:
      - Seedance 视频
      summary: 查询 Seedance 内容生成视频任务
      description: '查询 `POST /api/v1/contents/generations/tasks` 提交后的 Seedance contents 视频任务。


        成功响应包含 `id`、`task_id`、`status`、`progress`、`results`、`usage`、`amount_usd` 等字段。本端点的 `status` 使用 Seedance 任务状态口径：`queued`、`running`、`succeeded`、`failed`。客户端推荐使用本端点轮询新
        contents 任务。'
      operationId: getSeedanceContentsGenerationTask
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
        description: 提交创建接口返回的任务 ID。
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImaProQueryResponse'
              examples:
                in_progress:
                  summary: 处理中
                  value:
                    id: task_v1VZnoqtCP9tD6eFIqbqqSZKnMHtg9fp
                    task_id: task_v1VZnoqtCP9tD6eFIqbqqSZKnMHtg9fp
                    object: video
                    model: seedance-2.0
                    status: running
                    progress: 42
                    created_at: 1780390610
                completed:
                  summary: 已完成
                  value:
                    id: task_v1VZnoqtCP9tD6eFIqbqqSZKnMHtg9fp
                    task_id: task_v1VZnoqtCP9tD6eFIqbqqSZKnMHtg9fp
                    object: video
                    model: seedance-2.0
                    status: succeeded
                    progress: 100
                    amount_usd: 1.007748
                    created_at: 1780390610
                    completed_at: 1780390720
                    metadata:
                      url: https://file.fashionlabs.cn/aiagent/src/d/20260602/in/seedance_contents_demo.mp4
                    results:
                    - url: https://file.fashionlabs.cn/aiagent/src/d/20260602/in/seedance_contents_demo.mp4
                      width: 1280
                      height: 720
                      duration: 10
                      content_type: video
                    usage:
                      total_tokens: 195300
        '400':
          description: 参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
              examples:
                task_id_empty:
                  summary: task_id 为空
                  value:
                    code: invalid_request
                    message: task_id is required
                    data: null
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: 任务不存在
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
              examples:
                task_not_found:
                  summary: 任务不存在
                  value:
                    code: task_not_exist
                    message: task_not_exist
                    data: null
        '500':
          description: 查询失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
      x-codeSamples:
      - lang: curl-get-api-v1-contents-generations-tasks-task-id
        label: 查询 Seedance 内容生成视频任务
        source: "curl https://api.imarouter.com/api/v1/contents/generations/tasks/task_202604270001 \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN'"
  /v1/assets/group/create:
    post:
      summary: 创建素材分组
      description: '创建素材分组（不扣费）。

        鉴权：请求头必须包含 `Authorization: Bearer sk-...`。


        字段说明：

        - `name`：分组名称（必填，<=64 字符）

        - `description`：分组描述（可选，<=300 字符）

        - `group_type`：分组类型（可选；默认 `AIGC`）

        - `project_name`：项目名（可选；默认 `default`）

        - `model`：可选，资产模型名（建议显式传，避免默认模型与分组权限不匹配）

        '
      operationId: createAssetGroup
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetGroupCreateRequest'
            examples:
              minimal:
                summary: 最小可用请求
                value:
                  name: marketing-assets
              full:
                summary: 带可选字段的请求
                value:
                  name: marketing-assets
                  description: 素材分组-市场投放
                  group_type: AIGC
                  project_name: default
                  model: ima-pro-upload-cn
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetGroupResponse'
      tags:
      - 人像
      x-codeSamples:
      - lang: curl-minimal
        label: 最小可用请求
        source: "curl https://api.imarouter.com/v1/assets/group/create \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"name\": \"marketing-assets\"\
          \n}'"
      - lang: curl-full
        label: 带可选字段的请求
        source: "curl https://api.imarouter.com/v1/assets/group/create \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"name\": \"marketing-assets\"\
          ,\n  \"description\": \"素材分组-市场投放\",\n  \"group_type\": \"AIGC\",\n  \"project_name\": \"default\",\n  \"model\"\
          : \"ima-pro-upload-cn\"\n}'"
  /v1/assets/group/list:
    post:
      summary: 查询素材分组列表
      description: '查询分组列表（不扣费）。

        排序参数严格校验：

        - `sort_by`: `CreateTime|UpdateTime`

        - `sort_order`: `Asc|Desc`

        - `model`: 可选，建议显式传用于按模型权限过滤。

        '
      operationId: listAssetGroups
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetGroupListRequest'
            examples:
              default_page:
                summary: 默认分页查询
                value:
                  page_number: 1
                  page_size: 20
                  model: ima-pro-upload-cn
              with_filter:
                summary: 按名称过滤并按时间倒序
                value:
                  filters:
                    name: marketing
                    group_type: AIGC
                  sort_by: CreateTime
                  sort_order: Desc
                  page_number: 1
                  page_size: 20
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetGroupListResponse'
      tags:
      - 人像
      x-codeSamples:
      - lang: curl-default-page
        label: 默认分页查询
        source: "curl https://api.imarouter.com/v1/assets/group/list \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"page_number\": 1,\n  \"\
          page_size\": 20,\n  \"model\": \"ima-pro-upload-cn\"\n}'"
      - lang: curl-with-filter
        label: 按名称过滤并按时间倒序
        source: "curl https://api.imarouter.com/v1/assets/group/list \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"filters\": {\n    \"name\"\
          : \"marketing\",\n    \"group_type\": \"AIGC\"\n  },\n  \"sort_by\": \"CreateTime\",\n  \"sort_order\": \"Desc\"\
          ,\n  \"page_number\": 1,\n  \"page_size\": 20\n}'"
  /v1/assets/group/get:
    post:
      summary: 查询单个素材分组
      operationId: getAssetGroup
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - id
              properties:
                id:
                  type: string
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetGroupResponse'
      tags:
      - 人像
      x-codeSamples:
      - lang: curl-post-v1-assets-group-get
        label: 查询单个素材分组
        source: "curl https://api.imarouter.com/v1/assets/group/get \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN'"
  /v1/assets/group/update:
    post:
      summary: 更新素材分组
      operationId: updateAssetGroup
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - id
              properties:
                id:
                  type: string
                name:
                  type: string
                description:
                  type: string
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetIdResponse'
      tags:
      - 人像
      x-codeSamples:
      - lang: curl-post-v1-assets-group-update
        label: 更新素材分组
        source: "curl https://api.imarouter.com/v1/assets/group/update \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN'"
  /v1/assets/create:
    post:
      summary: 上传素材（创建素材）
      description: '上传素材 URL 到素材库。

        计费说明：仅此端点扣费，计费模型取请求体 `model`（未传时默认 `ima-pro-upload`，按次）。

        默认扣费令牌：当前请求头 `Authorization` 对应的 SK。

        可选字段 `billing_token_id` 仅用于覆盖默认扣费令牌（必须是当前用户且启用）。

        `asset_type` 表示素材类型，默认值 `Image`，支持 `Image|Video|Audio`（不传则按 `Image`）。

        `asset_type=Audio` 时，音频时长由上游服务校验，需在 `1.8s` 到 `15.2s` 闭区间内，超限会报： `InvalidParameter.DurationTooLong: Duration must be
        between 1.8s and 15.2s`。

        **严重提醒（必读）**

        - 创建人像素材/素材协议时，务必显式传 `model` 区分国内与海外渠道。

        - 国内视频模型（`seedance-2.0-cn`、`seedance-2.0-fast-cn`）应使用 `ima-pro-upload-cn`（或历史兼容 `ima-pro-upload`）创建素材。

        - 海外视频模型（`seedance-2.0`、`seedance-2.0-fast`）应使用 `seedance-upload` 创建素材。

        - 不要混用国内/海外素材协议；否则 `asset://...` 虽然创建成功，但后续视频任务可能因协议渠道不匹配而调用失败。

        **重要提示（必读）**

        - `url` 为素材上传源地址，调用前请确认可访问，并建议自行持久化原始素材。

        - 30 天失效规则仅适用于接口返回的结果资源 URL；上传源素材请自行长期保存。

        '
      operationId: createAsset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetCreateRequest'
            examples:
              video_create_success:
                summary: 视频素材上传示例（成功）
                value:
                  group_id: group-20260403210537-6v56x
                  url: https://ws.esxscloud.com/aiagent/src/d/20260407/in/1a2011e98a41847d70a49b570995d379.mp4
                  name: verify-overseas-video-check
                  asset_type: Video
                  model: ima-pro-upload-cn
              image_create_success:
                summary: 图片素材上传示例（成功）
                value:
                  group_id: group-20260403210537-6v56x
                  url: https://dxii5p4krscl5.cloudfront.net/resource/image/dd40f8e8-9296-4daf-9277-4a842d79fbee.jpg
                  name: verify-overseas-image-check
                  asset_type: Image
                  model: ima-pro-upload-cn
              audio_create_success:
                summary: 音频素材上传示例（成功）
                value:
                  group_id: group-20260403210537-6v56x
                  url: https://ima-ga.esxscloud.com/drama_pro/privite/2026/04/02/1775124683350_1930188605918449664_35ae6ccc808744e5bcb2fc2354bf9c1c.mp3
                  name: verify-overseas-audio-check
                  asset_type: Audio
                  model: ima-pro-upload-cn
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetIdResponse'
              examples:
                create_success:
                  value:
                    success: true
                    message: ''
                    data:
                      Id: asset-20260409110407-jpbr5
        '400':
          description: '参数错误。 常见错误示例： - `InvalidParameter.DurationTooLong: Duration must be between 1.8s and 15.2s` - `doubao
            asset request failed: InvalidParameter.DownloadFailed` '
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  message:
                    type: string
                  success:
                    type: boolean
              examples:
                invalid_audio_duration:
                  value:
                    success: false
                    message: 'doubao asset request failed: InvalidParameter.DurationTooLong: Duration must be between 1.8s
                      and 15.2s'
      tags:
      - 人像
      x-codeSamples:
      - lang: curl-video-create-success
        label: 视频素材上传示例（成功）
        source: "curl https://api.imarouter.com/v1/assets/create \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"group_id\": \"group-20260403210537-6v56x\"\
          ,\n  \"url\": \"https://ws.esxscloud.com/aiagent/src/d/20260407/in/1a2011e98a41847d70a49b570995d379.mp4\",\n  \"\
          name\": \"verify-overseas-video-check\",\n  \"asset_type\": \"Video\",\n  \"model\": \"ima-pro-upload-cn\"\n}'"
      - lang: curl-image-create-success
        label: 图片素材上传示例（成功）
        source: "curl https://api.imarouter.com/v1/assets/create \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"group_id\": \"group-20260403210537-6v56x\"\
          ,\n  \"url\": \"https://dxii5p4krscl5.cloudfront.net/resource/image/dd40f8e8-9296-4daf-9277-4a842d79fbee.jpg\",\n\
          \  \"name\": \"verify-overseas-image-check\",\n  \"asset_type\": \"Image\",\n  \"model\": \"ima-pro-upload-cn\"\n\
          }'"
      - lang: curl-audio-create-success
        label: 音频素材上传示例（成功）
        source: "curl https://api.imarouter.com/v1/assets/create \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"group_id\": \"group-20260403210537-6v56x\"\
          ,\n  \"url\": \"https://ima-ga.esxscloud.com/drama_pro/privite/2026/04/02/1775124683350_1930188605918449664_35ae6ccc808744e5bcb2fc2354bf9c1c.mp3\"\
          ,\n  \"name\": \"verify-overseas-audio-check\",\n  \"asset_type\": \"Audio\",\n  \"model\": \"ima-pro-upload-cn\"\
          \n}'"
  /v1/assets/list:
    post:
      summary: 查询素材列表
      description: '查询素材列表（不扣费）。

        排序参数严格校验：

        - `sort_by`: `CreateTime|UpdateTime|GroupId`

        - `sort_order`: `Asc|Desc`

        - `model`: 可选，建议显式传用于按模型权限过滤。

        '
      operationId: listAssets
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetListRequest'
            examples:
              ima_pro_upload_list:
                summary: ima-pro-upload 素材列表（默认排序）
                value:
                  model: ima-pro-upload
                  page_number: 1
                  page_size: 20
                  sort_by: CreateTime
                  sort_order: Desc
              ima_pro_upload_cn_list:
                summary: ima-pro-upload-cn 按状态过滤
                value:
                  model: ima-pro-upload-cn
                  filters:
                    group_type: AIGC
                    statuses:
                    - Active
                  page_number: 1
                  page_size: 50
              seedance_upload_list:
                summary: seedance-upload 素材列表
                value:
                  model: seedance-upload
                  page_number: 1
                  page_size: 20
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetListResponse'
      tags:
      - 人像
      x-codeSamples:
      - lang: curl-ima-pro-upload-list
        label: ima-pro-upload 素材列表（默认排序）
        source: "curl https://api.imarouter.com/v1/assets/list \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"ima-pro-upload\",\n  \"page_number\"\
          : 1,\n  \"page_size\": 20,\n  \"sort_by\": \"CreateTime\",\n  \"sort_order\": \"Desc\"\n}'"
      - lang: curl-ima-pro-upload-cn-list
        label: ima-pro-upload-cn 按状态过滤
        source: "curl https://api.imarouter.com/v1/assets/list \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"ima-pro-upload-cn\",\n  \"filters\"\
          : {\n    \"group_type\": \"AIGC\",\n    \"statuses\": [\n      \"Active\"\n    ]\n  },\n  \"page_number\": 1,\n\
          \  \"page_size\": 50\n}'"
      - lang: curl-seedance-upload-list
        label: seedance-upload 素材列表
        source: "curl https://api.imarouter.com/v1/assets/list \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seedance-upload\",\n  \"page_number\"\
          : 1,\n  \"page_size\": 20\n}'"
  /v1/assets/get:
    post:
      summary: 查询单个素材
      operationId: getAsset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - id
              properties:
                id:
                  type: string
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetGetResponse'
      tags:
      - 人像
      x-codeSamples:
      - lang: curl-post-v1-assets-get
        label: 查询单个素材
        source: "curl https://api.imarouter.com/v1/assets/get \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'"
  /v1/assets/update:
    post:
      summary: 更新素材名称
      operationId: updateAsset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - id
              - name
              properties:
                id:
                  type: string
                name:
                  type: string
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetIdResponse'
      tags:
      - 人像
      x-codeSamples:
      - lang: curl-post-v1-assets-update
        label: 更新素材名称
        source: "curl https://api.imarouter.com/v1/assets/update \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN'"
  /v1/assets/quota:
    post:
      summary: 查询素材配额信息
      operationId: getAssetQuota
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetQuotaResponse'
      tags:
      - 人像
      x-codeSamples:
      - lang: curl-post-v1-assets-quota
        label: 查询素材配额信息
        source: "curl https://api.imarouter.com/v1/assets/quota \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN'"
  /mj/submit/imagine:
    post:
      tags:
      - Midjourney
      summary: 提交 Midjourney 文生图 / 混合图
      description: 'Midjourney 异步任务提交端点（imagine + blend）。


        **支持模型：**

        - `mj_imagine`：文生图，传 `prompt`。

        - `mj_blend`：多图融合，传 `base64Array`（2~5 张）+ `dimensions`。


        **示例中覆盖的 prompt 参数：**

        - `--ar`：画面宽高比。

        - `--niji`：Niji 模式，例如 `--niji 7`。

        - `--stylize`：风格化强度。

        - `--sref`：风格参考 URL 或风格码。

        - `--sw`：风格参考权重，需配合 `--sref`。

        - `--p`：个性化 / profile 代码；和详细角色描述一起使用时，建议压缩主体提示词。

        - `--iw`：垫图权重；prompt 必须以图片 URL 开头。

        - `--c`：chaos 随机性参数。

        - `--w`：weird 怪异度参数。


        **稳定性提示：** 当前渠道下，长角色描述同时叠加 `--p` 与 `--sref` 容易终态失败并返回提示词格式错误。详细角色描述推荐使用不带 `--p` 的 `--sref` 示例；必须保留 `--p` 时，使用更短的主体提示词。


        **轮询：** `GET /mj/task/{task_id}/fetch`。

        '
      operationId: mjSubmitImagine
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MidjourneyImagineRequest'
            examples:
              mj_imagine_basic:
                summary: 基础文生图请求
                value:
                  model: mj_imagine
                  prompt: A cinematic portrait of a fox in autumn forest --ar 16:9 --v 6
                  botType: MID_JOURNEY
                  state: openapi-mj-basic
              mj_niji_sref_long_character:
                summary: Niji 长角色提示词 + 风格参考
                value:
                  model: mj_imagine
                  prompt: 'solo character, Pink long straight hair with blunt bangs, cat ears, red eyes, a small white flower
                    in hair, cute cheerful expression, bright sparkling eyes, soft smile, playful wink, hands near face, heart-shaped
                    hand gesture, fluffy pastel outfit, oversized ribbon, frilly short skirt, white thigh-high socks, soft
                    pink and cream color palette. Negative: grin, open_mouth, lips --sref 32944651::1 --niji 7 --stylize 100
                    --ar 1:1'
                  botType: NIJI_JOURNEY
                  state: openapi-mj-niji-sref-long
              mj_niji_personalization_short:
                summary: Niji 短提示词 + 个性化 + 风格参考
                value:
                  model: mj_imagine
                  prompt: 'solo character, pink long straight hair, cat ears, red eyes, white flower hair ornament, cute soft
                    smile, pastel fluffy outfit, kawaii style, warm soft colors. Negative: grin, open_mouth, lips --p dnnc2d9
                    --sref 32944651::1 --niji 7 --stylize 100 --ar 1:1'
                  botType: NIJI_JOURNEY
                  state: openapi-mj-p-short
              mj_niji_image_weight:
                summary: Niji 垫图 + 个性化 + 图片权重
                value:
                  model: mj_imagine
                  prompt: https://ws.esxscloud.com/ima/1947258201498259457/gateway_resource_1777257207877278629_3/c07d2f2953c124e45d633753c99d2612.png
                    cute cat girl, cozy room, warm lighting --p dnnc2d9 --iw 0.8 --niji 7 --ar 1:1
                  botType: NIJI_JOURNEY
                  state: openapi-mj-image-weight
              mj_niji_style_reference_image_weight:
                summary: Niji 垫图 + 风格参考 + 图片权重
                value:
                  model: mj_imagine
                  prompt: https://ws.esxscloud.com/ima/1947258201498259457/gateway_resource_1777257207877278629_3/c07d2f2953c124e45d633753c99d2612.png
                    cute cat girl, cozy room, warm lighting --sref https://ws.esxscloud.com/ima/1947258201498259457/gateway_resource_1776855857398177126_0/1776856029653793645_0.png
                    --sw 430 --iw 0.8 --niji 7 --stylize 100 --ar 1:1
                  botType: NIJI_JOURNEY
                  state: openapi-mj-sref-iw
              mj_niji_chaos_weird:
                summary: Niji chaos + weird 参数
                value:
                  model: mj_imagine
                  prompt: cute cat girl, cozy room, warm lighting --niji 7 --ar 1:1 --c 10 --w 430
                  botType: NIJI_JOURNEY
                  state: openapi-mj-chaos-weird
              mj_blend_two:
                summary: mj_blend 两图融合
                value:
                  model: mj_blend
                  base64Array:
                  - data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA...
                  - data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB...
                  dimensions: SQUARE
      responses:
        '200':
          description: 提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MidjourneySubmitResponse'
        '400':
          description: 参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-mj-imagine-basic
        label: 基础文生图请求
        source: "curl https://api.imarouter.com/mj/submit/imagine \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_imagine\"\
          ,\n  \"prompt\": \"A cinematic portrait of a fox in autumn forest --ar 16:9 --v 6\",\n  \"botType\": \"MID_JOURNEY\"\
          ,\n  \"state\": \"openapi-mj-basic\"\n}'"
      - lang: curl-mj-niji-sref-long-character
        label: Niji 长角色提示词 + 风格参考
        source: "curl https://api.imarouter.com/mj/submit/imagine \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_imagine\"\
          ,\n  \"prompt\": \"solo character, Pink long straight hair with blunt bangs, cat ears, red eyes, a small white flower\
          \ in hair, cute cheerful expression, bright sparkling eyes, soft smile, playful wink, hands near face, heart-shaped\
          \ hand gesture, fluffy pastel outfit, oversized ribbon, frilly short skirt, white thigh-high socks, soft pink and\
          \ cream color palette. Negative: grin, open_mouth, lips --sref 32944651::1 --niji 7 --stylize 100 --ar 1:1\",\n\
          \  \"botType\": \"NIJI_JOURNEY\",\n  \"state\": \"openapi-mj-niji-sref-long\"\n}'"
      - lang: curl-mj-niji-personalization-short
        label: Niji 短提示词 + 个性化 + 风格参考
        source: "curl https://api.imarouter.com/mj/submit/imagine \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_imagine\"\
          ,\n  \"prompt\": \"solo character, pink long straight hair, cat ears, red eyes, white flower hair ornament, cute\
          \ soft smile, pastel fluffy outfit, kawaii style, warm soft colors. Negative: grin, open_mouth, lips --p dnnc2d9\
          \ --sref 32944651::1 --niji 7 --stylize 100 --ar 1:1\",\n  \"botType\": \"NIJI_JOURNEY\",\n  \"state\": \"openapi-mj-p-short\"\
          \n}'"
      - lang: curl-mj-niji-image-weight
        label: Niji 垫图 + 个性化 + 图片权重
        source: "curl https://api.imarouter.com/mj/submit/imagine \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_imagine\"\
          ,\n  \"prompt\": \"https://ws.esxscloud.com/ima/1947258201498259457/gateway_resource_1777257207877278629_3/c07d2f2953c124e45d633753c99d2612.png\
          \ cute cat girl, cozy room, warm lighting --p dnnc2d9 --iw 0.8 --niji 7 --ar 1:1\",\n  \"botType\": \"NIJI_JOURNEY\"\
          ,\n  \"state\": \"openapi-mj-image-weight\"\n}'"
      - lang: curl-mj-niji-style-reference-image-weight
        label: Niji 垫图 + 风格参考 + 图片权重
        source: "curl https://api.imarouter.com/mj/submit/imagine \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_imagine\"\
          ,\n  \"prompt\": \"https://ws.esxscloud.com/ima/1947258201498259457/gateway_resource_1777257207877278629_3/c07d2f2953c124e45d633753c99d2612.png\
          \ cute cat girl, cozy room, warm lighting --sref https://ws.esxscloud.com/ima/1947258201498259457/gateway_resource_1776855857398177126_0/1776856029653793645_0.png\
          \ --sw 430 --iw 0.8 --niji 7 --stylize 100 --ar 1:1\",\n  \"botType\": \"NIJI_JOURNEY\",\n  \"state\": \"openapi-mj-sref-iw\"\
          \n}'"
      - lang: curl-mj-niji-chaos-weird
        label: Niji chaos + weird 参数
        source: "curl https://api.imarouter.com/mj/submit/imagine \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_imagine\"\
          ,\n  \"prompt\": \"cute cat girl, cozy room, warm lighting --niji 7 --ar 1:1 --c 10 --w 430\",\n  \"botType\": \"\
          NIJI_JOURNEY\",\n  \"state\": \"openapi-mj-chaos-weird\"\n}'"
      - lang: curl-mj-blend-two
        label: mj_blend 两图融合
        source: "curl https://api.imarouter.com/mj/submit/imagine \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_blend\"\
          ,\n  \"base64Array\": [\n    \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA...\",\n    \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB...\"\
          \n  ],\n  \"dimensions\": \"SQUARE\"\n}'"
  /mj/submit/blend:
    post:
      tags:
      - Midjourney
      summary: MJ 融图（Blend）
      description: '上传 2-5 张图片进行融合生成，返回任务 ID（异步）。

        鉴权：请求头必须包含 `Authorization: Bearer sk-...`。

        **重要提示（必读）**

        - `base64Array` 当前按图片 URL 输入处理，请在调用前确认 URL 可访问，并建议自行持久化原图。

        - 生成结果 URL 为平台托管短期链接，默认约 30 天后失效；请务必在 30 天内完成下载归档。

        '
      operationId: submitMidjourneyBlend
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - base64Array
              properties:
                base64Array:
                  type: array
                  minItems: 2
                  maxItems: 5
                  description: '2-5 张图片 URL 数组（当前实现按 URL 输入处理）。

                    **重要提示**：请在调用前确认输入 URL 可访问；30 天失效规则仅适用于接口返回的结果资源 URL。

                    '
                  items:
                    type: string
                prompt:
                  type: string
                  description: 可选，附加文字描述。
            examples:
              blend_two_images:
                summary: 两图融合
                value:
                  base64Array:
                  - https://example.com/a.png
                  - https://example.com/b.png
              blend_two_images_with_prompt:
                summary: 两图融合+文字
                value:
                  base64Array:
                  - https://example.com/a.png
                  - https://example.com/b.png
                  prompt: cinematic style
      responses:
        '200':
          description: 任务已提交
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MjSubmitResponse'
              examples:
                success:
                  value:
                    code: 1
                    result: task_id_blend_123
                    description: submitted
      x-codeSamples:
      - lang: curl-blend-two-images
        label: 两图融合
        source: "curl https://api.imarouter.com/mj/submit/blend \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"base64Array\": [\n   \
          \ \"https://example.com/a.png\",\n    \"https://example.com/b.png\"\n  ]\n}'"
      - lang: curl-blend-two-images-with-prompt
        label: 两图融合+文字
        source: "curl https://api.imarouter.com/mj/submit/blend \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"base64Array\": [\n   \
          \ \"https://example.com/a.png\",\n    \"https://example.com/b.png\"\n  ],\n  \"prompt\": \"cinematic style\"\n}'"
  /mj/submit/change:
    post:
      tags:
      - Midjourney
      summary: 提交 Midjourney 变体 / 放大 / 缩放等操作
      description: '对已有任务进行二次操作（U/V/zoom/pan 等）。**必填：** `taskId`（父任务）+ `customId`（按钮 customId）。


        **支持模型：**

        - `mj_upscale`、`mj_variation`、`mj_low_variation`、`mj_high_variation`、`mj_reroll`

        - `mj_zoom`、`mj_custom_zoom`、`mj_pan`


        `customId` 必须取自上一次任务返回的 `buttons[].customId`，否则上游会拒绝。

        '
      operationId: mjSubmitChange
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MidjourneyChangeRequest'
            examples:
              mj_upscale:
                summary: 放大 U
                value:
                  model: mj_upscale
                  taskId: '1751234567890'
                  customId: MJ::JOB::upsample::1::abc123
              mj_variation:
                summary: 变体 V
                value:
                  model: mj_variation
                  taskId: '1751234567890'
                  customId: MJ::JOB::variation::2::abc123
              mj_low_variation:
                summary: 低变化
                value:
                  model: mj_low_variation
                  taskId: '1751234567890'
                  customId: MJ::JOB::low_variation::1::abc123
              mj_high_variation:
                summary: 高变化
                value:
                  model: mj_high_variation
                  taskId: '1751234567890'
                  customId: MJ::JOB::high_variation::1::abc123
              mj_reroll:
                summary: 重新生成
                value:
                  model: mj_reroll
                  taskId: '1751234567890'
                  customId: MJ::JOB::reroll::0::abc123::SOLO
              mj_zoom:
                summary: 缩放外扩
                value:
                  model: mj_zoom
                  taskId: '1751234567890'
                  customId: MJ::Outpaint::50::1::abc123
              mj_custom_zoom:
                summary: 自定义缩放
                value:
                  model: mj_custom_zoom
                  taskId: '1751234567890'
                  customId: MJ::CustomZoom::1::abc123
                  prompt: --ar 16:9 --zoom 1.5
              mj_pan:
                summary: 延展平移
                value:
                  model: mj_pan
                  taskId: '1751234567890'
                  customId: MJ::JOB::pan_left::1::abc123::SOLO
      responses:
        '200':
          description: 提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MidjourneySubmitResponse'
        '400':
          description: 参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-mj-upscale
        label: 放大 U
        source: "curl https://api.imarouter.com/mj/submit/change \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_upscale\"\
          ,\n  \"taskId\": \"1751234567890\",\n  \"customId\": \"MJ::JOB::upsample::1::abc123\"\n}'"
      - lang: curl-mj-variation
        label: 变体 V
        source: "curl https://api.imarouter.com/mj/submit/change \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_variation\"\
          ,\n  \"taskId\": \"1751234567890\",\n  \"customId\": \"MJ::JOB::variation::2::abc123\"\n}'"
      - lang: curl-mj-low-variation
        label: 低变化
        source: "curl https://api.imarouter.com/mj/submit/change \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_low_variation\"\
          ,\n  \"taskId\": \"1751234567890\",\n  \"customId\": \"MJ::JOB::low_variation::1::abc123\"\n}'"
      - lang: curl-mj-high-variation
        label: 高变化
        source: "curl https://api.imarouter.com/mj/submit/change \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_high_variation\"\
          ,\n  \"taskId\": \"1751234567890\",\n  \"customId\": \"MJ::JOB::high_variation::1::abc123\"\n}'"
      - lang: curl-mj-reroll
        label: 重新生成
        source: "curl https://api.imarouter.com/mj/submit/change \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_reroll\"\
          ,\n  \"taskId\": \"1751234567890\",\n  \"customId\": \"MJ::JOB::reroll::0::abc123::SOLO\"\n}'"
      - lang: curl-mj-zoom
        label: 缩放外扩
        source: "curl https://api.imarouter.com/mj/submit/change \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_zoom\",\n\
          \  \"taskId\": \"1751234567890\",\n  \"customId\": \"MJ::Outpaint::50::1::abc123\"\n}'"
      - lang: curl-mj-custom-zoom
        label: 自定义缩放
        source: "curl https://api.imarouter.com/mj/submit/change \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_custom_zoom\"\
          ,\n  \"taskId\": \"1751234567890\",\n  \"customId\": \"MJ::CustomZoom::1::abc123\",\n  \"prompt\": \"--ar 16:9 --zoom\
          \ 1.5\"\n}'"
      - lang: curl-mj-pan
        label: 延展平移
        source: "curl https://api.imarouter.com/mj/submit/change \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_pan\",\n\
          \  \"taskId\": \"1751234567890\",\n  \"customId\": \"MJ::JOB::pan_left::1::abc123::SOLO\"\n}'"
  /mj/task/{task_id}/fetch:
    get:
      tags:
      - Midjourney
      summary: 查询 Midjourney 任务状态
      description: '通过 `task_id` 查询 Midjourney 任务（imagine/change/modal）的状态、进度、结果图 URL 与可用 buttons。


        **终止状态：** `SUCCESS` / `FAILURE` / `CANCEL`；非终止：`NOT_START` / `SUBMITTED` / `MODAL` / `IN_PROGRESS`。

        '
      operationId: mjFetchTask
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
        description: 提交时返回的任务 ID（即 result 字段）。
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MidjourneyTaskResponse'
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-get-mj-task-task-id-fetch
        label: 查询 Midjourney 任务状态
        source: "curl https://api.imarouter.com/mj/task/task_202604270001/fetch \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'"
  /mj/image/{task_id}:
    get:
      tags:
      - Midjourney
      summary: MJ 图片代理（首图）
      description: '代理获取 MJ 任务的首图（`imageUrl` 对应）。

        若需完整图集，请优先读取 `/mj/task/{task_id}/fetch` 的 `urls`。

        **严重告知（必读）**

        - 代理图片仍来自查询结果资源，请立即下载并自行持久化保存。

        - 平台不保证代理图片 URL 长期可访问，默认约 30 天后失效；不要把该 URL 当作永久存储地址。

        '
      operationId: fetchMidjourneyImage
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
        description: MJ 任务 ID。
      responses:
        '200':
          description: 图片二进制流
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
                description: 图片二进制流（通常为 `image/png` 或 `image/jpeg`）。
      x-codeSamples:
      - lang: curl-get-mj-image-task-id
        label: MJ 图片代理（首图）
        source: "curl https://api.imarouter.com/mj/image/task_202604270001 \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'"
  /v1/chat/completions:
    post:
      tags:
      - LLM
      summary: 创建对话补全
      description: '兼容 OpenAI Chat Completions API 格式。支持流式和非流式响应。


        **可用模型（47 个）：**


        | 供应商 | 模型 |

        |--------|------|

        | OpenAI | `gpt-4.1`, `gpt-4.1-mini`, `gpt-4.1-nano`, `gpt-4o`, `gpt-4o-mini`, `gpt-5`, `gpt-5-mini`, `gpt-5.1`, `gpt-5.2`,
        `gpt-5.3-codex`, `gpt-5.4-mini` |

        | Google | `gemini-3.1-pro-preview`, `gemini-3-pro-preview`, `gemini-3-flash-preview`, `gemini-3-pro-image-preview`⚡,
        `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite`, `gemini-2.5-flash-image`⚡, `gemini-2.0-flash`, `g3-pro-image-preview`⚡,
        `g2.5-flash-image`⚡ |

        | Anthropic | `claude-3-haiku-20240307`, `claude-3-5-haiku-20241022`, `claude-sonnet-4-20250514`, `claude-sonnet-4-5-20250929`,
        `claude-sonnet-4-6`, `claude-haiku-4-5-20251001`, `claude-opus-4-1-20250805`, `claude-opus-4-5-20251101`, `claude-opus-4-6`
        |

        | 字节跳动 | `seed-1-8-251228`, `seed-2-0-mini-260215`, `seed-1-6-flash-250715`, `seed-1-6-250915`, `seed-sc-260215`,
        `gpt-oss-120b-250805` |

        | DeepSeek | `deepseek-v4-pro`, `deepseek-v4-flash` |

        | MiniMax | `MiniMax-Text-01`, `MiniMax-M1`, `MiniMax-M2`, `MiniMax-M2.1`, `MiniMax-M2.1-highspeed`, `MiniMax-M2.5`,
        `MiniMax-M2.5-highspeed` |

        | Moonshot | `kimi-for-coding` |


        **模型端点能力（2026-05-04 已验证）：**

        | 端点标识 | 网关路径 | 当前可用模型 |

        |---------|---------|-------------|

        | `openai` | `/v1/chat/completions` | Chat 模型通用，包含 `deepseek-v4-pro`、`deepseek-v4-flash`、`gpt-5.4-mini`、`seed-sc-260215`,
        `deepseek-v4-flash` |

        | `openai-response` | `/v1/responses` | `gpt-5.2`, `gpt-5.3-codex`, `gpt-5.5` |

        | `anthropic` | `/v1/messages` | `claude-sonnet-4-6`, `claude-opus-4-6` |


        > ⚡ 带 ⚡ 标记的模型支持对话式生图，返回内联 base64 图片。`deepseek-v4-pro`, `deepseek-v4-flash` 当前按纯文本对话模型接入。MiniMax M 系列、`kimi-for-coding`
        为推理模型，响应包含思维链内容。Anthropic Claude 系列通过 AWS Bedrock 接入。


        > ⚠️ **推理模型注意事项**：MiniMax M 系列（`MiniMax-M2` 至 `MiniMax-M2.5-highspeed`）和 `kimi-for-coding` 在生成正式回答前会先输出思维链（`reasoning_content`
        字段），思维链本身会消耗大量 token。**建议 `max_tokens` 设置不低于 1000**，否则 token 配额可能在推理阶段耗尽，导致 `content` 为空。

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            examples:
              basic:
                summary: 基础对话
                value:
                  model: gpt-4.1-mini
                  messages:
                  - role: user
                    content: Hello, how are you?
              stream:
                summary: 流式对话
                value:
                  model: claude-sonnet-4-6
                  messages:
                  - role: user
                    content: Write a short poem about AI
              claude:
                summary: Claude 对话
                value:
                  model: claude-sonnet-4-6
                  messages:
                  - role: user
                    content: Hello, what can you help me with?
              claude_opus_4_7:
                summary: Claude Opus 4.7 旗舰对话
                value:
                  model: claude-opus-4-7
                  messages:
                  - role: user
                    content: Plan a 3-day Tokyo itinerary for first-time visitors
              deepseek_text:
                summary: DeepSeek 文本对话
                value:
                  model: deepseek-v4-pro
                  messages:
                  - role: user
                    content: Summarize the benefits of API gateways in one sentence
              deepseek_flash_text:
                summary: DeepSeek Flash 文本对话
                value:
                  model: deepseek-v4-flash
                  messages:
                  - role: user
                    content: Summarize this paragraph in one sentence
              gpt_5_4_mini_text:
                summary: gpt-5.4-mini 文本对话
                value:
                  model: gpt-5.4-mini
                  messages:
                  - role: user
                    content: List three practical API design tips
              seed_sc_text:
                summary: seed-sc 中文对话
                value:
                  model: seed-sc-260215
                  messages:
                  - role: user
                    content: 用一句话总结 API 网关的作用
              minimax_reasoning:
                summary: MiniMax 推理模型
                value:
                  model: MiniMax-M2.5
                  messages:
                  - role: user
                    content: Explain the difference between recursion and iteration
                  max_tokens: 2000
              function_tools:
                summary: Function Tools（OpenAI 格式）
                value:
                  model: gpt-5.1
                  messages:
                  - role: user
                    content: What's weather in Shanghai? Use tool.
                  tools:
                  - type: function
                    function:
                      name: get_weather
                      description: Get weather by city
                      parameters:
                        type: object
                        properties:
                          city:
                            type: string
                        required:
                        - city
                  tool_choice: auto
              gpt-4.1_default:
                summary: gpt-4.1 默认预设
                value:
                  model: gpt-4.1
                  messages:
                  - role: system
                    content: You are a helpful assistant.
                  temperature: 1
                  max_tokens: 4096
              gpt-4.1-mini_default:
                summary: gpt-4.1-mini 默认预设
                value:
                  model: gpt-4.1-mini
                  messages:
                  - role: system
                    content: You are a helpful assistant.
                  temperature: 1
                  max_tokens: 4096
              gpt-4.1-nano_default:
                summary: gpt-4.1-nano 默认预设
                value:
                  model: gpt-4.1-nano
                  messages:
                  - role: system
                    content: You are a helpful assistant.
                  temperature: 1
                  max_tokens: 2048
              gpt-4o_default:
                summary: gpt-4o 默认预设
                value:
                  model: gpt-4o
                  messages:
                  - role: system
                    content: You are a helpful assistant.
                  temperature: 1
                  max_tokens: 4096
              gpt-4o-mini_default:
                summary: gpt-4o-mini 默认预设
                value:
                  model: gpt-4o-mini
                  messages:
                  - role: system
                    content: You are a helpful assistant.
                  temperature: 1
                  max_tokens: 4096
              gpt-5_default:
                summary: gpt-5 默认预设
                value:
                  model: gpt-5
                  messages:
                  - role: system
                    content: You are a helpful assistant.
                  temperature: 1
                  max_tokens: 8192
              gpt-5-mini_default:
                summary: gpt-5-mini 默认预设
                value:
                  model: gpt-5-mini
                  messages:
                  - role: system
                    content: You are a helpful assistant.
                  temperature: 1
                  max_tokens: 8192
              gpt-5.1_default:
                summary: gpt-5.1 默认预设
                value:
                  model: gpt-5.1
                  messages:
                  - role: system
                    content: You are a helpful assistant.
                  temperature: 1
                  max_tokens: 8192
              MiniMax-Text-01_default:
                summary: MiniMax-Text-01 默认预设
                value:
                  model: MiniMax-Text-01
                  messages:
                  - role: system
                    content: You are a helpful assistant.
                  temperature: 0.9
                  max_tokens: 4096
              MiniMax-M1_default:
                summary: MiniMax-M1 默认预设
                value:
                  model: MiniMax-M1
                  messages:
                  - role: user
                    content: Explain how a transformer attention head works in 3 short bullet points.
                  temperature: 0.7
                  max_tokens: 4096
              MiniMax-M2_default:
                summary: MiniMax-M2 默认预设
                value:
                  model: MiniMax-M2
                  messages:
                  - role: user
                    content: Explain the difference between recursion and iteration.
                  temperature: 0.7
                  max_tokens: 4096
              MiniMax-M2.1_default:
                summary: MiniMax-M2.1 默认预设
                value:
                  model: MiniMax-M2.1
                  messages:
                  - role: user
                    content: Explain the difference between recursion and iteration.
                  temperature: 0.7
                  max_tokens: 4096
              MiniMax-M2.1-highspeed_default:
                summary: MiniMax-M2.1-highspeed 默认预设
                value:
                  model: MiniMax-M2.1-highspeed
                  messages:
                  - role: user
                    content: Explain the difference between recursion and iteration.
                  temperature: 0.7
                  max_tokens: 4096
              MiniMax-M2.5_default:
                summary: MiniMax-M2.5 默认预设
                value:
                  model: MiniMax-M2.5
                  messages:
                  - role: user
                    content: Explain the difference between recursion and iteration.
                  temperature: 0.7
                  max_tokens: 4096
              MiniMax-M2.5-highspeed_default:
                summary: MiniMax-M2.5-highspeed 默认预设
                value:
                  model: MiniMax-M2.5-highspeed
                  messages:
                  - role: user
                    content: Explain the difference between recursion and iteration.
                  temperature: 0.7
                  max_tokens: 4096
              claude-sonnet-4-5-20250929_default:
                summary: claude-sonnet-4-5 默认预设
                value:
                  model: claude-sonnet-4-5-20250929
                  messages:
                  - role: user
                    content: Hello, what can you help me with?
                  temperature: 1
                  max_tokens: 4096
              claude-sonnet-4-6_default:
                summary: claude-sonnet-4-6 默认预设
                value:
                  model: claude-sonnet-4-6
                  messages:
                  - role: user
                    content: Hello, what can you help me with?
                  temperature: 1
                  max_tokens: 4096
              claude-haiku-4-5-20251001_default:
                summary: claude-haiku-4-5 默认预设
                value:
                  model: claude-haiku-4-5-20251001
                  messages:
                  - role: user
                    content: Summarize this paragraph in one sentence.
                  temperature: 1
                  max_tokens: 2048
              claude-opus-4-5-20251101_default:
                summary: claude-opus-4-5 默认预设
                value:
                  model: claude-opus-4-5-20251101
                  messages:
                  - role: user
                    content: Plan a 3-day Tokyo itinerary for first-time visitors.
                  temperature: 1
                  max_tokens: 8192
              claude-opus-4-6_default:
                summary: claude-opus-4-6 默认预设
                value:
                  model: claude-opus-4-6
                  messages:
                  - role: user
                    content: Plan a 3-day Tokyo itinerary for first-time visitors.
                  temperature: 1
                  max_tokens: 8192
              claude-opus-4-7_default:
                summary: claude-opus-4-7 默认预设
                value:
                  model: claude-opus-4-7
                  messages:
                  - role: user
                    content: Plan a 3-day Tokyo itinerary for first-time visitors.
                  temperature: 1
                  max_tokens: 8192
              kimi-for-coding_default:
                summary: kimi-for-coding 编程默认预设
                value:
                  model: kimi-for-coding
                  messages:
                  - role: system
                    content: You are an expert programmer. Output concise, correct code with minimal explanation.
                  - role: user
                    content: Write a Python function that returns the nth Fibonacci number using memoization.
                  temperature: 0.2
                  max_tokens: 8192
              deepseek-v4-pro_default:
                summary: deepseek-v4-pro 默认预设
                value:
                  model: deepseek-v4-pro
                  messages:
                  - role: user
                    content: Summarize the benefits of API gateways in one sentence.
                  temperature: 0.7
                  max_tokens: 4096
              deepseek-v4-flash_default:
                summary: deepseek-v4-flash 默认预设
                value:
                  model: deepseek-v4-flash
                  messages:
                  - role: user
                    content: Summarize the benefits of API gateways in one sentence.
                  temperature: 0.7
                  max_tokens: 4096
              gpt-5.4-mini_default:
                summary: gpt-5.4-mini 默认预设
                value:
                  model: gpt-5.4-mini
                  messages:
                  - role: system
                    content: You are a helpful assistant.
                  - role: user
                    content: List three practical API design tips.
                  temperature: 1
                  max_tokens: 8192
              seed-sc-260215_default:
                summary: seed-sc-260215 默认预设
                value:
                  model: seed-sc-260215
                  messages:
                  - role: user
                    content: 用一句话总结 API 网关的作用。
                  temperature: 0.7
                  max_tokens: 4096
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-basic
        label: 基础对话
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-4.1-mini\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello, how are you?\"\n    }\n  ]\n\
          }'"
      - lang: curl-stream
        label: 流式对话
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-sonnet-4-6\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Write a short poem about AI\"\n   \
          \ }\n  ]\n}'"
      - lang: curl-claude
        label: Claude 对话
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-sonnet-4-6\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello, what can you help me with?\"\
          \n    }\n  ]\n}'"
      - lang: curl-claude-opus-4-7
        label: Claude Opus 4.7 旗舰对话
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-opus-4-7\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Plan a 3-day Tokyo itinerary for first-time\
          \ visitors\"\n    }\n  ]\n}'"
      - lang: curl-deepseek-text
        label: DeepSeek 文本对话
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"deepseek-v4-pro\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Summarize the benefits of API gateways\
          \ in one sentence\"\n    }\n  ]\n}'"
      - lang: curl-deepseek-flash-text
        label: DeepSeek Flash 文本对话
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"deepseek-v4-flash\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Summarize this paragraph in one sentence\"\
          \n    }\n  ]\n}'"
      - lang: curl-gpt-5-4-mini-text
        label: gpt-5.4-mini 文本对话
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-5.4-mini\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"List three practical API design tips\"\
          \n    }\n  ]\n}'"
      - lang: curl-seed-sc-text
        label: seed-sc 中文对话
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seed-sc-260215\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"用一句话总结 API 网关的作用\"\n    }\n  ]\n}'"
      - lang: curl-minimax-reasoning
        label: MiniMax 推理模型
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-M2.5\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Explain the difference between recursion\
          \ and iteration\"\n    }\n  ],\n  \"max_tokens\": 2000\n}'"
      - lang: curl-function-tools
        label: Function Tools（OpenAI 格式）
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-5.1\",\n\
          \  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"What'\"'\"'s weather in Shanghai? Use\
          \ tool.\"\n    }\n  ],\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"\
          name\": \"get_weather\",\n        \"description\": \"Get weather by city\",\n        \"parameters\": {\n       \
          \   \"type\": \"object\",\n          \"properties\": {\n            \"city\": {\n              \"type\": \"string\"\
          \n            }\n          },\n          \"required\": [\n            \"city\"\n          ]\n        }\n      }\n\
          \    }\n  ],\n  \"tool_choice\": \"auto\"\n}'"
      - lang: curl-gpt-4-1-default
        label: gpt-4.1 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-4.1\",\n\
          \  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a helpful assistant.\"\n  \
          \  }\n  ],\n  \"temperature\": 1,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-gpt-4-1-mini-default
        label: gpt-4.1-mini 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-4.1-mini\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a helpful assistant.\"\n\
          \    }\n  ],\n  \"temperature\": 1,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-gpt-4-1-nano-default
        label: gpt-4.1-nano 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-4.1-nano\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a helpful assistant.\"\n\
          \    }\n  ],\n  \"temperature\": 1,\n  \"max_tokens\": 2048\n}'"
      - lang: curl-gpt-4o-default
        label: gpt-4o 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-4o\",\n\
          \  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a helpful assistant.\"\n  \
          \  }\n  ],\n  \"temperature\": 1,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-gpt-4o-mini-default
        label: gpt-4o-mini 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-4o-mini\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a helpful assistant.\"\n\
          \    }\n  ],\n  \"temperature\": 1,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-gpt-5-default
        label: gpt-5 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-5\",\n\
          \  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a helpful assistant.\"\n  \
          \  }\n  ],\n  \"temperature\": 1,\n  \"max_tokens\": 8192\n}'"
      - lang: curl-gpt-5-mini-default
        label: gpt-5-mini 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-5-mini\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a helpful assistant.\"\n\
          \    }\n  ],\n  \"temperature\": 1,\n  \"max_tokens\": 8192\n}'"
      - lang: curl-gpt-5-1-default
        label: gpt-5.1 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-5.1\",\n\
          \  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a helpful assistant.\"\n  \
          \  }\n  ],\n  \"temperature\": 1,\n  \"max_tokens\": 8192\n}'"
      - lang: curl-minimax-text-01-default
        label: MiniMax-Text-01 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-Text-01\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a helpful assistant.\"\n\
          \    }\n  ],\n  \"temperature\": 0.9,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-minimax-m1-default
        label: MiniMax-M1 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-M1\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Explain how a transformer attention\
          \ head works in 3 short bullet points.\"\n    }\n  ],\n  \"temperature\": 0.7,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-minimax-m2-default
        label: MiniMax-M2 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-M2\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Explain the difference between recursion\
          \ and iteration.\"\n    }\n  ],\n  \"temperature\": 0.7,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-minimax-m2-1-default
        label: MiniMax-M2.1 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-M2.1\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Explain the difference between recursion\
          \ and iteration.\"\n    }\n  ],\n  \"temperature\": 0.7,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-minimax-m2-1-highspeed-default
        label: MiniMax-M2.1-highspeed 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-M2.1-highspeed\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Explain the difference between recursion\
          \ and iteration.\"\n    }\n  ],\n  \"temperature\": 0.7,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-minimax-m2-5-default
        label: MiniMax-M2.5 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-M2.5\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Explain the difference between recursion\
          \ and iteration.\"\n    }\n  ],\n  \"temperature\": 0.7,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-minimax-m2-5-highspeed-default
        label: MiniMax-M2.5-highspeed 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-M2.5-highspeed\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Explain the difference between recursion\
          \ and iteration.\"\n    }\n  ],\n  \"temperature\": 0.7,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-claude-sonnet-4-5-20250929-default
        label: claude-sonnet-4-5 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-sonnet-4-5-20250929\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello, what can you help me with?\"\
          \n    }\n  ],\n  \"temperature\": 1,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-claude-sonnet-4-6-default
        label: claude-sonnet-4-6 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-sonnet-4-6\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello, what can you help me with?\"\
          \n    }\n  ],\n  \"temperature\": 1,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-claude-haiku-4-5-20251001-default
        label: claude-haiku-4-5 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-haiku-4-5-20251001\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Summarize this paragraph in one sentence.\"\
          \n    }\n  ],\n  \"temperature\": 1,\n  \"max_tokens\": 2048\n}'"
      - lang: curl-claude-opus-4-5-20251101-default
        label: claude-opus-4-5 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-opus-4-5-20251101\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Plan a 3-day Tokyo itinerary for first-time\
          \ visitors.\"\n    }\n  ],\n  \"temperature\": 1,\n  \"max_tokens\": 8192\n}'"
      - lang: curl-claude-opus-4-6-default
        label: claude-opus-4-6 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-opus-4-6\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Plan a 3-day Tokyo itinerary for first-time\
          \ visitors.\"\n    }\n  ],\n  \"temperature\": 1,\n  \"max_tokens\": 8192\n}'"
      - lang: curl-claude-opus-4-7-default
        label: claude-opus-4-7 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-opus-4-7\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Plan a 3-day Tokyo itinerary for first-time\
          \ visitors.\"\n    }\n  ],\n  \"temperature\": 1,\n  \"max_tokens\": 8192\n}'"
      - lang: curl-kimi-for-coding-default
        label: kimi-for-coding 编程默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kimi-for-coding\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are an expert programmer. Output\
          \ concise, correct code with minimal explanation.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\"\
          : \"Write a Python function that returns the nth Fibonacci number using memoization.\"\n    }\n  ],\n  \"temperature\"\
          : 0.2,\n  \"max_tokens\": 8192\n}'"
      - lang: curl-deepseek-v4-pro-default
        label: deepseek-v4-pro 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"deepseek-v4-pro\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Summarize the benefits of API gateways\
          \ in one sentence.\"\n    }\n  ],\n  \"temperature\": 0.7,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-deepseek-v4-flash-default
        label: deepseek-v4-flash 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"deepseek-v4-flash\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Summarize the benefits of API gateways\
          \ in one sentence.\"\n    }\n  ],\n  \"temperature\": 0.7,\n  \"max_tokens\": 4096\n}'"
      - lang: curl-gpt-5-4-mini-default
        label: gpt-5.4-mini 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-5.4-mini\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a helpful assistant.\"\n\
          \    },\n    {\n      \"role\": \"user\",\n      \"content\": \"List three practical API design tips.\"\n    }\n\
          \  ],\n  \"temperature\": 1,\n  \"max_tokens\": 8192\n}'"
      - lang: curl-seed-sc-260215-default
        label: seed-sc-260215 默认预设
        source: "curl https://api.imarouter.com/v1/chat/completions \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"seed-sc-260215\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"用一句话总结 API 网关的作用。\"\n    }\n  ],\n\
          \  \"temperature\": 0.7,\n  \"max_tokens\": 4096\n}'"
  /v1/responses:
    post:
      tags:
      - LLM
      summary: 创建 Responses 响应
      description: '兼容 OpenAI Responses API 格式。


        仅支持启用了 `openai-response` 端点能力的模型。

        **当前已验证模型（2026-05-04）：** `gpt-5.2`、`gpt-5.3-codex`、`gpt-5.5`

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsesRequest'
            examples:
              gpt-5.2_default:
                summary: gpt-5.2 默认预设
                value:
                  model: gpt-5.2
                  input: Hello, what can you help me with?
                  max_output_tokens: 8192
                  temperature: 1
              gpt-5.3-codex_default:
                summary: gpt-5.3-codex 编程默认预设
                value:
                  model: gpt-5.3-codex
                  input: Write a Python function that returns the nth Fibonacci number using memoization.
                  max_output_tokens: 16384
                  temperature: 0.3
              gpt-5.4_default:
                summary: gpt-5.4 默认预设
                value:
                  model: gpt-5.4
                  input: List 3 tips for writing clean Python.
                  max_output_tokens: 8192
                  temperature: 1
              gpt-5.5_default:
                summary: gpt-5.5 默认预设
                value:
                  model: gpt-5.5
                  input: Explain agentic coding in 3 sentences.
                  max_output_tokens: 8192
                  temperature: 1
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsesResponse'
        '400':
          description: 参数错误或模型不支持该端点
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-gpt-5-2-default
        label: gpt-5.2 默认预设
        source: "curl https://api.imarouter.com/v1/responses \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-5.2\",\n  \"input\": \"Hello,\
          \ what can you help me with?\",\n  \"max_output_tokens\": 8192,\n  \"temperature\": 1\n}'"
      - lang: curl-gpt-5-3-codex-default
        label: gpt-5.3-codex 编程默认预设
        source: "curl https://api.imarouter.com/v1/responses \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-5.3-codex\",\n  \"input\"\
          : \"Write a Python function that returns the nth Fibonacci number using memoization.\",\n  \"max_output_tokens\"\
          : 16384,\n  \"temperature\": 0.3\n}'"
      - lang: curl-gpt-5-4-default
        label: gpt-5.4 默认预设
        source: "curl https://api.imarouter.com/v1/responses \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-5.4\",\n  \"input\": \"List\
          \ 3 tips for writing clean Python.\",\n  \"max_output_tokens\": 8192,\n  \"temperature\": 1\n}'"
      - lang: curl-gpt-5-5-default
        label: gpt-5.5 默认预设
        source: "curl https://api.imarouter.com/v1/responses \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"gpt-5.5\",\n  \"input\": \"Explain\
          \ agentic coding in 3 sentences.\",\n  \"max_output_tokens\": 8192,\n  \"temperature\": 1\n}'"
  /v1/messages:
    post:
      tags:
      - LLM
      summary: 创建 Anthropic Messages 响应
      description: '兼容 Anthropic Messages API 格式。


        仅支持启用了 `anthropic` 端点能力的模型。

        **当前已验证模型（2026-05-22）：** `claude-sonnet-4-6`、`claude-opus-4-6`、`glm-5.1`、`deepseek-v4-flash`

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnthropicMessagesRequest'
            examples:
              claude-sonnet-4-5-20250929_default:
                summary: claude-sonnet-4-5 默认预设
                value:
                  model: claude-sonnet-4-5-20250929
                  anthropic_version: bedrock-2023-05-31
                  max_tokens: 4096
                  temperature: 1
                  system: You are a helpful assistant.
                  messages:
                  - role: user
                    content: Hello, what can you help me with?
              claude-sonnet-4-6_default:
                summary: claude-sonnet-4-6 默认预设
                value:
                  model: claude-sonnet-4-6
                  anthropic_version: bedrock-2023-05-31
                  max_tokens: 4096
                  temperature: 1
                  system: You are a helpful assistant.
                  messages:
                  - role: user
                    content: Hello, what can you help me with?
              claude-haiku-4-5-20251001_default:
                summary: claude-haiku-4-5 默认预设
                value:
                  model: claude-haiku-4-5-20251001
                  anthropic_version: bedrock-2023-05-31
                  max_tokens: 2048
                  temperature: 1
                  system: You are a concise summarizer.
                  messages:
                  - role: user
                    content: Summarize this paragraph in one sentence.
              claude-opus-4-5-20251101_default:
                summary: claude-opus-4-5 默认预设
                value:
                  model: claude-opus-4-5-20251101
                  anthropic_version: bedrock-2023-05-31
                  max_tokens: 8192
                  temperature: 1
                  system: You are a careful planner.
                  messages:
                  - role: user
                    content: Plan a 3-day Tokyo itinerary for first-time visitors.
              claude-opus-4-6_default:
                summary: claude-opus-4-6 默认预设
                value:
                  model: claude-opus-4-6
                  anthropic_version: bedrock-2023-05-31
                  max_tokens: 8192
                  temperature: 1
                  system: You are a careful planner.
                  messages:
                  - role: user
                    content: Plan a 3-day Tokyo itinerary for first-time visitors.
              claude-opus-4-7_default:
                summary: claude-opus-4-7 默认预设
                value:
                  model: claude-opus-4-7
                  anthropic_version: bedrock-2023-05-31
                  max_tokens: 8192
                  temperature: 1
                  system: You are a careful planner.
                  messages:
                  - role: user
                    content: Plan a 3-day Tokyo itinerary for first-time visitors.
              glm-5.1_default:
                summary: glm-5.1 默认预设
                value:
                  model: glm-5.1
                  anthropic_version: bedrock-2023-05-31
                  max_tokens: 4096
                  temperature: 1
                  system: You are a helpful assistant.
                  messages:
                  - role: user
                    content: Hello, what can you help me with?
              deepseek-v4-flash_default:
                summary: deepseek-v4-flash 默认预设
                value:
                  model: deepseek-v4-flash
                  anthropic_version: bedrock-2023-05-31
                  max_tokens: 4096
                  temperature: 1
                  system: You are a helpful assistant.
                  messages:
                  - role: user
                    content: Summarize the benefits of API gateways in one sentence.
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnthropicMessagesResponse'
        '400':
          description: 参数错误或模型不支持该端点
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-claude-sonnet-4-5-20250929-default
        label: claude-sonnet-4-5 默认预设
        source: "curl https://api.imarouter.com/v1/messages \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-sonnet-4-5-20250929\",\n\
          \  \"anthropic_version\": \"bedrock-2023-05-31\",\n  \"max_tokens\": 4096,\n  \"temperature\": 1,\n  \"system\"\
          : \"You are a helpful assistant.\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"\
          Hello, what can you help me with?\"\n    }\n  ]\n}'"
      - lang: curl-claude-sonnet-4-6-default
        label: claude-sonnet-4-6 默认预设
        source: "curl https://api.imarouter.com/v1/messages \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-sonnet-4-6\",\n  \"anthropic_version\"\
          : \"bedrock-2023-05-31\",\n  \"max_tokens\": 4096,\n  \"temperature\": 1,\n  \"system\": \"You are a helpful assistant.\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello, what can you help me with?\"\
          \n    }\n  ]\n}'"
      - lang: curl-claude-haiku-4-5-20251001-default
        label: claude-haiku-4-5 默认预设
        source: "curl https://api.imarouter.com/v1/messages \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-haiku-4-5-20251001\",\n\
          \  \"anthropic_version\": \"bedrock-2023-05-31\",\n  \"max_tokens\": 2048,\n  \"temperature\": 1,\n  \"system\"\
          : \"You are a concise summarizer.\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"\
          Summarize this paragraph in one sentence.\"\n    }\n  ]\n}'"
      - lang: curl-claude-opus-4-5-20251101-default
        label: claude-opus-4-5 默认预设
        source: "curl https://api.imarouter.com/v1/messages \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-opus-4-5-20251101\",\n\
          \  \"anthropic_version\": \"bedrock-2023-05-31\",\n  \"max_tokens\": 8192,\n  \"temperature\": 1,\n  \"system\"\
          : \"You are a careful planner.\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Plan\
          \ a 3-day Tokyo itinerary for first-time visitors.\"\n    }\n  ]\n}'"
      - lang: curl-claude-opus-4-6-default
        label: claude-opus-4-6 默认预设
        source: "curl https://api.imarouter.com/v1/messages \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-opus-4-6\",\n  \"anthropic_version\"\
          : \"bedrock-2023-05-31\",\n  \"max_tokens\": 8192,\n  \"temperature\": 1,\n  \"system\": \"You are a careful planner.\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Plan a 3-day Tokyo itinerary for first-time\
          \ visitors.\"\n    }\n  ]\n}'"
      - lang: curl-claude-opus-4-7-default
        label: claude-opus-4-7 默认预设
        source: "curl https://api.imarouter.com/v1/messages \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"claude-opus-4-7\",\n  \"anthropic_version\"\
          : \"bedrock-2023-05-31\",\n  \"max_tokens\": 8192,\n  \"temperature\": 1,\n  \"system\": \"You are a careful planner.\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Plan a 3-day Tokyo itinerary for first-time\
          \ visitors.\"\n    }\n  ]\n}'"
      - lang: curl-glm-5-1-default
        label: glm-5.1 默认预设
        source: "curl https://api.imarouter.com/v1/messages \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"glm-5.1\",\n  \"anthropic_version\"\
          : \"bedrock-2023-05-31\",\n  \"max_tokens\": 4096,\n  \"temperature\": 1,\n  \"system\": \"You are a helpful assistant.\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello, what can you help me with?\"\
          \n    }\n  ]\n}'"
      - lang: curl-deepseek-v4-flash-default
        label: deepseek-v4-flash 默认预设
        source: "curl https://api.imarouter.com/v1/messages \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"deepseek-v4-flash\",\n  \"anthropic_version\"\
          : \"bedrock-2023-05-31\",\n  \"max_tokens\": 4096,\n  \"temperature\": 1,\n  \"system\": \"You are a helpful assistant.\"\
          ,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Summarize the benefits of API gateways\
          \ in one sentence.\"\n    }\n  ]\n}'"
  /v1/embeddings:
    post:
      tags:
      - LLM
      summary: 创建文本向量（Embeddings）
      description: '把文本转为向量表示，适用于语义搜索、聚类、RAG 检索等场景。


        **支持模型：**

        - `text-embedding-3-large`（推荐，3072 维，支持 dimensions 参数缩减输出维度）

        - `text-embedding-3-small`（轻量向量模型，适合成本敏感的检索场景）


        **参数：**

        - `input`：文本或文本数组；批量时一次请求传多条更高效。

        - `dimensions`：可选，整数；显式指定输出向量维度（1 ~ 3072），不传则用模型默认值。

        - `encoding_format`：`float`（默认）返回浮点数组；`base64` 返回紧凑编码字符串。

        - `user`：可选，终端用户标识，用于平台滥用风控。

        '
      operationId: createEmbeddings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingRequest'
            examples:
              basic:
                summary: 单条文本
                value:
                  model: text-embedding-3-large
                  input: API gateways simplify routing, auth, and rate limits.
              batch:
                summary: 批量文本
                value:
                  model: text-embedding-3-large
                  input:
                  - first sentence to embed
                  - second sentence to embed
                  encoding_format: float
              high_dim:
                summary: 指定 dimensions
                value:
                  model: text-embedding-3-large
                  input: keep this short
                  dimensions: 256
              small_model:
                summary: text-embedding-3-small 单条文本
                value:
                  model: text-embedding-3-small
                  input: API gateways simplify routing, auth, and rate limits.
                  encoding_format: float
      responses:
        '200':
          description: 调用成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingResponse'
        '400':
          description: 参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-basic
        label: 单条文本
        source: "curl https://api.imarouter.com/v1/embeddings \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"text-embedding-3-large\",\n  \"\
          input\": \"API gateways simplify routing, auth, and rate limits.\"\n}'"
      - lang: curl-batch
        label: 批量文本
        source: "curl https://api.imarouter.com/v1/embeddings \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"text-embedding-3-large\",\n  \"\
          input\": [\n    \"first sentence to embed\",\n    \"second sentence to embed\"\n  ],\n  \"encoding_format\": \"\
          float\"\n}'"
      - lang: curl-high-dim
        label: 指定 dimensions
        source: "curl https://api.imarouter.com/v1/embeddings \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"text-embedding-3-large\",\n  \"\
          input\": \"keep this short\",\n  \"dimensions\": 256\n}'"
      - lang: curl-small-model
        label: text-embedding-3-small 单条文本
        source: "curl https://api.imarouter.com/v1/embeddings \\\n  --request POST \\\n  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'\
          \ \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"text-embedding-3-small\",\n  \"\
          input\": \"API gateways simplify routing, auth, and rate limits.\",\n  \"encoding_format\": \"float\"\n}'"
  /mj/submit/modal:
    post:
      tags:
      - Midjourney
      summary: 提交 Midjourney 重塑 / 区域重绘 (Remix)
      description: 'Midjourney remix / inpaint 操作。需要原任务 `taskId` + 来自 RemixModal 的 `customId` + 新 `prompt`。可选 `maskBase64`
        用于区域重绘。

        '
      operationId: mjSubmitModal
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MidjourneyModalRequest'
            examples:
              mj_remix:
                summary: mj_remix 重塑
                value:
                  model: mj_remix
                  taskId: '1751234567890'
                  customId: MJ::RemixModal::abc123
                  prompt: a fox wearing a wizard hat, mystic forest backdrop
      responses:
        '200':
          description: 提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MidjourneySubmitResponse'
        '400':
          description: 参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-mj-remix
        label: mj_remix 重塑
        source: "curl https://api.imarouter.com/mj/submit/modal \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"mj_remix\"\
          ,\n  \"taskId\": \"1751234567890\",\n  \"customId\": \"MJ::RemixModal::abc123\",\n  \"prompt\": \"a fox wearing\
          \ a wizard hat, mystic forest backdrop\"\n}'"
  /kling/v1/videos/text2video:
    post:
      tags:
      - Kling 视频
      summary: 提交 Kling 文生视频任务
      operationId: klingText2Video
      description: 'Kling 文生视频原生端点（异步任务制）。本文档仅描述 `POST /kling/v1/videos/text2video` 的请求格式。


        提交后返回 `task_id`，可通过 `GET /kling/v1/videos/text2video/{task_id}` 查询；任务查询也兼容 `GET /v1/video/generations/{task_id}` 与
        `GET /v1/videos/{task_id}`。


        如需使用 `POST /v1/video/generations` 或 `POST /v1/videos` 提交任务，请查看对应端点文档；它们使用统一视频/OpenAI 兼容请求格式，不与 Kling 原生端点完全相同。


        **支持模型：**

        - `kling-v1`

        - `kling-v1-6`

        - `kling-v2-master`（大师版，无 std/pro 区分）

        - `kling-v2-1-master`（大师版，无 std/pro 区分）

        - `kling-v2-5-turbo`

        - `kling-v2-6`

        - `kling-video-o1`


        **参数说明：**

        - `mode`：品质，`std`（标准，默认）或 `pro`（高品质）。大师版模型无此参数。

        - `duration`：时长（秒），默认 5，支持 5 或 10。

        - `aspect_ratio`：宽高比，`1:1`（默认）、`16:9`、`9:16`。也可通过 `size` 传尺寸自动映射。

        - `cfg_scale`：生成自由度，0~1，默认 0.5。

        - `negative_prompt`：反向提示词（可选）。

        - `camera_control`：镜头控制（可选，通过 metadata 传递）。

        - `model`：Kling 视频模型名称。


        **重要提示（必读）**

        - 任务完成后返回的视频 URL 为平台托管短期链接，建议接收后立即下载并持久化。

        - 平台托管资源默认约 30 天后失效，请务必在 30 天内完成下载归档。

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KlingText2VideoRequest'
            examples:
              text2video_std_5s:
                summary: 文生视频 std 5s
                value:
                  model: kling-v1-6
                  prompt: A cat playing with a ball of yarn in a sunny room
                  mode: std
                  duration: 5
                  aspect_ratio: '16:9'
              text2video_pro_10s:
                summary: 文生视频 pro 10s
                value:
                  model: kling-v2-5-turbo
                  prompt: A cinematic drone shot above a quiet lake at sunrise
                  mode: pro
                  duration: 10
                  aspect_ratio: '16:9'
              text2video_master:
                summary: 文生视频（大师版）
                value:
                  model: kling-v2-master
                  prompt: Hyper-realistic close-up of a dewdrop on a leaf
                  duration: 5
                  aspect_ratio: '1:1'
      responses:
        '200':
          description: 任务提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTaskResponse'
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-text2video-std-5s
        label: 文生视频 std 5s
        source: "curl https://api.imarouter.com/kling/v1/videos/text2video \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v1-6\"\
          ,\n  \"prompt\": \"A cat playing with a ball of yarn in a sunny room\",\n  \"mode\": \"std\",\n  \"duration\": 5,\n\
          \  \"aspect_ratio\": \"16:9\"\n}'"
      - lang: curl-text2video-pro-10s
        label: 文生视频 pro 10s
        source: "curl https://api.imarouter.com/kling/v1/videos/text2video \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v2-5-turbo\"\
          ,\n  \"prompt\": \"A cinematic drone shot above a quiet lake at sunrise\",\n  \"mode\": \"pro\",\n  \"duration\"\
          : 10,\n  \"aspect_ratio\": \"16:9\"\n}'"
      - lang: curl-text2video-master
        label: 文生视频（大师版）
        source: "curl https://api.imarouter.com/kling/v1/videos/text2video \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v2-master\"\
          ,\n  \"prompt\": \"Hyper-realistic close-up of a dewdrop on a leaf\",\n  \"duration\": 5,\n  \"aspect_ratio\": \"\
          1:1\"\n}'"
  /kling/v1/videos/image2video:
    post:
      tags:
      - Kling 视频
      summary: 提交 Kling 图生视频任务
      operationId: klingImage2Video
      description: 'Kling 图生视频原生端点。本文档仅描述 `POST /kling/v1/videos/image2video` 的请求格式。


        如需使用 `POST /v1/video/generations` 或 `POST /v1/videos` 提交任务，请查看对应端点文档；它们使用统一视频/OpenAI 兼容请求格式，不与 Kling 原生端点完全相同。


        **参数说明：**

        - `model`：Kling 视频模型名称。

        - `image`：必填，参考图片 URL。

        - `image_tail`：可选，尾帧图片 URL（首尾帧模式）。

        - 其他参数同文生视频。


        **输入图片要求（重要）**

        - `image`、`image_tail` 必须是可直接下载的图片 URL，响应内容必须是可识别图片；不要传过期链接、登录页、HTML 跳转页或损坏文件。

        - 上游会校验输入图片的宽高与像素合法性；过小、宽高异常、像素无效或无法识别尺寸的图片可能终态失败。

        - 若任务返回 `Image pixel is invalid`，请更换为尺寸和像素合法的原图后重新提交。


        **重要提示（必读）**

        - `image`、`image_tail` 等输入 URL 是任务输入引用，请在提交时确认可访问。

        - 任务完成后返回的视频 URL 为平台托管短期链接，默认约 30 天后失效；请务必在 30 天内完成下载归档。

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KlingImage2VideoRequest'
            examples:
              image2video:
                summary: 图生视频
                value:
                  model: kling-v1-6
                  prompt: A gentle camera pan revealing the scene
                  image: https://example.com/reference.jpg
                  mode: std
                  duration: 5
                  aspect_ratio: '16:9'
              image2video_head_tail:
                summary: 首尾帧图生视频
                value:
                  model: kling-v2-5-turbo
                  prompt: Smooth transition between two scenes
                  image: https://example.com/first_frame.jpg
                  image_tail: https://example.com/last_frame.jpg
                  mode: pro
                  duration: 5
      responses:
        '200':
          description: 任务提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTaskResponse'
        '400':
          description: 参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
              examples:
                image_pixel_invalid:
                  summary: 输入图片像素不合法
                  value:
                    code: '500'
                    message: Image pixel is invalid
                    data: null
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-image2video
        label: 图生视频
        source: "curl https://api.imarouter.com/kling/v1/videos/image2video \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v1-6\"\
          ,\n  \"prompt\": \"A gentle camera pan revealing the scene\",\n  \"image\": \"https://example.com/reference.jpg\"\
          ,\n  \"mode\": \"std\",\n  \"duration\": 5,\n  \"aspect_ratio\": \"16:9\"\n}'"
      - lang: curl-image2video-head-tail
        label: 首尾帧图生视频
        source: "curl https://api.imarouter.com/kling/v1/videos/image2video \\\n  --request POST \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v2-5-turbo\"\
          ,\n  \"prompt\": \"Smooth transition between two scenes\",\n  \"image\": \"https://example.com/first_frame.jpg\"\
          ,\n  \"image_tail\": \"https://example.com/last_frame.jpg\",\n  \"mode\": \"pro\",\n  \"duration\": 5\n}'"
  /kling/v1/videos/text2video/{task_id}:
    get:
      tags:
      - Kling 视频
      summary: 查询 Kling 视频任务状态（文生/图生）
      operationId: getKlingVideoTaskStatus
      description: '使用 Kling 提交接口（文生/图生）返回的 `task_id` 轮询任务结果。


        **也可通过以下端点查询（通用）：**

        - `GET /v1/video/generations/{task_id}`

        - `GET /v1/videos/{task_id}`


        **严重告知（必读）**

        - 查询成功后如返回 `results.url`、`metadata.url` 等结果资源 URL，请立即下载并自行持久化保存。

        - 平台不保证结果资源 URL 长期可访问，默认约 30 天后失效；不要把查询结果中的 URL 当作永久存储地址。

        '
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
        description: 创建任务时返回的任务 ID。
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTaskResponse'
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-get-kling-v1-videos-text2video-task-id
        label: 查询 Kling 视频任务状态（文生/图生）
        source: "curl https://api.imarouter.com/kling/v1/videos/text2video/task_202604270001 \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN'"
  /kling/v1/videos/image2video/{task_id}:
    get:
      tags:
      - Kling 视频
      summary: 查询 Kling 图生视频任务状态
      operationId: getKlingImage2VideoTaskStatus
      description: 使用 `POST /kling/v1/videos/image2video` 提交接口返回的 `task_id` 轮询任务结果。响应 schema 与文生视频共享。也可通过 `GET /v1/video/generations/{task_id}`
        或 `GET /v1/videos/{task_id}` 查询。
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
        description: 创建任务时返回的任务 ID。
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTaskResponse'
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-get-kling-v1-videos-image2video-task-id
        label: 查询 Kling 图生视频任务状态
        source: "curl https://api.imarouter.com/kling/v1/videos/image2video/task_202604270001 \\\n  --header 'Authorization:\
          \ Bearer YOUR_SECRET_TOKEN'"
  /v1/video/generations:
    post:
      tags:
      - MiniMax 视频
      - Kling 视频
      - Vidu 视频
      - Pixverse 视频
      summary: 提交 MiniMax 视频任务
      description: "MiniMax 视频生成（异步任务制）。提交后返回 `task_id`，通过 `GET /v1/video/generations/{task_id}` 轮询结果。\n\n**提交端点：** `POST\
        \ /v1/video/generations`\n\n**支持模型：**\n- `MiniMax-Hailuo-02`\n- `MiniMax-Hailuo-2.3`\n- `MiniMax-Hailuo-2.3-Fast`\n\
        \n**约束：**\n- `MiniMax-Hailuo-2.3-Fast` 仅图生视频，必须传 `metadata.first_frame_image`\n- `duration` 仅支持 `6` 或 `10`\n- `MiniMax-Hailuo-02`\
        \ 支持：\n- `512p`: `6/10s`\n- `768p`: `6/10s`\n- `1080p`: `仅 6s`\n- `MiniMax-Hailuo-2.3` 支持：\n- `768p`: `6/10s`\n- `1080p`:\
        \ `仅 6s`\n- `MiniMax-Hailuo-2.3-Fast` 支持：\n- `768p`: `6/10s`\n- `1080p`: `仅 6s`\n- 且必须传 `metadata.first_frame_image`\n\
        \n**重要提示（必读）**\n- `metadata.first_frame_image` 等输入 URL 是任务输入引用，请在提交时确认可访问。\n\n**调用示例：**\n```bash\ncurl -X POST https://open-route.fashionlabs.cn/v1/video/generations\
        \ \\\n  -H \"Authorization: Bearer sk-xxxx\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"MiniMax-Hailuo-2.3\"\
        ,\"prompt\":\"A cat playing\",\"duration\":6,\"size\":\"1080p\"}'\n```\n\n---\n\n### Kling 视频\n\nKling 视频任务的通用视频提交端点。该文档只覆盖\
        \ Kling 模型，避免影响其他供应商的视频端点说明。\n\n**实际请求路径：** `POST /v1/video/generations`\n\n**兼容路径：** 同一 JSON 请求体也可用于 `POST /v1/videos`。\n\
        \n**与 Kling 原生端点的区别：**\n- 原生端点：`POST /kling/v1/videos/text2video`、`POST /kling/v1/videos/image2video`，使用 Kling 原生字段，例如\
        \ `image_tail`。\n- 通用端点：`POST /v1/video/generations` / `POST /v1/videos`，使用统一视频字段，例如 `model`、`prompt`、`image`、`images`、`size`、`metadata`。\n\
        \n**支持模型：**\n- `kling-v1`\n- `kling-v1-6`\n- `kling-v2-master`\n- `kling-v2-1-master`\n- `kling-v2-5-turbo`\n- `kling-v2-6`\n\
        - `kling-video-o1`\n\n**输入图片要求（重要）**\n- `image`、`images`、`metadata.image_tail` 必须是可直接下载的图片 URL，响应内容必须是可识别图片；不要传过期链接、登录页、HTML\
        \ 跳转页或损坏文件。\n- 上游会校验输入图片的宽高与像素合法性；过小、宽高异常、像素无效或无法识别尺寸的图片可能终态失败。\n- 若任务返回 `Image pixel is invalid`，请更换为尺寸和像素合法的原图后重新提交。\n\
        \n**重要提示（必读）**\n- `image`、`images`、`metadata.image_tail` 等输入 URL 是任务输入引用，请在提交时确认可访问。\n- 任务完成后返回的视频 URL 为平台托管短期链接，默认约\
        \ 30 天后失效；请务必在 30 天内完成下载归档。\n\n---\n\n### Vidu 视频\n\nVidu 视频生成端点（异步任务制，延迟结算）。提交后返回 `task_id`，通过 `GET /v1/video/generations/{task_id}`\
        \ 轮询结果。\n\n**可用端点（二选一，参数格式相同）：**\n| 端点 | 说明 |\n|------|------|\n| `POST /v1/video/generations` | 通用视频端点 |\n| `POST\
        \ /v1/videos` | OpenAI 兼容端点 |\n\n**支持模型：**\n- `viduq1`（固定 1080P/5s）\n- `viduq2`（文生视频，支持 540P~1080P）\n- `viduq2-pro`（仅图生视频，支持\
        \ 540P~1080P）\n- `viduq2-turbo`（仅图生视频，支持 540P~1080P）\n- `viduq3-pro`（文生视频/图生视频，按秒计费，支持 540P~1080P）\n- `viduq3-turbo`（文生视频/图生视频，按秒计费，支持\
        \ 540P~1080P）\n\n**参数说明：**\n- `prompt`：文生视频时必填。\n- `images`：图生视频时传图片 URL 数组。单图=参考图，双图=首尾帧。\n- `duration`：时长（秒），默认\
        \ 5。viduq1 固定 5s。viduq3 支持 1~16s。\n- `size`：宽高比，如 `16:9`（默认）、`9:16`、`1:1`。\n- `metadata.resolution`：分辨率，`540p`、`720p`、`1080p`（默认）。\n\
        \n**计费说明：**\n- 延迟结算模式：提交时不扣费，任务完成后按上游实际消耗的 credits 精确结算。\n- 1 credit = $0.005。\n\n**重要提示（必读）**\n- `images` 等输入 URL\
        \ 是任务输入引用，请在提交时确认可访问。\n- 任务完成后返回的视频 URL 为平台托管短期链接，默认约 30 天后失效；请务必在 30 天内完成下载归档。\n\n---\n\n### Pixverse 视频\n\nPixverse\
        \ 视频生成端点（异步任务制）。\n\n**实际请求路径：** `POST /v1/video/generations`\n\n同一请求体也兼容 `POST /v1/videos`。本文档只覆盖 Pixverse 模型家族，避免与\
        \ MiniMax、Vidu、Kling 等共享端点串页。"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/MiniMaxVideoGenerationRequest'
              - $ref: '#/components/schemas/KlingUnifiedVideoRequest'
              - $ref: '#/components/schemas/ViduVideoRequest'
              - $ref: '#/components/schemas/PixverseVideoCreateRequest'
              discriminator:
                propertyName: model
                mapping:
                  MiniMax-Hailuo-02: '#/components/schemas/MiniMaxVideoGenerationRequest'
                  MiniMax-Hailuo-2.3: '#/components/schemas/MiniMaxVideoGenerationRequest'
                  MiniMax-Hailuo-2.3-Fast: '#/components/schemas/MiniMaxVideoGenerationRequest'
                  kling-v1: '#/components/schemas/KlingUnifiedVideoRequest'
                  kling-v1-6: '#/components/schemas/KlingUnifiedVideoRequest'
                  kling-v2-1-master: '#/components/schemas/KlingUnifiedVideoRequest'
                  kling-v2-5-turbo: '#/components/schemas/KlingUnifiedVideoRequest'
                  kling-v2-6: '#/components/schemas/KlingUnifiedVideoRequest'
                  kling-v2-master: '#/components/schemas/KlingUnifiedVideoRequest'
                  kling-video-o1: '#/components/schemas/KlingUnifiedVideoRequest'
                  pixverse-c1: '#/components/schemas/PixverseVideoCreateRequest'
                  pixverse-v6: '#/components/schemas/PixverseVideoCreateRequest'
                  viduq1: '#/components/schemas/ViduVideoRequest'
                  viduq2: '#/components/schemas/ViduVideoRequest'
                  viduq2-pro: '#/components/schemas/ViduVideoRequest'
                  viduq2-turbo: '#/components/schemas/ViduVideoRequest'
                  viduq3-pro: '#/components/schemas/ViduVideoRequest'
                  viduq3-turbo: '#/components/schemas/ViduVideoRequest'
            examples:
              hailuo_02_text2video:
                summary: MiniMax-Hailuo-02 文生视频
                value:
                  model: MiniMax-Hailuo-02
                  prompt: A cat playing with a ball of yarn
              text2video:
                summary: MiniMax 文生视频
                value:
                  model: MiniMax-Hailuo-2.3
                  prompt: A cat playing with a ball of yarn
              hailuo_img2video:
                summary: 图生视频（Hailuo） ⚠️ metadata 传参
                value:
                  model: MiniMax-Hailuo-2.3
                  prompt: A person slowly walking forward
                  metadata:
                    first_frame_image: https://example.com/photo.jpeg
              hailuo_fast_img2video:
                summary: 图生视频（Hailuo-2.3-Fast） ⚠️ 仅图生视频
                value:
                  model: MiniMax-Hailuo-2.3-Fast
                  prompt: A person slowly walking forward
                  size: 1080p
                  metadata:
                    first_frame_image: https://example.com/photo.jpeg
              kling_text2video:
                summary: 文生视频
                value:
                  model: kling-v1-6
                  prompt: A cat playing with a ball of yarn in a sunny room
                  duration: 5
                  size: '16:9'
                  metadata:
                    mode: std
                    cfg_scale: 0.5
              kling_image2video:
                summary: 图生视频
                value:
                  model: kling-v1-6
                  prompt: A gentle camera pan revealing the scene
                  image: https://example.com/reference.jpg
                  duration: 5
                  size: '16:9'
                  metadata:
                    mode: std
                    cfg_scale: 0.5
              kling_image2video_head_tail:
                summary: 首尾帧图生视频
                value:
                  model: kling-v2-5-turbo
                  prompt: Smooth transition between two scenes
                  image: https://example.com/first_frame.jpg
                  duration: 5
                  size: '16:9'
                  metadata:
                    mode: pro
                    image_tail: https://example.com/last_frame.jpg
              vidu_viduq1_text2video:
                summary: viduq1 文生视频（1080P/5s）
                value:
                  model: viduq1
                  prompt: A golden retriever running on a sunny beach with waves crashing in the background
              vidu_viduq2_text2video_720p:
                summary: viduq2 文生视频（720P/5s）
                value:
                  model: viduq2
                  prompt: A cinematic drone shot above a quiet lake at sunrise
                  duration: 5
                  metadata:
                    resolution: 720p
              vidu_viduq2_text2video_1080p:
                summary: viduq2 文生视频（1080P/8s）
                value:
                  model: viduq2
                  prompt: A time-lapse of clouds moving over a mountain landscape
                  duration: 8
                  metadata:
                    resolution: 1080p
              vidu_viduq2pro_img2video:
                summary: viduq2-pro 图生视频（单图参考）
                value:
                  model: viduq2-pro
                  prompt: The person slowly turns and smiles
                  images:
                  - https://example.com/reference.jpg
                  duration: 5
              vidu_viduq2pro_img2video_headtail:
                summary: viduq2-pro 首尾帧图生视频（双图）
                value:
                  model: viduq2-pro
                  prompt: Smooth transition from day to night
                  images:
                  - https://example.com/first_frame.jpg
                  - https://example.com/last_frame.jpg
                  duration: 5
              vidu_viduq3pro_text2video:
                summary: viduq3-pro 文生视频（720P/10s）
                value:
                  model: viduq3-pro
                  prompt: A cat playing with a ball of yarn in a cozy room with warm lighting
                  duration: 10
                  metadata:
                    resolution: 720p
              vidu_viduq3turbo_text2video:
                summary: viduq3-turbo 文生视频（1080P/5s）
                value:
                  model: viduq3-turbo
                  prompt: Aerial view of a city skyline at sunset
                  duration: 5
                  metadata:
                    resolution: 1080p
              vidu_viduq3pro_img2video:
                summary: viduq3-pro 图生视频
                value:
                  model: viduq3-pro
                  prompt: The flowers gently sway in the breeze
                  images:
                  - https://example.com/garden.jpg
                  duration: 8
                  metadata:
                    resolution: 720p
              pixverse_pixverse_c1_text_720p:
                summary: Pixverse C1 文生 720p
                value:
                  model: pixverse-c1
                  prompt: A cinematic city street at night with neon reflections
                  duration: 5
                  size: '16:9'
                  quality: 720p
              pixverse_pixverse_v6_text_audio:
                summary: Pixverse V6 文生 1080p 有声
                value:
                  model: pixverse-v6
                  prompt: A slow push-in shot of a product on a clean studio table
                  duration: 5
                  size: '9:16'
                  quality: 1080p
                  metadata:
                    audio: true
      responses:
        '200':
          description: 任务已提交
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTaskResponse'
              examples:
                submitted:
                  value:
                    id: task_abc123
                    task_id: task_abc123
                    object: video
                    model: MiniMax-Hailuo-2.3
                    status: ''
                    progress: 0
                    created_at: 1772037755
                vidu_success:
                  summary: 提交成功
                  value:
                    id: task_xxxxxxxxxxxxx
                    task_id: task_xxxxxxxxxxxxx
                    object: video
                    model: viduq3-pro
                    status: ''
                    progress: 0
                    created_at: 1712345678
                pixverse_success:
                  summary: Pixverse 返回任务 ID
                  value:
                    id: task_pixverse_202605220001
                    task_id: task_pixverse_202605220001
                    object: video
                    model: pixverse-v6
                    status: in_progress
                    progress: 0
                    created_at: 1779400000
        '400':
          description: 参数错误（例如模型能力或分辨率不匹配）
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ErrorResponse'
                - $ref: '#/components/schemas/TaskErrorResponse'
              examples:
                hailuo_fast_text2video_rejected:
                  summary: Hailuo-2.3-Fast 纯文本被拒绝（仅支持图生视频）
                  value:
                    code: '500'
                    message: 'hailuo api error: model MiniMax-Hailuo-2.3-Fast does not support Text-to-Video mode'
                    data: null
                hailuo_fast_invalid_resolution:
                  summary: Hailuo-2.3-Fast 使用 720p 被拒绝
                  value:
                    code: '2013'
                    message: 'hailuo api error: invalid params, model MiniMax-Hailuo-2.3-Fast does not support resolution
                      720P, supported resolutions: 768P, 1080P'
                    data: null
                kling_image_pixel_invalid:
                  summary: 输入图片像素不合法
                  value:
                    code: '500'
                    message: Image pixel is invalid
                    data: null
                vidu_model_not_supported:
                  summary: 仅图生视频模型发送纯文本
                  value:
                    error:
                      code: ''
                      message: model viduq2-pro only supports image-to-video, please provide images
                      type: new_api_error
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-hailuo-02-text2video
        label: MiniMax-Hailuo-02 文生视频
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-Hailuo-02\"\
          ,\n  \"prompt\": \"A cat playing with a ball of yarn\"\n}'"
      - lang: curl-text2video
        label: MiniMax 文生视频
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-Hailuo-2.3\"\
          ,\n  \"prompt\": \"A cat playing with a ball of yarn\"\n}'"
      - lang: curl-hailuo-img2video
        label: 图生视频（Hailuo） ⚠️ metadata 传参
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-Hailuo-2.3\"\
          ,\n  \"prompt\": \"A person slowly walking forward\",\n  \"metadata\": {\n    \"first_frame_image\": \"https://example.com/photo.jpeg\"\
          \n  }\n}'"
      - lang: curl-hailuo-fast-img2video
        label: 图生视频（Hailuo-2.3-Fast） ⚠️ 仅图生视频
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"MiniMax-Hailuo-2.3-Fast\"\
          ,\n  \"prompt\": \"A person slowly walking forward\",\n  \"size\": \"1080p\",\n  \"metadata\": {\n    \"first_frame_image\"\
          : \"https://example.com/photo.jpeg\"\n  }\n}'"
      - lang: curl-kling-curl-text2video
        label: 文生视频
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v1-6\"\
          ,\n  \"prompt\": \"A cat playing with a ball of yarn in a sunny room\",\n  \"duration\": 5,\n  \"size\": \"16:9\"\
          ,\n  \"metadata\": {\n    \"mode\": \"std\",\n    \"cfg_scale\": 0.5\n  }\n}'"
      - lang: curl-image2video
        label: 图生视频
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v1-6\"\
          ,\n  \"prompt\": \"A gentle camera pan revealing the scene\",\n  \"image\": \"https://example.com/reference.jpg\"\
          ,\n  \"duration\": 5,\n  \"size\": \"16:9\",\n  \"metadata\": {\n    \"mode\": \"std\",\n    \"cfg_scale\": 0.5\n\
          \  }\n}'"
      - lang: curl-image2video-head-tail
        label: 首尾帧图生视频
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"kling-v2-5-turbo\"\
          ,\n  \"prompt\": \"Smooth transition between two scenes\",\n  \"image\": \"https://example.com/first_frame.jpg\"\
          ,\n  \"duration\": 5,\n  \"size\": \"16:9\",\n  \"metadata\": {\n    \"mode\": \"pro\",\n    \"image_tail\": \"\
          https://example.com/last_frame.jpg\"\n  }\n}'"
      - lang: curl-viduq1-text2video
        label: viduq1 文生视频（1080P/5s）
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"viduq1\",\n\
          \  \"prompt\": \"A golden retriever running on a sunny beach with waves crashing in the background\"\n}'"
      - lang: curl-viduq2-text2video-720p
        label: viduq2 文生视频（720P/5s）
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"viduq2\",\n\
          \  \"prompt\": \"A cinematic drone shot above a quiet lake at sunrise\",\n  \"duration\": 5,\n  \"metadata\": {\n\
          \    \"resolution\": \"720p\"\n  }\n}'"
      - lang: curl-viduq2-text2video-1080p
        label: viduq2 文生视频（1080P/8s）
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"viduq2\",\n\
          \  \"prompt\": \"A time-lapse of clouds moving over a mountain landscape\",\n  \"duration\": 8,\n  \"metadata\"\
          : {\n    \"resolution\": \"1080p\"\n  }\n}'"
      - lang: curl-viduq2pro-img2video
        label: viduq2-pro 图生视频（单图参考）
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"viduq2-pro\"\
          ,\n  \"prompt\": \"The person slowly turns and smiles\",\n  \"images\": [\n    \"https://example.com/reference.jpg\"\
          \n  ],\n  \"duration\": 5\n}'"
      - lang: curl-viduq2pro-img2video-headtail
        label: viduq2-pro 首尾帧图生视频（双图）
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"viduq2-pro\"\
          ,\n  \"prompt\": \"Smooth transition from day to night\",\n  \"images\": [\n    \"https://example.com/first_frame.jpg\"\
          ,\n    \"https://example.com/last_frame.jpg\"\n  ],\n  \"duration\": 5\n}'"
      - lang: curl-viduq3pro-text2video
        label: viduq3-pro 文生视频（720P/10s）
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"viduq3-pro\"\
          ,\n  \"prompt\": \"A cat playing with a ball of yarn in a cozy room with warm lighting\",\n  \"duration\": 10,\n\
          \  \"metadata\": {\n    \"resolution\": \"720p\"\n  }\n}'"
      - lang: curl-viduq3turbo-text2video
        label: viduq3-turbo 文生视频（1080P/5s）
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"viduq3-turbo\"\
          ,\n  \"prompt\": \"Aerial view of a city skyline at sunset\",\n  \"duration\": 5,\n  \"metadata\": {\n    \"resolution\"\
          : \"1080p\"\n  }\n}'"
      - lang: curl-viduq3pro-img2video
        label: viduq3-pro 图生视频
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"viduq3-pro\"\
          ,\n  \"prompt\": \"The flowers gently sway in the breeze\",\n  \"images\": [\n    \"https://example.com/garden.jpg\"\
          \n  ],\n  \"duration\": 8,\n  \"metadata\": {\n    \"resolution\": \"720p\"\n  }\n}'"
      - lang: curl-pixverse-c1-text-720p
        label: Pixverse C1 文生 720p
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"pixverse-c1\"\
          ,\n  \"prompt\": \"A cinematic city street at night with neon reflections\",\n  \"duration\": 5,\n  \"size\": \"\
          16:9\",\n  \"quality\": \"720p\"\n}'"
      - lang: curl-pixverse-v6-text-audio
        label: Pixverse V6 文生 1080p 有声
        source: "curl https://api.imarouter.com/v1/video/generations \\\n  --request POST \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"model\": \"pixverse-v6\"\
          ,\n  \"prompt\": \"A slow push-in shot of a product on a clean studio table\",\n  \"duration\": 5,\n  \"size\":\
          \ \"9:16\",\n  \"quality\": \"1080p\",\n  \"metadata\": {\n    \"audio\": true\n  }\n}'"
  /v1/video/generations/{task_id}:
    get:
      tags:
      - MiniMax 视频
      - Vidu 视频
      - Pixverse 视频
      summary: 查询 MiniMax 视频任务状态
      description: '使用 `/v1/video/generations` 提交后返回的 `task_id` 轮询任务结果。

        鉴权：请求头必须包含 `Authorization: Bearer sk-...`。

        当任务完成时，响应中 `status` 为 `succeeded`，`results` 数组包含视频 URL。

        **严重告知（必读）**

        - 查询成功后如返回 `results.url`、`metadata.url` 等结果资源 URL，请立即下载并自行持久化保存。

        - 平台不保证结果资源 URL 长期可访问，默认约 30 天后失效；不要把查询结果中的 URL 当作永久存储地址。


        ---


        ### Vidu 视频


        使用提交接口返回的 `task_id` 轮询任务结果。


        也可通过 `GET /v1/videos/{task_id}` 查询。


        当 `status` 为 `completed` 时，`metadata.url` 包含视频下载链接。


        **严重告知（必读）**

        - 查询成功后如返回 `results.url`、`metadata.url` 等结果资源 URL，请立即下载并自行持久化保存。

        - 平台不保证结果资源 URL 长期可访问，默认约 30 天后失效；不要把查询结果中的 URL 当作永久存储地址。


        ---


        ### Pixverse 视频


        查询 `POST /v1/video/generations` 提交后的 Pixverse 视频异步任务。


        **实际请求路径：** `GET /v1/video/generations/{task_id}`'
      operationId: getMiniMaxVideoTaskStatus
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
        description: 创建任务时返回的任务 ID。
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTaskResponse'
              examples:
                processing:
                  summary: 处理中
                  value:
                    id: task_xxxxxxxxxxxxx
                    task_id: task_xxxxxxxxxxxxx
                    object: video
                    model: MiniMax-Hailuo-2.3
                    status: in_progress
                    progress: 30
                    created_at: 1712345678
                completed:
                  summary: 完成
                  value:
                    id: task_xxxxxxxxxxxxx
                    task_id: task_xxxxxxxxxxxxx
                    object: video
                    model: MiniMax-Hailuo-2.3
                    status: completed
                    progress: 100
                    created_at: 1712345678
                    completed_at: 1712345778
                    metadata:
                      url: https://cdn.example.com/video.mp4
                vidu_processing:
                  summary: 处理中
                  value:
                    id: task_xxxxxxxxxxxxx
                    task_id: task_xxxxxxxxxxxxx
                    object: video
                    model: viduq3-pro
                    status: in_progress
                    progress: 45
                    created_at: 1712345678
                vidu_completed:
                  summary: 完成
                  value:
                    id: task_xxxxxxxxxxxxx
                    task_id: task_xxxxxxxxxxxxx
                    object: video
                    model: viduq3-pro
                    status: completed
                    progress: 100
                    created_at: 1712345678
                    completed_at: 1712345778
                    metadata:
                      url: https://video.cf.vidu.com/example/video.mp4
                vidu_failed:
                  summary: 失败
                  value:
                    id: task_xxxxxxxxxxxxx
                    task_id: task_xxxxxxxxxxxxx
                    object: video
                    model: viduq3-pro
                    status: failed
                    progress: 0
                    created_at: 1712345678
                    error:
                      message: content moderation failed
                      code: MODERATION_FAILED
                pixverse_completed:
                  summary: Pixverse 成功
                  value:
                    id: task_pixverse_202605220001
                    task_id: task_pixverse_202605220001
                    object: video
                    model: pixverse-v6
                    status: completed
                    progress: 100
                    created_at: 1779400000
                    completed_at: 1779400060
                    metadata:
                      url: https://cdn.example.com/video/pixverse-v6.mp4
        '401':
          description: 鉴权失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '400':
          description: 参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
        '404':
          description: 任务不存在
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
      x-apifox-status: released
      x-codeSamples:
      - lang: curl-get-v1-video-generations-task-id
        label: 查询 MiniMax 视频任务状态
        source: "curl https://api.imarouter.com/v1/video/generations/task_202604270001 \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN'"
      - lang: curl-vidu-curl-get-v1-video-generations-task-id
        label: 查询 Vidu 视频任务状态
        source: "curl https://api.imarouter.com/v1/video/generations/task_202604270001 \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN'"
      - lang: curl-pixverse-curl-get-v1-video-generations-task-id
        label: 查询 Pixverse 视频任务
        source: "curl https://api.imarouter.com/v1/video/generations/task_202604270001 \\\n  --header 'Authorization: Bearer\
          \ YOUR_SECRET_TOKEN'"
components:
  parameters:
    AuthorizationHeader:
      name: Authorization
      in: header
      required: true
      schema:
        type: string
      example: Bearer sk-xxxxxxxxxxxxxxxx
      description: 访问令牌，格式固定为 `Bearer sk-...`。
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sk-xxxx
      description: '将 SK 放在请求头：

        `Authorization: Bearer sk-xxxx`

        '
  schemas:
    AssetGroupCreateRequest:
      type: object
      required:
      - name
      properties:
        name:
          type: string
          maxLength: 64
          description: 分组名称（用户侧展示名）。
          example: marketing-assets
        description:
          type: string
          maxLength: 300
          description: 分组描述（可选）。
          example: 素材分组-市场投放
        group_type:
          type: string
          default: AIGC
          description: 分组类型。当前默认使用 `AIGC`。
          example: AIGC
        project_name:
          type: string
          default: default
          description: 项目命名空间。未传时默认 `default`。
          example: default
        model:
          type: string
          enum:
          - ima-pro-upload
          - ima-pro-upload-cn
          - seedance-upload
          - seedance-upload-cn
          description: '可选，资产模型名。严重提醒：务必显式传 `model` 区分国内与海外人像协议，避免素材协议与视频模型渠道不匹配。

            - `ima-pro-upload`：国内人像（默认，历史兼容）

            - `ima-pro-upload-cn`：国内人像，适配 `seedance-2.0-cn`、`seedance-2.0-fast-cn`

            - `seedance-upload`：海外人像，适配 `seedance-2.0`、`seedance-2.0-fast`

            - 不要混用国内/海外素材协议；否则 `asset://...` 后续用于视频任务时可能调用失败。

            '
          example: ima-pro-upload-cn
    AssetGroupListRequest:
      type: object
      properties:
        filters:
          type: object
          properties:
            name:
              type: string
            group_ids:
              type: array
              items:
                type: string
            group_type:
              type: string
              default: AIGC
              description: 分组类型过滤，通常为 `AIGC`。
        page_number:
          type: integer
          minimum: 1
          default: 1
          description: 页码（从 1 开始）。
        page_size:
          type: integer
          minimum: 1
          maximum: 100
          default: 20
          description: 每页数量（1-100）。
        sort_by:
          type: string
          enum:
          - CreateTime
          - UpdateTime
          description: 排序字段（严格区分大小写）。
        sort_order:
          type: string
          enum:
          - Asc
          - Desc
          description: 排序方向（严格区分大小写）。
        project_name:
          type: string
          default: default
          description: 项目命名空间。未传按默认项目处理。
        model:
          type: string
          enum:
          - ima-pro-upload
          - ima-pro-upload-cn
          - seedance-upload
          - seedance-upload-cn
          description: '可选，资产模型名。严重提醒：务必显式传 `model` 区分国内与海外人像协议，避免素材协议与视频模型渠道不匹配。

            - `ima-pro-upload`：国内人像（默认，历史兼容）

            - `ima-pro-upload-cn`：国内人像，适配 `seedance-2.0-cn`、`seedance-2.0-fast-cn`

            - `seedance-upload`：海外人像，适配 `seedance-2.0`、`seedance-2.0-fast`

            - 不要混用国内/海外素材协议；否则 `asset://...` 后续用于视频任务时可能调用失败。

            '
          example: ima-pro-upload-cn
    AssetCreateRequest:
      type: object
      required:
      - group_id
      - url
      properties:
        group_id:
          type: string
          description: 分组 ID（可用 `/v1/assets/group/list` 获取）。
          example: grp_123456
        url:
          type: string
          format: uri
          description: 公开可访问的素材 URL。调用前请确认可访问，并建议自行持久化原始素材；30 天失效规则仅适用于接口返回的结果资源 URL。
          example: https://example.com/image.png
        name:
          type: string
          maxLength: 64
          description: 素材名称（可选）。
          example: cover-image
        asset_type:
          type: string
          default: Image
          enum:
          - Image
          - Video
          - Audio
          description: '素材类型，默认 `Image`。

            当 `asset_type=Audio` 时，音频时长必须在 `1.8s` 到 `15.2s` 之间（闭区间），否则返回 `InvalidParameter.DurationTooLong`。'
          example: Image
        project_name:
          type: string
          default: default
          description: 项目命名空间。未传时默认 `default`。
          example: default
        billing_token_id:
          type: integer
          description: '可选，指定本次上传扣费使用的 token id。

            不传时：默认使用当前请求头 `Authorization` 对应 SK 的 token。

            约束：必须属于当前用户、状态为启用、并且余额足够。

            '
          example: 3
        model:
          type: string
          enum:
          - ima-pro-upload
          - ima-pro-upload-cn
          - seedance-upload
          - seedance-upload-cn
          description: '可选，资产模型名。计费时优先使用该模型价格；未传时默认 `ima-pro-upload`。

            **严重提醒**：创建人像素材/素材协议时，务必显式传 `model` 区分国内与海外渠道，避免素材协议与视频模型渠道不匹配。

            - `ima-pro-upload`：国内人像（默认，历史兼容）

            - `ima-pro-upload-cn`：国内人像，适配 `seedance-2.0-cn`、`seedance-2.0-fast-cn`

            - `seedance-upload`：海外人像，适配 `seedance-2.0`、`seedance-2.0-fast`

            - 不要混用国内/海外素材协议；否则 `asset://...` 后续用于视频任务时可能调用失败。

            '
          example: ima-pro-upload-cn
    AssetListRequest:
      type: object
      properties:
        filters:
          type: object
          properties:
            group_ids:
              type: array
              items:
                type: string
            group_type:
              type: string
              default: AIGC
              description: 分组类型过滤，通常为 `AIGC`。
            statuses:
              type: array
              items:
                type: string
                enum:
                - Active
                - Failed
                - Processing
            name:
              type: string
        page_number:
          type: integer
          minimum: 1
          default: 1
        page_size:
          type: integer
          minimum: 1
          maximum: 100
          default: 20
        sort_by:
          type: string
          enum:
          - CreateTime
          - UpdateTime
          - GroupId
          description: 排序字段（严格区分大小写）。
        model:
          type: string
          enum:
          - ima-pro-upload
          - ima-pro-upload-cn
          - seedance-upload
          - seedance-upload-cn
          description: '可选，资产模型名。严重提醒：务必显式传 `model` 区分国内与海外人像协议，避免素材协议与视频模型渠道不匹配。

            - `ima-pro-upload`：国内人像（默认，历史兼容）

            - `ima-pro-upload-cn`：国内人像，适配 `seedance-2.0-cn`、`seedance-2.0-fast-cn`

            - `seedance-upload`：海外人像，适配 `seedance-2.0`、`seedance-2.0-fast`

            - 不要混用国内/海外素材协议；否则 `asset://...` 后续用于视频任务时可能调用失败。

            '
          example: ima-pro-upload-cn
        sort_order:
          type: string
          enum:
          - Asc
          - Desc
          description: 排序方向（严格区分大小写）。
        project_name:
          type: string
          default: default
          description: 项目命名空间。未传时默认 `default`。
    AssetItem:
      type: object
      properties:
        Id:
          type: string
        Name:
          type: string
        URL:
          type: string
        GroupId:
          type: string
        AssetType:
          type: string
        Status:
          type: string
        ProjectName:
          type: string
        CreateTime:
          type: string
        UpdateTime:
          type: string
    AssetGroupItem:
      type: object
      properties:
        Id:
          type: string
        Name:
          type: string
        Title:
          type: string
        Description:
          type: string
        GroupType:
          type: string
        ProjectName:
          type: string
        CreateTime:
          type: string
        UpdateTime:
          type: string
    AssetIdResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
          properties:
            Id:
              type: string
    AssetGroupResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          $ref: '#/components/schemas/AssetGroupItem'
    AssetGetResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          $ref: '#/components/schemas/AssetItem'
    AssetGroupListResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
          properties:
            Items:
              type: array
              items:
                $ref: '#/components/schemas/AssetGroupItem'
            TotalCount:
              type: integer
            PageNumber:
              type: integer
            PageSize:
              type: integer
    AssetListResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
          properties:
            Items:
              type: array
              items:
                $ref: '#/components/schemas/AssetItem'
            TotalCount:
              type: integer
            PageNumber:
              type: integer
            PageSize:
              type: integer
    AssetQuotaResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
          properties:
            enabled:
              type: boolean
            max_count_per_user:
              type: integer
            current_count:
              type: integer
    ImaProSubtitleEraseRequest:
      type: object
      required:
      - model
      - video_url
      additionalProperties: false
      description: Doubao 视频擦字幕任务请求参数。国内模型使用 `doubao-video-subtitle-erase-cn`，海外模型使用 `doubao-video-subtitle-erase`。
      properties:
        model:
          type: string
          enum:
          - doubao-video-subtitle-erase-cn
          description: 模型名称。`doubao-video-subtitle-erase-cn` 为国内模型，`doubao-video-subtitle-erase` 为海外模型。
          example: doubao-video-subtitle-erase-cn
        video_url:
          type: string
          format: uri
          description: 待处理视频 URL，协议必须为 `http` 或 `https`。
          example: https://example.com/input.mp4
    SeedanceContentsGenerationTaskRequest:
      type: object
      title: Seedance 内容生成视频任务请求
      description: 'Seedance 2.0 contents task 请求体。该请求体只用于 `POST /api/v1/contents/generations/tasks`，不要与 `/v1/videos` 的 OpenAI
        兼容请求体混用。


        图片、视频和音频地址必须填写公网 `https://...` URL。'
      required:
      - model
      - content
      additionalProperties: false
      properties:
        model:
          type: string
          enum:
          - seedance-2.0
          - seedance-2.0-fast
          - seedance-2.0-cn
          - seedance-2.0-fast-cn
          description: 目标模型。仅支持 `seedance-2.0`、`seedance-2.0-fast`、`seedance-2.0-cn`、`seedance-2.0-fast-cn`。
        content:
          type: array
          minItems: 1
          description: 输入内容数组。支持 `text`、`image_url`、`video_url`、`audio_url`。文生、首帧、首尾帧、多模态参考是互斥场景。
          items:
            $ref: '#/components/schemas/SeedanceContentsGenerationContentItem'
        return_last_frame:
          type: boolean
          default: false
          description: 是否在成功后返回生成视频最后一帧 PNG。适合连续生成场景。
        generate_audio:
          type: boolean
          default: true
          description: 是否生成同步音频。`true` 为音频视频，`false` 为静音视频。`generate_audio=false` 时不要传 `reference_audio`。
        resolution:
          type: string
          enum:
          - 480p
          - 720p
          - 1080p
          description: 输出分辨率。可选 `480p`、`720p`、`1080p`；Fast 模型不支持 `1080p`。
        ratio:
          type: string
          enum:
          - '16:9'
          - '4:3'
          - '1:1'
          - '3:4'
          - '9:16'
          - '21:9'
          - adaptive
          description: 输出宽高比。`adaptive` 会由模型根据输入内容选择合适比例。
        duration:
          type: integer
          minimum: 4
          maximum: 15
          default: 5
          description: 输出时长，单位秒。可传 `4-15` 的整数，含 4 和 15。
        seed:
          type: integer
          format: int64
          minimum: -1
          maximum: 4294967295
          default: -1
          description: 随机种子。`-1` 或不传表示随机；相同 seed 只保证结果相似，不保证完全一致。
    SeedanceContentsGenerationContentItem:
      type: object
      title: Seedance contents 输入项
      description: 单个 contents 输入项。`type` 决定应填写 `text`、`image_url`、`video_url` 或 `audio_url` 中的哪一个字段。
      required:
      - type
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
          - text
          - image_url
          - video_url
          - audio_url
          description: 输入类型。`text` 为提示词，`image_url` 为图片 URL，`video_url` 为参考视频 URL，`audio_url` 为参考音频 URL。
        text:
          type: string
          minLength: 1
          description: 文本提示词。仅 `type=text` 时填写，建议控制在 1000 词以内。
        image_url:
          $ref: '#/components/schemas/SeedanceContentsGenerationURLField'
        video_url:
          $ref: '#/components/schemas/SeedanceContentsGenerationURLField'
        audio_url:
          $ref: '#/components/schemas/SeedanceContentsGenerationURLField'
        role:
          type: string
          enum:
          - first_frame
          - last_frame
          - reference_image
          - reference_video
          - reference_audio
          description: 媒体角色。图片可用 `first_frame`、`last_frame`、`reference_image`；视频固定 `reference_video`；音频固定 `reference_audio`。首帧/首尾帧与多模态参考不能混用。
    SeedanceContentsGenerationURLField:
      type: object
      title: Seedance contents HTTPS URL
      required:
      - url
      additionalProperties: false
      properties:
        url:
          type: string
          format: uri
          pattern: ^https://.+
          description: 公网 HTTPS URL。图片、视频和音频均使用该 URL 形态提交。
    ImaProVideoCreateRequest:
      type: object
      title: Seedance 视频（seedance-2.0 / fast / cn）
      required:
      - model
      additionalProperties: false
      description: '7 种输入组合（与服务端行为一致）：

        1. 文本（`prompt` 必填）

        2. 文本 + 图片（`images`，`prompt` 可选）

        3. 文本 + 视频（`metadata.reference_video_urls`，`prompt` 可选）

        4. 文本 + 图片 + 音频（`images` + `metadata.reference_audio_urls`，`prompt` 可选）

        5. 文本 + 图片 + 视频（`images` + `metadata.reference_video_urls`，`prompt` 可选）

        6. 文本 + 视频 + 音频（`metadata.reference_video_urls` + `metadata.reference_audio_urls`，`prompt` 可选）

        7. 文本 + 图片 + 视频 + 音频（`images` + `metadata.reference_video_urls` + `metadata.reference_audio_urls`，`prompt` 可选）

        图片语义补充：

        - 单图与多图均按 `reference_image` 语义处理，不自动推断 `first_frame` / `last_frame`。

        '
      properties:
        model:
          type: string
          enum:
          - seedance-2.0
          - seedance-2.0-fast
          - seedance-2.0-cn
          - seedance-2.0-fast-cn
          - ima-pro
          - ima-pro-fast
          description: '目标模型。

            - `seedance-2.0`：Seedance 标准版（海外）

            - `seedance-2.0-fast`：Seedance 极速版（海外）

            - `seedance-2.0-cn`：Seedance 标准版（国内）

            - `seedance-2.0-fast-cn`：Seedance 极速版（国内）

            - ~~`ima-pro`~~（海外渠道历史别名，已过期；向后兼容，请改用 seedance-2.0 / seedance-2.0-cn）

            - ~~`ima-pro-fast`~~（海外渠道历史别名，已过期；向后兼容，请改用 seedance-2.0-fast / seedance-2.0-fast-cn）

            '
        prompt:
          type: string
          minLength: 1
          description: '主提示词。仅“文本”组合必填；其余 6 种组合可选。

            支持中英文；建议中文不超过 500 字，英文不超过 1000 词。

            '
        images:
          type: array
          description: '图片 URL 数组（支持多图）。

            **重要提示**：上传前请确保 URL 在调用时可访问；30 天失效规则仅适用于接口返回的结果资源 URL。

            支持两类 URL：

            - 公网可访问 URL（`https://...`）

            - 素材库协议 URL（`asset://asset-...`）

            传入单张图片要求：

            - 格式：`jpeg`、`png`、`webp`、`bmp`、`tiff`、`gif`

            - 宽高比（宽/高）：`(0.4,2.5)`

            - 宽高长度（px）：`(300,6000)`

            - 单张图片大小：`<30MB`

            - 请求体总大小：`<=64MB`

            - 大文件请勿使用 Base64 编码，建议使用可访问 URL。

            '
          items:
            type: string
            format: uri
        input_reference:
          type: string
          format: uri
          description: '兜底图片 URL（仅在未传 `images` 时生效）。

            **重要提示**：该链接用于任务提交，请在提交前确认可访问；30 天失效规则仅适用于接口返回的结果资源 URL，输出资源建议接收后及时持久化。

            支持 `https://...` 与 `asset://asset-...`。

            图片输入约束与 `images` 单张图片要求一致。

            '
        duration:
          type: integer
          minimum: 4
          maximum: 15
          default: 5
          description: '期望时长（秒）。

            允许范围：`4-15` 秒（含边界）。

            推荐值：`5`、`10`、`15`。

            '
        seconds:
          type: string
          pattern: ^(?:[4-9]|1[0-5])$
          description: 字符串形式时长（秒），允许范围：`"4"` ~ `"15"`。
        size:
          type: string
          description: '尺寸（如 `1280x720`），用于推导比例与分辨率。

            约束：`WxH` 必须能归一化为支持的精确比例（如 `16:9`、`9:16`、`1:1`、`4:3`、`3:4`、`21:9`）。

            注意：`854x480` 会归一化为 `427:240`，不是精确 `16:9`，会被拒绝为 `ratio is invalid: 427:240`。480p 16:9 建议使用 `848x480` 或直接传 `metadata.resolution=480p`。

            '
        metadata:
          type: object
          additionalProperties: true
          description: 高级参数（可选）。
          properties:
            aspect_ratio:
              type: string
              enum:
              - '16:9'
              - '4:3'
              - '1:1'
              - '3:4'
              - '9:16'
              - '21:9'
              - adaptive
              description: '宽高比。

                支持：`16:9`、`4:3`、`1:1`、`3:4`、`9:16`、`21:9`、`adaptive`。

                - `adaptive`：根据输入自动选择最合适的宽高比。

                '
              example: '16:9'
            resolution:
              type: string
              enum:
              - 480p
              - 720p
              - 1080p
              description: '分辨率档位（可选）。

                **按模型区分：**

                - `ima-pro` / `seedance-2.0`：支持 `480p`、`720p`、`1080p`；实测文本生成 `1080p` 可提交并进入处理中。

                - `ima-pro-fast` / `seedance-2.0-fast`：文生视频建议使用 `480p` 或 `720p`；实测文本生成显式传 `1080p` 会被上游返回 `Invalid parameters`。

                - 若不确定，优先不传该字段或使用 `720p`。

                '
              example: 720p
            audio:
              oneOf:
              - type: boolean
              - type: string
              description: '是否生成音频。

                版权风险规避建议：

                - 若担心背景音乐版权，先设置 `audio=false`（无背景音乐）

                - 可在提示词中明确：无字幕、无背景音乐，仅保留剧情人声/环境音效/动作音效

                '
            role_mode:
              type: string
              enum:
              - reference
              - frame
              default: reference
              description: '图片角色模式。

                - `reference`（默认）：图片统一映射 `reference_image`

                - `frame`：启用首尾帧语义（单图=first_frame；双图=first_frame+last_frame）

                约束：

                - `frame` 模式仅支持 1~2 张图片

                - `frame` 模式不能与 `reference_video_urls`/`reference_audio_urls` 混用

                '
            reference_video_urls:
              type: array
              minItems: 1
              maxItems: 3
              description: "**重要：参考视频 URL 数组（最多 3 条）。请自行保证输入 URL 在提交时可访问。**\n\n传入单个参考视频要求：\n- 格式：`mp4`、`mov`\n- 分辨率：`480p`、`720p`\n\
                - 单个视频时长：`[2,15]s`\n- 所有参考视频总时长：`<=15s`\n- 宽高比（宽/高）：`(0.4,2.5)`\n- 宽高像素（宽、高）：`(300,6000)`\n- 画面像素（宽×高）：`[409600,927408]`\n\
                \  - 例如：`640x640=409600`（最小值）\n  - 例如：`834x1112=927408`（最大值）\n- 单个视频大小：`<=50MB`\n- 帧率（FPS）：`[24,60]`\n"
              items:
                type: string
                format: uri
            reference_audio_urls:
              type: array
              minItems: 1
              maxItems: 3
              description: '**重要：参考音频 URL 数组（最多 3 条）。请自行保证输入 URL 在提交时可访问。**

                传入单个参考音频要求：

                - 格式：`wav`、`mp3`

                - 单个音频时长：`[2,15]s`

                - 所有参考音频总时长：`<=15s`

                - 单个音频大小：`<=15MB`

                - 请求体总大小：`<=64MB`

                - 大文件请勿使用 Base64 编码，建议使用可访问 URL。

                - 资源为平台短期托管内容，建议在 30 天内完成下载归档。

                '
              items:
                type: string
                format: uri
            mcp_list:
              type: array
              description: 可选 MCP 工具列表。
              items:
                type: object
                properties:
                  tool_name:
                    type: string
                    example: web_search
    Wan26VideoCreateRequest:
      type: object
      title: Wan2.6 视频（按模型分发）
      description: Wan2.6 视频创建请求；按 `model` 分发到具体的视频能力请求体。
      anyOf:
      - $ref: '#/components/schemas/Wan26T2VVideoCreateRequest'
      - $ref: '#/components/schemas/Wan26I2VVideoCreateRequest'
      - $ref: '#/components/schemas/Wan26I2VFlashVideoCreateRequest'
      - $ref: '#/components/schemas/Wan26R2VVideoCreateRequest'
      discriminator:
        propertyName: model
        mapping:
          wan2.6-t2v: '#/components/schemas/Wan26T2VVideoCreateRequest'
          wan2.6-i2v: '#/components/schemas/Wan26I2VVideoCreateRequest'
          wan2.6-i2v-flash: '#/components/schemas/Wan26I2VFlashVideoCreateRequest'
          wan2.6-r2v: '#/components/schemas/Wan26R2VVideoCreateRequest'
    Wan26T2VVideoCreateRequest:
      type: object
      title: wan2.6-t2v 文生视频
      additionalProperties: false
      required:
      - model
      - prompt
      description: Wan2.6 文生视频请求体。
      properties:
        model:
          type: string
          enum:
          - wan2.6-t2v
        prompt:
          type: string
          minLength: 1
          maxLength: 800
          description: 提示词（必填）。
        duration:
          $ref: '#/components/schemas/Wan26VideoDuration15'
        seconds:
          $ref: '#/components/schemas/Wan26VideoSeconds15'
        size:
          $ref: '#/components/schemas/Wan26VideoResolution'
        aspect_ratio:
          $ref: '#/components/schemas/Wan26VideoAspectRatio'
        negative_prompt:
          type: string
          maxLength: 800
        prompt_extend:
          type: boolean
          default: false
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
        shot_type:
          type: string
          enum:
          - single
          - multi
        metadata:
          $ref: '#/components/schemas/Wan26T2VVideoMetadata'
    Wan26I2VVideoCreateRequest:
      type: object
      title: wan2.6-i2v 图生视频
      additionalProperties: false
      required:
      - model
      description: Wan2.6 图生视频请求体；至少提供一个首帧图片来源。
      anyOf:
      - required:
        - image
      - required:
        - images
      properties:
        model:
          type: string
          enum:
          - wan2.6-i2v
        prompt:
          type: string
          maxLength: 800
          description: 提示词（可选）。
        image:
          type: string
          format: uri
          description: 单张首帧图片 URL（可选，与 `images` 二选一）。
        images:
          type: array
          description: 首帧图片数组（可选，与 `image` 二选一；当前仅支持 1 张）。
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 1
        duration:
          $ref: '#/components/schemas/Wan26VideoDuration15'
        seconds:
          $ref: '#/components/schemas/Wan26VideoSeconds15'
        size:
          $ref: '#/components/schemas/Wan26VideoResolution'
        negative_prompt:
          type: string
          maxLength: 800
        prompt_extend:
          type: boolean
          default: false
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
        shot_type:
          type: string
          enum:
          - single
          - multi
        template:
          type: string
          maxLength: 100
        metadata:
          $ref: '#/components/schemas/Wan26VideoMetadata'
    Wan26I2VFlashVideoCreateRequest:
      type: object
      title: wan2.6-i2v-flash 快速图生视频
      additionalProperties: false
      required:
      - model
      description: Wan2.6 快速图生视频请求体；支持音频开关与参考视频。
      anyOf:
      - required:
        - image
      - required:
        - images
      properties:
        model:
          type: string
          enum:
          - wan2.6-i2v-flash
        prompt:
          type: string
          maxLength: 800
          description: 提示词（可选）。
        image:
          type: string
          format: uri
          description: 单张首帧图片 URL（可选，与 `images` 二选一）。
        images:
          type: array
          description: 首帧图片数组（可选，与 `image` 二选一；当前仅支持 1 张）。
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 1
        duration:
          $ref: '#/components/schemas/Wan26VideoDuration15'
        seconds:
          $ref: '#/components/schemas/Wan26VideoSeconds15'
        size:
          $ref: '#/components/schemas/Wan26VideoResolution'
        audio:
          type: boolean
          default: false
          description: 是否启用音频（可选）。
        reference_video_urls:
          type: array
          description: 参考视频 URL 列表（可选，最多 3 条）。
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 3
        negative_prompt:
          type: string
          maxLength: 800
        prompt_extend:
          type: boolean
          default: false
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
        shot_type:
          type: string
          enum:
          - single
          - multi
        template:
          type: string
          maxLength: 100
        metadata:
          $ref: '#/components/schemas/Wan26I2VFlashVideoMetadata'
    Wan26R2VVideoCreateRequest:
      type: object
      title: wan2.6-r2v 参考生视频
      additionalProperties: false
      required:
      - model
      description: Wan2.6 参考生视频请求体；支持参考图或参考视频输入。
      anyOf:
      - required:
        - image
      - required:
        - images
      - required:
        - reference_video_urls
      - required:
        - video_url
      properties:
        model:
          type: string
          enum:
          - wan2.6-r2v
        prompt:
          type: string
          maxLength: 800
          description: 提示词（可选）。
        image:
          type: string
          format: uri
          description: 单张参考图片 URL（可选，与 `images` / `reference_video_urls` / `video_url` 搭配约束）。
        images:
          type: array
          description: 参考图片数组（可选；当前仅支持 1 张）。
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 1
        reference_video_urls:
          type: array
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 3
        video_url:
          type: string
          format: uri
        duration:
          $ref: '#/components/schemas/Wan26VideoDuration10'
        seconds:
          $ref: '#/components/schemas/Wan26VideoSeconds10'
        size:
          $ref: '#/components/schemas/Wan26VideoResolution'
        aspect_ratio:
          $ref: '#/components/schemas/Wan26VideoAspectRatio'
        negative_prompt:
          type: string
          maxLength: 800
        prompt_extend:
          type: boolean
          default: false
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
        shot_type:
          type: string
          enum:
          - single
          - multi
        metadata:
          $ref: '#/components/schemas/Wan26R2VVideoMetadata'
    Wan26VideoDuration15:
      type: integer
      description: 视频时长（秒）。当前可选 `5`、`10`、`15`。
      default: 5
      enum:
      - 5
      - 10
      - 15
    Wan26VideoDuration10:
      type: integer
      description: 视频时长（秒）。当前可选 `5`、`10`。
      default: 5
      enum:
      - 5
      - 10
    Wan26VideoSeconds15:
      description: 字符串或整数形式的视频时长。当前可选 `5`、`10`、`15`。
      oneOf:
      - type: integer
        enum:
        - 5
        - 10
        - 15
      - type: string
        enum:
        - '5'
        - '10'
        - '15'
    Wan26VideoSeconds10:
      description: 字符串或整数形式的视频时长。当前可选 `5`、`10`。
      oneOf:
      - type: integer
        enum:
        - 5
        - 10
      - type: string
        enum:
        - '5'
        - '10'
    Wan26VideoResolution:
      type: string
      description: 输出分辨率。当前支持 `720P`、`1080P`。
      default: 1080P
      enum:
      - 720P
      - 1080P
    Wan26VideoAspectRatio:
      type: string
      description: 输出宽高比。当前支持 `16:9`、`9:16`、`4:3`、`3:4`、`1:1`。
      default: '16:9'
      enum:
      - '16:9'
      - '9:16'
      - '4:3'
      - '3:4'
      - '1:1'
    Wan26VideoMetadata:
      type: object
      additionalProperties: false
      description: Wan2.6 图生视频通用元数据；可在 `metadata` 中重复传 `resolution/size` 与 `duration/seconds`。
      properties:
        resolution:
          $ref: '#/components/schemas/Wan26VideoResolution'
        size:
          $ref: '#/components/schemas/Wan26VideoResolution'
        duration:
          $ref: '#/components/schemas/Wan26VideoDuration15'
        seconds:
          $ref: '#/components/schemas/Wan26VideoSeconds15'
    Wan26T2VVideoMetadata:
      type: object
      additionalProperties: false
      description: Wan2.6 文生视频元数据；支持在 `metadata` 中传分辨率、时长与宽高比。
      properties:
        resolution:
          $ref: '#/components/schemas/Wan26VideoResolution'
        size:
          $ref: '#/components/schemas/Wan26VideoResolution'
        duration:
          $ref: '#/components/schemas/Wan26VideoDuration15'
        seconds:
          $ref: '#/components/schemas/Wan26VideoSeconds15'
        aspect_ratio:
          $ref: '#/components/schemas/Wan26VideoAspectRatio'
    Wan26I2VFlashVideoMetadata:
      type: object
      additionalProperties: false
      description: Wan2.6 快速图生视频元数据；支持在 `metadata` 中传分辨率、时长、音频开关与参考视频。
      properties:
        resolution:
          $ref: '#/components/schemas/Wan26VideoResolution'
        size:
          $ref: '#/components/schemas/Wan26VideoResolution'
        duration:
          $ref: '#/components/schemas/Wan26VideoDuration15'
        seconds:
          $ref: '#/components/schemas/Wan26VideoSeconds15'
        audio:
          type: boolean
        reference_video_urls:
          type: array
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 3
    Wan26R2VVideoMetadata:
      type: object
      additionalProperties: false
      description: Wan2.6 参考生视频元数据；支持在 `metadata` 中传分辨率、时长、宽高比与参考视频。
      properties:
        resolution:
          $ref: '#/components/schemas/Wan26VideoResolution'
        size:
          $ref: '#/components/schemas/Wan26VideoResolution'
        duration:
          $ref: '#/components/schemas/Wan26VideoDuration10'
        seconds:
          $ref: '#/components/schemas/Wan26VideoSeconds10'
        aspect_ratio:
          $ref: '#/components/schemas/Wan26VideoAspectRatio'
        reference_video_urls:
          type: array
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 3
        video_url:
          type: string
          format: uri
    Happyhorse10VideoCreateRequest:
      title: HappyHorse 1.0 视频（按模型分发）
      description: HappyHorse 1.0 视频请求参数，按 `model` 区分文生视频、图生视频与参考图生视频。
      anyOf:
      - $ref: '#/components/schemas/Happyhorse10T2VVideoCreateRequest'
      - $ref: '#/components/schemas/Happyhorse10I2VVideoCreateRequest'
      - $ref: '#/components/schemas/Happyhorse10R2VVideoCreateRequest'
      - $ref: '#/components/schemas/Happyhorse10VideoEditVideoCreateRequest'
      discriminator:
        propertyName: model
        mapping:
          happyhorse-1.0-t2v: '#/components/schemas/Happyhorse10T2VVideoCreateRequest'
          happyhorse-1.0-i2v: '#/components/schemas/Happyhorse10I2VVideoCreateRequest'
          happyhorse-1.0-r2v: '#/components/schemas/Happyhorse10R2VVideoCreateRequest'
          happyhorse-1.0-video-edit: '#/components/schemas/Happyhorse10VideoEditVideoCreateRequest'
    Happyhorse10T2VVideoCreateRequest:
      type: object
      title: happyhorse-1.0-t2v 文生视频
      additionalProperties: false
      required:
      - model
      - prompt
      description: HappyHorse 1.0 文生视频请求参数。仅支持 `happyhorse-1.0-t2v`，不支持图片或参考视频输入。
      properties:
        model:
          type: string
          enum:
          - happyhorse-1.0-t2v
        prompt:
          type: string
          minLength: 1
          maxLength: 800
          description: 文本提示词。
        duration:
          $ref: '#/components/schemas/Happyhorse10T2VVideoDuration'
        seconds:
          $ref: '#/components/schemas/Happyhorse10T2VVideoSeconds'
        size:
          $ref: '#/components/schemas/Happyhorse10T2VVideoResolution'
        aspect_ratio:
          $ref: '#/components/schemas/Happyhorse10T2VVideoAspectRatio'
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
          description: 随机种子。
        metadata:
          $ref: '#/components/schemas/Happyhorse10T2VVideoMetadata'
    Happyhorse10I2VVideoCreateRequest:
      type: object
      title: happyhorse-1.0-i2v 图生视频
      additionalProperties: false
      required:
      - model
      anyOf:
      - required:
        - image
      - required:
        - images
      - required:
        - first_frame_url
      - required:
        - media
      - required:
        - metadata
        properties:
          metadata:
            required:
            - first_frame_url
      - required:
        - metadata
        properties:
          metadata:
            required:
            - media
      description: HappyHorse 1.0 图生视频请求参数。仅支持 `happyhorse-1.0-i2v`，必须提供且最多提供 1 张首帧图片。
      properties:
        model:
          type: string
          enum:
          - happyhorse-1.0-i2v
        prompt:
          type: string
          minLength: 1
          maxLength: 800
          description: 文本提示词（可选）。
        image:
          type: string
          format: uri
          description: 单图输入，作为首帧图片。
        images:
          type: array
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 1
          description: 图片输入数组，仅允许 1 张，作为首帧图片。
        first_frame_url:
          type: string
          format: uri
          description: 官方首帧图片字段。与 `image`、`images`、`media` 二选一/多选一，最终只允许 1 个图片来源。
        media:
          type: array
          minItems: 1
          maxItems: 1
          description: 官方媒体数组，仅允许 1 项，`type` 固定为 `first_frame`。
          items:
            type: object
            additionalProperties: false
            required:
            - url
            properties:
              type:
                type: string
                enum:
                - first_frame
                description: 媒体类型，当前仅支持首帧 `first_frame`。
              url:
                type: string
                format: uri
                description: 首帧图片 URL。
        duration:
          $ref: '#/components/schemas/Happyhorse10T2VVideoDuration'
        seconds:
          $ref: '#/components/schemas/Happyhorse10T2VVideoSeconds'
        size:
          $ref: '#/components/schemas/Happyhorse10T2VVideoResolution'
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
          description: 随机种子。
        metadata:
          $ref: '#/components/schemas/Happyhorse10I2VVideoMetadata'
    Happyhorse10R2VVideoCreateRequest:
      type: object
      title: happyhorse-1.0-r2v 参考图生视频
      additionalProperties: false
      required:
      - model
      - prompt
      anyOf:
      - required:
        - image
      - required:
        - images
      - required:
        - reference_image_urls
      - required:
        - media
      - required:
        - metadata
        properties:
          metadata:
            required:
            - reference_image_urls
      - required:
        - metadata
        properties:
          metadata:
            required:
            - media
      description: HappyHorse 1.0 参考图生视频请求参数。仅支持 `happyhorse-1.0-r2v`，必须提供 1~9 张参考图。
      properties:
        model:
          type: string
          enum:
          - happyhorse-1.0-r2v
        prompt:
          type: string
          minLength: 1
          maxLength: 2500
          description: 文本提示词。
        image:
          type: string
          format: uri
          description: 单图输入，作为参考图。
        images:
          type: array
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 9
          description: 图片输入数组，作为参考图，最多 9 张。
        reference_image_urls:
          type: array
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 9
          description: 官方参考图 URL 数组，1~9 张。
        media:
          type: array
          minItems: 1
          maxItems: 9
          description: 官方媒体数组，1~9 项，`type` 固定为 `reference_image`。
          items:
            type: object
            additionalProperties: false
            required:
            - url
            properties:
              type:
                type: string
                enum:
                - reference_image
                description: 媒体类型，当前仅支持参考图 `reference_image`。
              url:
                type: string
                format: uri
                description: 参考图 URL。
        duration:
          $ref: '#/components/schemas/Happyhorse10T2VVideoDuration'
        seconds:
          $ref: '#/components/schemas/Happyhorse10T2VVideoSeconds'
        size:
          $ref: '#/components/schemas/Happyhorse10T2VVideoResolution'
        aspect_ratio:
          $ref: '#/components/schemas/Happyhorse10T2VVideoAspectRatio'
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
          description: 随机种子。
        metadata:
          $ref: '#/components/schemas/Happyhorse10R2VVideoMetadata'
    Happyhorse10VideoEditVideoCreateRequest:
      type: object
      title: happyhorse-1.0-video-edit 视频编辑
      additionalProperties: false
      required:
      - model
      - prompt
      oneOf:
      - required:
        - video_url
      - required:
        - media
      - required:
        - metadata
        properties:
          metadata:
            required:
            - video_url
      - required:
        - metadata
        properties:
          metadata:
            required:
            - media
      description: HappyHorse 1.0 视频编辑请求参数。仅支持 `happyhorse-1.0-video-edit`。必须提供文本提示词和 1 个源视频，可选参考图；该模型不暴露 duration。
      properties:
        model:
          type: string
          enum:
          - happyhorse-1.0-video-edit
        prompt:
          type: string
          minLength: 1
          maxLength: 2500
          description: 文本提示词（必填）。
        video_url:
          type: string
          format: uri
          description: 源视频 URL。
        reference_image_urls:
          type: array
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 5
          description: 可选参考图 URL，最多 5 张。
        media:
          type: array
          minItems: 1
          maxItems: 6
          description: 官方媒体数组。提供 1 个 `video` 项，可选 `reference_image` 项；最多 6 个媒体项。
          items:
            type: object
            additionalProperties: false
            required:
            - type
            - url
            properties:
              type:
                type: string
                enum:
                - video
                - reference_image
                description: 媒体类型。支持 `video` 与 `reference_image`。
              url:
                type: string
                format: uri
                description: 媒体 URL。
        size:
          $ref: '#/components/schemas/Happyhorse10T2VVideoResolution'
        audio_setting:
          $ref: '#/components/schemas/Happyhorse10VideoEditAudioSetting'
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
          description: 随机种子。
        metadata:
          $ref: '#/components/schemas/Happyhorse10VideoEditVideoMetadata'
    Happyhorse10T2VVideoDuration:
      type: integer
      description: 输出视频时长（秒）。
      default: 5
      enum:
      - 3
      - 4
      - 5
      - 6
      - 7
      - 8
      - 9
      - 10
      - 11
      - 12
      - 13
      - 14
      - 15
    Happyhorse10T2VVideoSeconds:
      description: OpenAI 兼容别名字段，对应 `duration`。
      oneOf:
      - type: integer
        enum:
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 13
        - 14
        - 15
      - type: string
        enum:
        - '3'
        - '4'
        - '5'
        - '6'
        - '7'
        - '8'
        - '9'
        - '10'
        - '11'
        - '12'
        - '13'
        - '14'
        - '15'
    Happyhorse10T2VVideoResolution:
      type: string
      description: 输出视频分辨率。exact SKU 使用标准化后的 720p/1080p 值。
      default: 1080P
      enum:
      - 720P
      - 1080P
    Happyhorse10T2VVideoAspectRatio:
      type: string
      description: 输出视频宽高比。该模型当前按上游官方枚举暴露。
      default: '16:9'
      enum:
      - '16:9'
      - '9:16'
      - '1:1'
      - '4:3'
      - '3:4'
    Happyhorse10VideoEditAudioSetting:
      type: string
      description: 视频编辑音频处理模式。
      default: auto
      enum:
      - auto
      - origin
    Happyhorse10T2VVideoMetadata:
      type: object
      additionalProperties: false
      description: 兼容对象。新接入客户端优先使用顶层字段。
      properties:
        duration:
          $ref: '#/components/schemas/Happyhorse10T2VVideoDuration'
        seconds:
          $ref: '#/components/schemas/Happyhorse10T2VVideoSeconds'
        resolution:
          $ref: '#/components/schemas/Happyhorse10T2VVideoResolution'
        size:
          $ref: '#/components/schemas/Happyhorse10T2VVideoResolution'
        aspect_ratio:
          $ref: '#/components/schemas/Happyhorse10T2VVideoAspectRatio'
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
    Happyhorse10I2VVideoMetadata:
      type: object
      additionalProperties: false
      description: HappyHorse 图生视频兼容对象。新接入客户端优先使用顶层字段。
      properties:
        duration:
          $ref: '#/components/schemas/Happyhorse10T2VVideoDuration'
        seconds:
          $ref: '#/components/schemas/Happyhorse10T2VVideoSeconds'
        resolution:
          $ref: '#/components/schemas/Happyhorse10T2VVideoResolution'
        size:
          $ref: '#/components/schemas/Happyhorse10T2VVideoResolution'
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
        first_frame_url:
          type: string
          format: uri
        media:
          type: array
          minItems: 1
          maxItems: 1
          items:
            type: object
            additionalProperties: false
            required:
            - url
            properties:
              type:
                type: string
                enum:
                - first_frame
              url:
                type: string
                format: uri
    Happyhorse10R2VVideoMetadata:
      type: object
      additionalProperties: false
      description: HappyHorse 参考图生视频兼容对象。新接入客户端优先使用顶层字段。
      properties:
        duration:
          $ref: '#/components/schemas/Happyhorse10T2VVideoDuration'
        seconds:
          $ref: '#/components/schemas/Happyhorse10T2VVideoSeconds'
        resolution:
          $ref: '#/components/schemas/Happyhorse10T2VVideoResolution'
        size:
          $ref: '#/components/schemas/Happyhorse10T2VVideoResolution'
        aspect_ratio:
          $ref: '#/components/schemas/Happyhorse10T2VVideoAspectRatio'
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
        reference_image_url:
          type: string
          format: uri
        reference_image_urls:
          type: array
          minItems: 1
          maxItems: 9
          items:
            type: string
            format: uri
        media:
          type: array
          minItems: 1
          maxItems: 9
          items:
            type: object
            additionalProperties: false
            required:
            - url
            properties:
              type:
                type: string
                enum:
                - reference_image
              url:
                type: string
                format: uri
    Happyhorse10VideoEditVideoMetadata:
      type: object
      additionalProperties: false
      description: HappyHorse 视频编辑兼容对象。新接入客户端优先使用顶层字段。
      properties:
        resolution:
          $ref: '#/components/schemas/Happyhorse10T2VVideoResolution'
        size:
          $ref: '#/components/schemas/Happyhorse10T2VVideoResolution'
        audio_setting:
          $ref: '#/components/schemas/Happyhorse10VideoEditAudioSetting'
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
        video_url:
          type: string
          format: uri
        reference_image_url:
          type: string
          format: uri
        reference_image_urls:
          type: array
          minItems: 1
          maxItems: 5
          items:
            type: string
            format: uri
        media:
          type: array
          minItems: 1
          maxItems: 6
          items:
            type: object
            additionalProperties: false
            required:
            - type
            - url
            properties:
              type:
                type: string
                enum:
                - video
                - reference_image
              url:
                type: string
                format: uri
    KlingV3VideoCreateRequest:
      type: object
      title: kling-v3-video
      additionalProperties: false
      required:
      - model
      description: Kling v3 Video 请求。`model` 固定为 `kling-v3-video`。
      properties:
        model:
          type: string
          enum:
          - kling-v3-video
          description: 模型 ID。
        prompt:
          type: string
          minLength: 1
          description: 文本提示词。文生视频必填，图片输入场景建议填写。
        image:
          type: string
          format: uri
          description: 单张 URL 图片输入，用于图生视频或首帧生成。
        images:
          type: array
          description: URL 图片输入数组。传 2 张图时默认进入首尾帧模式，除非显式指定类别。
          items:
            type: string
            format: uri
          minItems: 1
        first_frame_url:
          type: string
          format: uri
          description: 首帧图片 URL。
        last_frame_url:
          type: string
          format: uri
          description: 尾帧图片 URL。
        element_list:
          $ref: '#/components/schemas/KlingV3ElementList'
          description: 官方主体参考列表。每项只支持 `element_id`；该 Kling v3 schema 不支持媒体 URL 元素。
        camera_control:
          type: object
          description: '`kling-v3-video` 镜头控制对象。'
          additionalProperties: true
        duration:
          $ref: '#/components/schemas/KlingV3VideoDuration'
        seconds:
          $ref: '#/components/schemas/KlingV3VideoSeconds'
        aspect_ratio:
          $ref: '#/components/schemas/KlingV3AspectRatio'
        mode:
          $ref: '#/components/schemas/KlingV3VideoMode'
        sound:
          $ref: '#/components/schemas/KlingV3Sound'
          description: 声音生成开关。必须使用字符串 `on` 或 `off`；普通文生/图生/首尾帧类别支持 `on/off`，参考图主体引用类别只支持 `off`。
        negative_prompt:
          type: string
          description: 反向提示词。
        multi_prompt:
          $ref: '#/components/schemas/KlingV3MultiPrompt'
          description: 多镜头分镜数组，最多 6 个镜头。
        multi_shot:
          type: boolean
          description: 是否启用多镜头生成。
        shot_type:
          type: string
          description: 多镜头模式类型。
        static_mask:
          type: string
          description: 静态遮罩对象。
        voice_list:
          type: array
          description: 声音列表。
          items:
            type: object
            additionalProperties: true
        metadata:
          $ref: '#/components/schemas/KlingV3VideoMetadata'
    KlingV3OmniVideoCreateRequest:
      type: object
      title: kling-v3-omni-video
      additionalProperties: false
      required:
      - model
      description: Kling v3 Omni Video 请求。`model` 固定为 `kling-v3-omni-video`。
      properties:
        model:
          type: string
          enum:
          - kling-v3-omni-video
          description: 模型 ID。
        prompt:
          type: string
          minLength: 1
          description: 文本提示词。
        image:
          type: string
          format: uri
          description: 单图输入，作为首帧或参考图。
        images:
          type: array
          description: 图片输入数组。
          items:
            type: string
            format: uri
          minItems: 1
        video_url:
          type: string
          format: uri
          description: 视频输入 URL。该输入形态仅支持 `3~10s`，不能与 `sound=on` 同时使用。
        video_list:
          type: array
          description: 视频输入列表。元素可为 URL 字符串或包含 `video_url` 的对象；可选 `refer_type` 为 `feature` / `base`，`keep_original_sound` 为
            `yes` / `no`。该输入形态仅支持 `3~10s`，不能与 `sound=on` 同时使用。
          items:
            oneOf:
            - type: string
              format: uri
            - type: object
              additionalProperties: false
              properties:
                url:
                  type: string
                  format: uri
                video_url:
                  type: string
                  format: uri
                refer_type:
                  type: string
                  enum:
                  - feature
                  - base
                keep_original_sound:
                  type: string
                  enum:
                  - true
                  - false
          minItems: 1
        image_list:
          type: array
          description: 官方图片输入列表。Omni Video 使用 `image_url`；可选 `type` 仅支持 `first_frame` 与 `end_frame`。
          items:
            oneOf:
            - type: string
              format: uri
            - type: object
              additionalProperties: false
              properties:
                url:
                  type: string
                  format: uri
                image_url:
                  type: string
                  format: uri
                type:
                  type: string
                  enum:
                  - first_frame
                  - end_frame
          minItems: 1
        element_list:
          $ref: '#/components/schemas/KlingV3ElementList'
          description: 官方主体参考列表。每项只支持 `element_id`；媒体 URL 必须走 `image_list` 或 `video_list`。
        first_frame_url:
          type: string
          format: uri
          description: 首帧图片 URL。
        last_frame_url:
          type: string
          format: uri
          description: 尾帧图片 URL。
        reference_image_url:
          type: string
          format: uri
          description: 单张参考图 URL。
        reference_image_urls:
          type: array
          description: 参考图 URL 数组。
          items:
            type: string
            format: uri
          minItems: 1
        duration:
          $ref: '#/components/schemas/KlingV3VideoDuration'
        seconds:
          $ref: '#/components/schemas/KlingV3VideoSeconds'
        aspect_ratio:
          $ref: '#/components/schemas/KlingV3AspectRatio'
        mode:
          $ref: '#/components/schemas/KlingV3VideoMode'
        sound:
          $ref: '#/components/schemas/KlingV3Sound'
          description: 声音生成开关。必须使用字符串 `on` 或 `off`；普通文生/图生/首尾帧/参考图类别支持 `on/off`，`video_url` / `video_list` 参考视频输入只支持 `off`。
        multi_prompt:
          $ref: '#/components/schemas/KlingV3MultiPrompt'
          description: 多镜头分镜数组，最多 6 个镜头。
        multi_shot:
          type: boolean
          description: 是否启用多镜头生成。
        shot_type:
          type: string
          description: 多镜头模式类型。
        metadata:
          $ref: '#/components/schemas/KlingV3OmniVideoMetadata'
    KlingV3VideoDuration:
      description: 视频时长（秒）。这些模型支持 3 到 15 秒。
      oneOf:
      - type: integer
        enum:
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 13
        - 14
        - 15
      - type: string
        enum:
        - '3'
        - '4'
        - '5'
        - '6'
        - '7'
        - '8'
        - '9'
        - '10'
        - '11'
        - '12'
        - '13'
        - '14'
        - '15'
    KlingV3VideoSeconds:
      description: OpenAI 兼容别名字段，对应 `duration`。
      oneOf:
      - type: integer
        enum:
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 13
        - 14
        - 15
      - type: string
        enum:
        - '3'
        - '4'
        - '5'
        - '6'
        - '7'
        - '8'
        - '9'
        - '10'
        - '11'
        - '12'
        - '13'
        - '14'
        - '15'
    KlingV3VideoMode:
      type: string
      description: '`kling-v3-video` 与 `kling-v3-omni-video` 的质量模式。'
      default: std
      enum:
      - std
      - pro
    KlingV3Sound:
      type: string
      description: 声音生成开关。普通类别支持 `on/off`；`kling-v3-video` 参考图视频和 `kling-v3-omni-video` 的 `video_url` / `video_list` 参考视频输入只支持
        `off`。
      default: 'off'
      enum:
      - 'on'
      - 'off'
    KlingV3AspectRatio:
      type: string
      description: 支持的输出宽高比：`16:9`、`9:16`、`1:1`。
      default: '16:9'
      enum:
      - '16:9'
      - '9:16'
      - '1:1'
    KlingV3MultiPrompt:
      type: array
      description: 多镜头分镜数组，每项可包含 `index`、`prompt` 与 `duration`。
      maxItems: 6
      items:
        type: object
        additionalProperties: false
        properties:
          index:
            type: integer
            minimum: 1
          prompt:
            type: string
            maxLength: 512
          duration:
            type: integer
            minimum: 1
    KlingV3VideoMetadata:
      type: object
      additionalProperties: false
      description: Kling v3 Video 兼容对象。新接入客户端优先使用顶层字段。`element_list` 只支持 `{ element_id }` 项。
      properties:
        aigc_category:
          type: string
          enum:
          - text_to_video
          - image_to_video
          - first_last_frame_to_video
          - reference_image_to_video
        duration:
          $ref: '#/components/schemas/KlingV3VideoDuration'
        seconds:
          $ref: '#/components/schemas/KlingV3VideoSeconds'
        aspect_ratio:
          $ref: '#/components/schemas/KlingV3AspectRatio'
        mode:
          $ref: '#/components/schemas/KlingV3VideoMode'
        sound:
          $ref: '#/components/schemas/KlingV3Sound'
          description: 兼容 metadata 写法的声音生成开关。新接入客户端优先使用顶层 `sound`，取值为字符串 `on` 或 `off`。
        first_frame_url:
          type: string
          format: uri
        last_frame_url:
          type: string
          format: uri
        negative_prompt:
          type: string
        multi_prompt:
          $ref: '#/components/schemas/KlingV3MultiPrompt'
        multi_shot:
          type: boolean
        shot_type:
          type: string
          enum:
          - customize
          - intelligence
        static_mask:
          type: string
        voice_list:
          type: array
          items:
            type: object
            additionalProperties: true
        element_list:
          $ref: '#/components/schemas/KlingV3ElementList'
    KlingV3ElementList:
      type: array
      description: Kling v3 官方主体参考列表。
      minItems: 1
      items:
        type: object
        additionalProperties: false
        required:
        - element_id
        properties:
          element_id:
            type: integer
            minimum: 1
            description: 主体 ID。
            example: 12345
    KlingV3OmniVideoMetadata:
      type: object
      additionalProperties: false
      description: Kling v3 Omni Video 兼容对象。新接入客户端优先使用顶层字段。`image_list.type` 仅支持 `first_frame/end_frame`，`element_list` 只支持
        `{ element_id }` 项。
      properties:
        aigc_category:
          type: string
          enum:
          - text_to_video
          - image_to_video
          - first_last_frame_to_video
          - reference_image_to_video
        duration:
          $ref: '#/components/schemas/KlingV3VideoDuration'
        seconds:
          $ref: '#/components/schemas/KlingV3VideoSeconds'
        aspect_ratio:
          $ref: '#/components/schemas/KlingV3AspectRatio'
        mode:
          $ref: '#/components/schemas/KlingV3VideoMode'
        sound:
          $ref: '#/components/schemas/KlingV3Sound'
          description: 兼容 metadata 写法的声音生成开关。新接入客户端优先使用顶层 `sound`，取值为字符串 `on` 或 `off`。
        video_url:
          type: string
          format: uri
        video_list:
          type: array
          minItems: 1
          items:
            oneOf:
            - type: string
              format: uri
            - type: object
              additionalProperties: false
              properties:
                url:
                  type: string
                  format: uri
                video_url:
                  type: string
                  format: uri
                refer_type:
                  type: string
                  enum:
                  - feature
                  - base
                keep_original_sound:
                  type: string
                  enum:
                  - true
                  - false
        image_list:
          type: array
          minItems: 1
          items:
            oneOf:
            - type: string
              format: uri
            - type: object
              additionalProperties: false
              properties:
                url:
                  type: string
                  format: uri
                image_url:
                  type: string
                  format: uri
                type:
                  type: string
                  enum:
                  - first_frame
                  - end_frame
        element_list:
          $ref: '#/components/schemas/KlingV3ElementList'
        first_frame_url:
          type: string
          format: uri
        last_frame_url:
          type: string
          format: uri
        reference_image_url:
          type: string
          format: uri
        reference_image_urls:
          type: array
          minItems: 1
          items:
            type: string
            format: uri
        multi_prompt:
          $ref: '#/components/schemas/KlingV3MultiPrompt'
        multi_shot:
          type: boolean
        shot_type:
          type: string
          enum:
          - customize
    GeminiImageGenerationRequest:
      type: object
      description: 'Gemini 图片生成请求。

        - `gemini-2.5-flash-image`、`gemini-3-pro-image-preview` 与 `gemini-3.1-flash-image-preview` 使用 Gemini 图片参数集

        - 本对象仅用于主路径 `/v1/images/generations` 的 Gemini 文档展示

        '
      oneOf:
      - $ref: '#/components/schemas/ImaImageGenerationRequestGemini25Flash'
      - $ref: '#/components/schemas/ImaImageGenerationRequestGemini3Pro'
      - $ref: '#/components/schemas/ImaImageGenerationRequestGemini31Flash'
      discriminator:
        propertyName: model
        mapping:
          gemini-2.5-flash-image: '#/components/schemas/ImaImageGenerationRequestGemini25Flash'
          gemini-3-pro-image-preview: '#/components/schemas/ImaImageGenerationRequestGemini3Pro'
          gemini-3.1-flash-image-preview: '#/components/schemas/ImaImageGenerationRequestGemini31Flash'
    ImaImageGenerationRequest:
      type: object
      description: '图片生成请求（按模型严格约束）。

        - Gemini：`gemini-2.5-flash-image`、`gemini-3-pro-image-preview`、`gemini-3.1-flash-image-preview`

        - GPT Image：`gpt-image-2`

        - 豆包 Seedream：`doubao-seedream-4-5-251128`、`doubao-seedream-5-0-lite-260128`

        - Wan 图片：`wan2.6-t2i`、`wan2.6-image`、`wan2.7-image`、`wan2.7-image-pro`

        - PrunaAI 图片：`prunaai/p-image`、`prunaai/p-image-edit`

        - 各模型族使用独立 schema，字段只表达当前实现会校验或透传的参数

        '
      oneOf:
      - $ref: '#/components/schemas/ImaImageGenerationRequestGemini25Flash'
      - $ref: '#/components/schemas/ImaImageGenerationRequestGemini3Pro'
      - $ref: '#/components/schemas/ImaImageGenerationRequestGemini31Flash'
      - $ref: '#/components/schemas/GptImage2ImageGenerationRequest'
      - $ref: '#/components/schemas/DoubaoSeedream45ImageGenerationRequest'
      - $ref: '#/components/schemas/DoubaoSeedream50LiteImageGenerationRequest'
      - $ref: '#/components/schemas/Wan26T2IImageGenerationRequest'
      - $ref: '#/components/schemas/Wan26I2IImageGenerationRequest'
      - $ref: '#/components/schemas/Wan27ImageGenerationRequest'
      - $ref: '#/components/schemas/PrunaPImageGenerationRequest'
      - $ref: '#/components/schemas/PrunaPImageEditGenerationRequest'
      discriminator:
        propertyName: model
        mapping:
          gemini-2.5-flash-image: '#/components/schemas/ImaImageGenerationRequestGemini25Flash'
          gemini-3-pro-image-preview: '#/components/schemas/ImaImageGenerationRequestGemini3Pro'
          gemini-3.1-flash-image-preview: '#/components/schemas/ImaImageGenerationRequestGemini31Flash'
          gpt-image-2: '#/components/schemas/GptImage2ImageGenerationRequest'
          doubao-seedream-4-5-251128: '#/components/schemas/DoubaoSeedream45ImageGenerationRequest'
          doubao-seedream-5-0-lite-260128: '#/components/schemas/DoubaoSeedream50LiteImageGenerationRequest'
          seedream-5-0-260128: '#/components/schemas/DoubaoSeedream50LiteImageGenerationRequest'
          wan2.6-t2i: '#/components/schemas/Wan26T2IImageGenerationRequest'
          wan2.6-image: '#/components/schemas/Wan26I2IImageGenerationRequest'
          wan2.7-image: '#/components/schemas/Wan27ImageGenerationRequest'
          wan2.7-image-pro: '#/components/schemas/Wan27ImageGenerationRequest'
          prunaai/p-image: '#/components/schemas/PrunaPImageGenerationRequest'
          prunaai/p-image-edit: '#/components/schemas/PrunaPImageEditGenerationRequest'
    ImaMusicCreateTaskRequest:
      type: object
      additionalProperties: false
      required:
      - model
      - prompt
      description: sonic 音乐生成请求。
      example:
        model: sonic
        prompt: Bright synth-pop with a catchy chorus
        custom_mode: false
        model_version: sonic-v5
        tags: electronic, cinematic
        title: Neon Skyline
        vocal_gender: f
        style_weight: 0
        weirdness_constraint: 0
      properties:
        model:
          type: string
          enum:
          - sonic
          description: 音乐模型 ID，当前支持 `sonic`。
        prompt:
          type: string
          minLength: 1
          maxLength: 5000
          description: 音乐提示词（必填）。
        auto_lyrics:
          type: boolean
          default: false
          description: 是否自动生成歌词；显式 `false` 会保留。
        custom_mode:
          type: boolean
          default: true
          description: 是否使用自定义模式；默认 `true`，显式 `false` 会保留。
        gpt_description_prompt:
          type: string
          maxLength: 400
          description: 用于生成歌曲描述的提示词，最长 400 字符。
        make_instrumental:
          type: boolean
          default: false
          description: 是否生成纯音乐；显式 `false` 会保留。
        model_version:
          type: string
          default: sonic-v4
          enum:
          - sonic-v3-5
          - sonic-v4
          - sonic-v4-5
          - sonic-v4-5-plus
          - sonic-v5
          description: Sonic 模型版本；未传时默认 `sonic-v4`。
        negative_tags:
          type: string
          description: 反向标签。
        style_weight:
          type: number
          minimum: 0
          maximum: 1
          description: 风格权重，范围 0 到 1；显式 `0` 会保留。
        tags:
          type: string
          maxLength: 1000
          description: 风格或音乐标签，最长 1000 字符。
        title:
          type: string
          maxLength: 120
          description: 歌曲标题，最长 120 字符。
        vocal_gender:
          type: string
          description: 人声性别提示，通常为 `m` 或 `f`。
        weirdness_constraint:
          type: number
          minimum: 0
          maximum: 1
          description: 创意/怪异度约束，范围 0 到 1；显式 `0` 会保留。
    ImaMusicCreateTaskResponse:
      type: object
      additionalProperties: true
      description: 音乐任务提交响应。
      properties:
        id:
          type: string
          description: 公开任务 ID。
        task_id:
          type: string
          description: 与 `id` 相同。
        object:
          type: string
          example: music
        model:
          type: string
          example: sonic
        status:
          type: string
          description: 初始状态。
        progress:
          type: integer
          minimum: 0
          maximum: 100
        created_at:
          type: integer
          format: int64
    ImaMusicTaskFetchResponse:
      type: object
      additionalProperties: true
      description: 音乐任务查询响应。
      properties:
        code:
          type: string
          example: success
        data:
          type: object
          additionalProperties: true
          properties:
            task_id:
              type: string
              description: 公开任务 ID。
            status:
              type: string
              description: 任务状态。
              enum:
              - queued
              - processing
              - succeeded
              - failed
            data:
              type: array
              description: 音乐结果数组。成功终态通常返回 2 条结果；排队、处理中或失败时可以为空数组。
              items:
                $ref: '#/components/schemas/ImaMusicResult'
            amount_usd:
              type: number
              format: double
              minimum: 0
              description: 任务完成后的美元金额（如返回）。
            error:
              nullable: true
              oneOf:
              - type: object
                additionalProperties: true
              - type: string
    SeedTtsSpeechCreateRequest:
      type: object
      x-model-type: tts
      additionalProperties: false
      required:
      - model
      allOf:
      - anyOf:
        - required:
          - input
        - required:
          - text
        - required:
          - prompt
        - required:
          - ssml
      - anyOf:
        - required:
          - voice
        - required:
          - speaker
      description: Seed TTS 2.0 语音合成请求体。
      properties:
        model:
          type: string
          enum:
          - seed-tts-2.0
          description: 语音模型名称。当前仅支持 `seed-tts-2.0`。
        input:
          type: string
          minLength: 1
          maxLength: 10000
          description: 文本输入。`input`、`text`、`prompt`、`ssml` 至少提供一个。
        text:
          type: string
          minLength: 1
          maxLength: 10000
          description: 文本输入别名。
        prompt:
          type: string
          minLength: 1
          maxLength: 10000
          description: 文本输入别名。
        ssml:
          type: string
          minLength: 1
          maxLength: 10000
          description: SSML 输入。
        voice:
          type: string
          description: OpenAI 兼容 voice 字段。
        speaker:
          type: string
          description: 语音 speaker 字段。
        response_format:
          type: string
          default: mp3
          description: 音频格式，默认 `mp3`。
        speed:
          type: number
          format: double
          description: 语速倍率。
        metadata:
          type: object
          additionalProperties: true
          description: 可选元数据。
    SeedTtsSpeechCreateResponse:
      type: object
      additionalProperties: true
      description: Seed TTS 任务提交响应。
      properties:
        id:
          type: string
          description: 公开任务 ID。
        task_id:
          type: string
          description: 公开任务 ID。
        object:
          type: string
          example: audio.speech
        model:
          type: string
          example: seed-tts-2.0
        status:
          type: string
          example: submitted
        progress:
          type: integer
          minimum: 0
          maximum: 100
        created_at:
          type: integer
          format: int64
    SeedTtsSpeechFetchResponse:
      type: object
      additionalProperties: true
      description: Seed TTS 任务查询响应。
      properties:
        code:
          type: string
          example: success
        data:
          type: object
          additionalProperties: true
          properties:
            task_id:
              type: string
              description: 公开任务 ID。
            status:
              type: string
              enum:
              - queued
              - processing
              - succeeded
              - failed
              description: 任务状态。
            format:
              type: string
              description: 音频格式。
            url:
              type: string
              description: 终态成功后的音频 URL。
            amount_usd:
              type: number
              format: double
              minimum: 0
              description: 任务完成后的美元金额（如返回）。
            usage:
              type: object
              additionalProperties: true
              description: 终态用量。
              properties:
                count:
                  type: integer
                  minimum: 0
                  description: 字符数用量。
            error:
              nullable: true
              oneOf:
              - type: object
                additionalProperties: true
              - type: string
    ImaMusicResult:
      type: object
      additionalProperties: true
      description: 单条音乐结果。客户端应以 `url` 或 `audio_url` 作为音频地址优先读取。
      properties:
        url:
          type: string
          format: uri
          description: 音乐结果 URL。建议接收后立即下载并保存。
        audio_url:
          type: string
          format: uri
          description: 音乐音频 URL。
        title:
          type: string
          description: 歌曲标题。
        lyrics:
          type: string
          description: 歌词文本。
        duration:
          type: number
          minimum: 0
          description: 音频时长（秒）。
        metadata:
          type: object
          additionalProperties: true
          description: 音乐结果元数据。
    ImaImageGenerationRequestGemini25Flash:
      type: object
      additionalProperties: false
      required:
      - model
      - prompt
      example:
        model: gemini-2.5-flash-image
        prompt: compact watercolor postcard of a mountain village
        aspect_ratio: '21:9'
        size: 4K
      properties:
        model:
          type: string
          enum:
          - gemini-2.5-flash-image
          description: 图片模型名称（Gemini 2.5 Flash Image）。
        prompt:
          type: string
          minLength: 1
          maxLength: 10000
          description: 提示词（必填）。
        aspect_ratio:
          type: string
          description: 图片宽高比（可选）。
          enum:
          - '1:1'
          - '1:4'
          - '1:8'
          - '2:3'
          - '3:2'
          - '3:4'
          - '4:1'
          - '4:3'
          - '4:5'
          - '5:4'
          - '8:1'
          - '9:16'
          - '16:9'
          - '21:9'
        size:
          type: string
          description: 输出尺寸（可选，默认 `1K`）。
          default: 1K
          enum:
          - 512px
          - 1K
          - 2K
          - 4K
        image:
          type: string
          format: uri
          description: '单图输入（可选，image-to-image）。

            **重要提示**：请在调用前确认输入 URL 可访问；30 天失效规则仅适用于接口返回的结果资源 URL。

            文件类型要求：`jpg/png`（上游约束）。

            '
        images:
          type: array
          description: '多图输入（可选，image-to-image）。

            **重要提示**：请在调用前确认输入 URL 可访问；30 天失效规则仅适用于接口返回的结果资源 URL。

            文件类型要求：`jpg/png`（上游约束）。

            '
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 14
    ImaImageGenerationRequestGemini3Pro:
      type: object
      additionalProperties: false
      required:
      - model
      - prompt
      example:
        model: gemini-3-pro-image-preview
        prompt: a futuristic city at sunset
        aspect_ratio: '16:9'
        size: 2K
      properties:
        model:
          type: string
          enum:
          - gemini-3-pro-image-preview
          description: 图片模型名称（pro）。
        prompt:
          type: string
          minLength: 1
          maxLength: 10000
          description: 提示词（必填）。
        aspect_ratio:
          type: string
          description: 图片宽高比（可选）。
          enum:
          - '1:1'
          - '3:2'
          - '2:3'
          - '3:4'
          - '4:3'
          - '4:5'
          - '5:4'
          - '9:16'
          - '16:9'
          - '21:9'
        size:
          type: string
          description: 输出尺寸（可选，默认 `1K`）。
          default: 1K
          enum:
          - 1K
          - 2K
          - 4K
        image:
          type: string
          format: uri
          description: '单图输入（可选，image-to-image）。

            **重要提示**：请在调用前确认输入 URL 可访问；30 天失效规则仅适用于接口返回的结果资源 URL。

            文件类型要求：`jpg/png`（上游约束）。

            '
        images:
          type: array
          description: '多图输入（可选，image-to-image）。

            **重要提示**：请在调用前确认输入 URL 可访问；30 天失效规则仅适用于接口返回的结果资源 URL。

            文件类型要求：`jpg/png`（上游约束）。

            '
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 14
    ImaImageGenerationRequestGemini31Flash:
      type: object
      additionalProperties: false
      required:
      - model
      - prompt
      example:
        model: gemini-3.1-flash-image-preview
        prompt: minimalist icon set for weather app
        aspect_ratio: '1:1'
        size: 512px
      properties:
        model:
          type: string
          enum:
          - gemini-3.1-flash-image-preview
          description: 图片模型名称（flash）。
        prompt:
          type: string
          minLength: 1
          maxLength: 10000
          description: 提示词（必填）。
        aspect_ratio:
          type: string
          description: 图片宽高比（可选）。
          enum:
          - '1:1'
          - '1:4'
          - '1:8'
          - '2:3'
          - '3:2'
          - '3:4'
          - '4:1'
          - '4:3'
          - '4:5'
          - '5:4'
          - '8:1'
          - '9:16'
          - '16:9'
          - '21:9'
        size:
          type: string
          description: 输出尺寸（可选，默认 `1K`）。
          default: 1K
          enum:
          - 512px
          - 1K
          - 2K
          - 4K
        image:
          type: string
          format: uri
          description: '单图输入（可选，image-to-image）。

            **重要提示**：请在调用前确认输入 URL 可访问；30 天失效规则仅适用于接口返回的结果资源 URL。

            文件类型要求：`jpg/png`（上游约束）。

            '
        images:
          type: array
          description: '多图输入（可选，image-to-image）。

            **重要提示**：请在调用前确认输入 URL 可访问；30 天失效规则仅适用于接口返回的结果资源 URL。

            文件类型要求：`jpg/png`（上游约束）。

            '
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 14
    GptImage2ImageGenerationRequest:
      type: object
      additionalProperties: false
      required:
      - model
      - prompt
      example:
        model: gpt-image-2
        prompt: replace the background with a clean studio backdrop
        images:
        - https://example.com/input.png
        mask: https://example.com/mask.png
        size: 1536x1024
        quality: high
        input_fidelity: high
        moderation: low
        output_format: png
      properties:
        model:
          type: string
          enum:
          - gpt-image-2
          description: gpt-image-2 图片模型名称。
        prompt:
          type: string
          minLength: 1
          description: 提示词（必填）。当前实现要求 `prompt` 必传。
        size:
          type: string
          description: 输出尺寸（可选）。当前实现原样透传，不做枚举校验。
        quality:
          type: string
          description: 输出质量（可选）。当前实现原样透传。
        image:
          type: string
          description: 单图输入（可选）。存在图片输入但未传 `mask` 时按 `image_to_image` 处理。
        images:
          type: array
          description: 多图输入（可选）。存在图片输入但未传 `mask` 时按 `image_to_image` 处理。
          items:
            type: string
        background:
          type: string
          description: 背景控制（可选）。当前实现原样透传。
        input_fidelity:
          type: string
          description: 输入保真度（可选）。当前实现原样透传。
        mask:
          type: string
          description: 编辑遮罩（可选）。存在图片输入且传 `mask` 时按 `image_edit` 处理。
        moderation:
          type: string
          description: 审核强度（可选）。当前实现原样透传。
        n:
          type: integer
          minimum: 0
          description: 返回图片数量（可选）。当前实现原样透传。
        output_compression:
          type: integer
          minimum: 0
          maximum: 100
          default: 100
          description: 输出压缩比（可选，0~100）。**仅对 `output_format=jpeg` 或 `webp` 生效**；当 `output_format=png` 时必须为 100（默认值），否则上游返回
            400 `invalid_png_output_compression`。
        output_format:
          type: string
          enum:
          - png
          - jpeg
          - webp
          default: png
          description: 输出格式（可选）。可选 `png`（默认）/`jpeg`/`webp`。注意：选 `png` 时不要传 `output_compression`（或设为 100），否则上游拒绝。
    DoubaoSeedreamImageGenerationRequest:
      type: object
      description: 豆包 Seedream 图片生成请求。真实请求路径为 `POST /v1/images/generations`，按 `model` 分发到 4.5 或 5.0 Lite 的具体请求体。
      oneOf:
      - $ref: '#/components/schemas/DoubaoSeedream45ImageGenerationRequest'
      - $ref: '#/components/schemas/DoubaoSeedream50LiteImageGenerationRequest'
      discriminator:
        propertyName: model
        mapping:
          doubao-seedream-4-5-251128: '#/components/schemas/DoubaoSeedream45ImageGenerationRequest'
          doubao-seedream-5-0-lite-260128: '#/components/schemas/DoubaoSeedream50LiteImageGenerationRequest'
          seedream-5-0-260128: '#/components/schemas/DoubaoSeedream50LiteImageGenerationRequest'
    DoubaoSeedream45ImageGenerationRequest:
      type: object
      additionalProperties: false
      required:
      - model
      - prompt
      description: doubao-seedream-4-5-251128 图片生成请求体。支持文生图和图生图；当前实现只透传 `prompt`、`size` 与图片输入。
      example:
        model: doubao-seedream-4-5-251128
        prompt: turn this reference into a cinematic poster
        images:
        - https://example.com/input.webp
        size: 2K
      properties:
        model:
          type: string
          enum:
          - doubao-seedream-4-5-251128
          description: doubao-seedream-4-5-251128 图片模型名称。
        prompt:
          type: string
          minLength: 1
          maxLength: 600
          description: 提示词（必填）。
        size:
          type: string
          description: 输出尺寸（可选）。支持 `2K`、`4K` 以及上游允许的自定义像素尺寸。
          default: 2K
          enum:
          - 2K
          - 4K
          - 2048x2048
          - 2304x1728
          - 1728x2304
          - 2560x1440
          - 1440x2560
          - 2496x1664
          - 1664x2496
          - 3024x1296
        image:
          type: string
          format: uri
          description: 单图输入（可选，image-to-image）。
        images:
          type: array
          description: 多图输入（可选，image-to-image，最多 14 张）。
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 14
    DoubaoSeedream50LiteImageGenerationRequest:
      type: object
      additionalProperties: false
      required:
      - model
      - prompt
      example:
        model: doubao-seedream-5-0-lite-260128
        prompt: turn this reference into a cinematic poster
        images:
        - https://example.com/input.webp
        size: 3K
        output_format: png
        optimize_prompt_options:
          mode: standard
      properties:
        model:
          type: string
          enum:
          - doubao-seedream-5-0-lite-260128
          - seedream-5-0-260128
          description: Seedream 5.0 图片模型名称，支持 `doubao-seedream-5-0-lite-260128` 与 `seedream-5-0-260128`。
        prompt:
          type: string
          minLength: 1
          maxLength: 600
          description: 提示词（必填）。
        size:
          type: string
          description: 输出尺寸（可选）。支持 `2K`、`3K` 以及上游允许的自定义像素尺寸。
          enum:
          - 2K
          - 3K
          - 2048x2048
          - 2304x1728
          - 1728x2304
          - 2848x1600
          - 1600x2848
          - 2496x1664
          - 1664x2496
          - 3136x1344
          - 3072x3072
          - 3456x2592
          - 2592x3456
          - 4096x2304
          - 2304x4096
          - 2496x3744
          - 3744x2496
          - 4704x2016
        image:
          type: string
          format: uri
          description: 单图输入（可选，image-to-image）。
        images:
          type: array
          description: 多图输入（可选，image-to-image，最多 14 张）。
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 14
        output_format:
          type: string
          enum:
          - jpeg
          - png
          description: 输出格式（可选）。
        optimize_prompt_options:
          type: object
          additionalProperties: false
          description: 提示词优化配置（可选）。
          properties:
            mode:
              type: string
              enum:
              - standard
              description: 当前模型仅支持 `standard`。
    WanImageGenerationRequest:
      type: object
      description: Wan 图片生成请求。真实请求路径为 `POST /v1/images/generations`，按 `model` 分发到 Wan2.6 或 Wan2.7 的具体请求体。
      oneOf:
      - $ref: '#/components/schemas/Wan26T2IImageGenerationRequest'
      - $ref: '#/components/schemas/Wan26I2IImageGenerationRequest'
      - $ref: '#/components/schemas/Wan27ImageGenerationRequest'
      discriminator:
        propertyName: model
        mapping:
          wan2.6-t2i: '#/components/schemas/Wan26T2IImageGenerationRequest'
          wan2.6-image: '#/components/schemas/Wan26I2IImageGenerationRequest'
          wan2.7-image: '#/components/schemas/Wan27ImageGenerationRequest'
          wan2.7-image-pro: '#/components/schemas/Wan27ImageGenerationRequest'
    Wan26T2IImageGenerationRequest:
      type: object
      additionalProperties: false
      required:
      - model
      - prompt
      description: Wan2.6 文生图请求体。
      example:
        model: wan2.6-t2i
        prompt: 一个美丽的日落海景
        size: 1280*1280
        prompt_extend: false
        seed: 12345
      properties:
        model:
          type: string
          enum:
          - wan2.6-t2i
          description: Wan2.6 文生图模型名称。
        prompt:
          type: string
          minLength: 1
          maxLength: 2000
          description: 提示词（必填）。
        size:
          $ref: '#/components/schemas/Wan26ImageSize'
        negative_prompt:
          type: string
          maxLength: 500
          description: 反向提示词（可选）。
        prompt_extend:
          type: boolean
          default: false
          description: 是否启用提示词扩写（可选）。
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
          description: 随机种子（可选）。
    Wan26I2IImageGenerationRequest:
      type: object
      additionalProperties: false
      required:
      - model
      - prompt
      description: Wan2.6 图生图请求体；至少提供 `image` 或 `images`。
      example:
        model: wan2.6-image
        prompt: 将参考图改成电影海报风格
        images:
        - https://example.com/reference.png
        size: 1280*720
      anyOf:
      - required:
        - image
      - required:
        - images
      properties:
        model:
          type: string
          enum:
          - wan2.6-image
          description: Wan2.6 图生图模型名称。
        prompt:
          type: string
          minLength: 1
          maxLength: 2000
          description: 提示词（必填）。
        image:
          type: string
          format: uri
          description: 单张输入图片 URL（可选，与 `images` 二选一）。
        images:
          type: array
          description: 输入图片数组（可选；至少 1 张）。
          items:
            type: string
            format: uri
          minItems: 1
        size:
          $ref: '#/components/schemas/Wan26ImageSize'
        negative_prompt:
          type: string
          maxLength: 500
          description: 反向提示词（可选）。
        prompt_extend:
          type: boolean
          default: false
          description: 是否启用提示词扩写（可选）。
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
          description: 随机种子（可选）。
    Wan26ImageSize:
      type: string
      description: 输出图片尺寸。当前支持 `1280*1280`、`800*1200`、`1200*800`、`960*1280`、`1280*960`、`720*1280`、`1280*720`、`1344*576`。
      default: 1280*1280
      enum:
      - 1280*1280
      - 800*1200
      - 1200*800
      - 960*1280
      - 1280*960
      - 720*1280
      - 1280*720
      - 1344*576
    Wan27ImageGenerationRequest:
      type: object
      additionalProperties: false
      required:
      - model
      - prompt
      example:
        model: wan2.7-image-pro
        prompt: 电影感插画
        images:
        - https://cdn.example.com/reference.png
        size: 1024*1024
        bbox_list:
        - - - 0
            - 0
            - 12
            - 12
        color_palette:
        - hex: '#C2D1E6'
          ratio: 50.00%
        - hex: '#F4D06F'
          ratio: 30.00%
        - hex: '#7FA99B'
          ratio: 20.00%
        enable_sequential: false
        seed: 12345
      properties:
        model:
          type: string
          enum:
          - wan2.7-image
          - wan2.7-image-pro
          description: Wan 图片模型名称。
        prompt:
          type: string
          minLength: 1
          description: 提示词（必填）。
        image:
          type: string
          format: uri
          description: 单图输入（可选，image-to-image）。
        images:
          type: array
          description: 多图输入（可选，image-to-image，最多 14 张）。
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 14
        size:
          description: 输出尺寸（可选）。`wan2.7-image` 支持 `1K`、`2K` 或自定义 `宽*高`；总像素需在 `768*768` 到 `2048*2048` 之间，宽高比范围 `1:8` 到 `8:1`。`wan2.7-image-pro`
            支持 `1K`、`2K`、`4K` 或自定义 `宽*高`；仅文生图（无图片输入、未启用组图）支持 `4K` 与最高到 `4096*4096` 的自定义尺寸，其余场景仅支持 `2K` 与 `2048*2048`。
          oneOf:
          - type: string
            enum:
            - 1K
            - 2K
            - 4K
          - type: string
            description: 自定义 `宽*高` 字符串，例如 `2048*2048`、`4096*4096`。
            pattern: ^[0-9]+\*[0-9]+$
            example: 1024*1024
        enable_sequential:
          type: boolean
          description: 是否启用 sequential 组图模式（可选）。启用时不要同时传 `thinking_mode` 或 `color_palette`。
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
          description: 随机种子（可选）。
        thinking_mode:
          type: boolean
          description: 思考模式开关（可选）。与 `enable_sequential=true` 互斥；同时提交会返回参数错误。
          x-playground-omit-when:
          - path: enable_sequential
            equals: true
        bbox_list:
          allOf:
          - $ref: '#/components/schemas/Wan27BBoxList'
          description: 边界框列表（可选）；列表长度需与输入图片数量一致。单张图片最多支持 2 个边界框，坐标格式为 `[x1, y1, x2, y2]`；仅适用于带输入图片的 image-to-image 场景。
        color_palette:
          allOf:
          - $ref: '#/components/schemas/Wan27ColorPalette'
          description: 调色板列表（可选）。数组中的对象需包含 `hex` 与 `ratio` 字段，颜色数需为 3-10 个，推荐 8 个；仅在关闭组图模式时可用，不能与 `enable_sequential=true`
            同时提交。
          x-playground-omit-when:
          - path: enable_sequential
            equals: true
    PrunaImageGenerationRequest:
      type: object
      description: PrunaAI 图片生成请求。真实请求路径为 `POST /v1/images/generations`，按 exact `model` 分发到 `prunaai/p-image` 或 `prunaai/p-image-edit`
        的具体请求体。
      oneOf:
      - $ref: '#/components/schemas/PrunaPImageGenerationRequest'
      - $ref: '#/components/schemas/PrunaPImageEditGenerationRequest'
      discriminator:
        propertyName: model
        mapping:
          prunaai/p-image: '#/components/schemas/PrunaPImageGenerationRequest'
          prunaai/p-image-edit: '#/components/schemas/PrunaPImageEditGenerationRequest'
    PrunaPImageGenerationRequest:
      type: object
      additionalProperties: false
      required:
      - model
      - prompt
      example:
        model: prunaai/p-image
        prompt: a clean studio product photo of a ceramic cup
        size: 1024x1024
        aspect_ratio: '1:1'
        seed: 0
      properties:
        model:
          type: string
          enum:
          - prunaai/p-image
          description: PrunaAI 文生图模型名称。
        prompt:
          type: string
          minLength: 1
          description: 提示词（必填）。
        size:
          type: string
          description: OpenAI 兼容尺寸字符串。可传常见尺寸或自定义尺寸；自定义尺寸可配合 `width` / `height` 使用。
        aspect_ratio:
          type: string
          description: 输出图片宽高比。传 `custom` 时可配合 `width` / `height` 使用。
          enum:
          - '1:1'
          - '16:9'
          - '9:16'
          - '3:2'
          - '2:3'
          - '3:4'
          - '4:3'
          - custom
        width:
          type: integer
          minimum: 256
          maximum: 1440
          description: 自定义宽度，仅在 `aspect_ratio=custom` 时使用，范围会被限制到 256~1440。
        height:
          type: integer
          minimum: 256
          maximum: 1440
          description: 自定义高度，仅在 `aspect_ratio=custom` 时使用，范围会被限制到 256~1440。
        seed:
          type: integer
          description: 随机种子（可选）。
        disable_safety_checker:
          type: boolean
          description: 是否关闭安全检查（可选）。
    PrunaPImageEditGenerationRequest:
      type: object
      additionalProperties: false
      required:
      - model
      - prompt
      anyOf:
      - required:
        - image
      - required:
        - images
      - required:
        - extra_fields
      example:
        model: prunaai/p-image-edit
        prompt: edit this image into a clean product-style composition
        image: https://example.com/source.png
        extra_fields:
          input:
            images:
            - https://example.com/source.png
            aspect_ratio: '1:1'
            turbo: false
            seed: 0
      properties:
        model:
          type: string
          enum:
          - prunaai/p-image-edit
          description: PrunaAI 图片编辑模型名称。
        prompt:
          type: string
          description: 提示词（必填）。
        image:
          type: string
          format: uri
          description: 单张输入图片 URL。
        images:
          type: array
          description: 输入图片 URL 数组。
          items:
            type: string
            format: uri
          minItems: 1
        extra_fields:
          type: object
          additionalProperties: true
          description: 扩展参数对象，可包含 `input.images`、`aspect_ratio`、`turbo`、`seed`、`disable_safety_checker` 等参数。
        aspect_ratio:
          type: string
          description: PrunaAI 图片编辑宽高比。
          enum:
          - '1:1'
          - '16:9'
          - '9:16'
          - '3:2'
          - '2:3'
          - '3:4'
          - '4:3'
        turbo:
          type: boolean
          description: 是否启用 turbo 模式（可选）。
        seed:
          type: integer
          description: 随机种子（可选）。
        disable_safety_checker:
          type: boolean
          description: 是否关闭安全检查（可选）。
    Wan27BBoxCoords:
      type: array
      description: 单个边界框坐标，格式为 `[x1, y1, x2, y2]`。
      minItems: 4
      maxItems: 4
      items:
        type: integer
    Wan27BBoxPerImage:
      type: array
      description: 单张输入图片对应的边界框列表，最多 2 个框。
      maxItems: 2
      items:
        $ref: '#/components/schemas/Wan27BBoxCoords'
    Wan27BBoxList:
      type: array
      description: 边界框列表。列表长度需与输入图片数量一致。
      maxItems: 9
      items:
        $ref: '#/components/schemas/Wan27BBoxPerImage'
    Wan27ColorPaletteItem:
      type: object
      additionalProperties: false
      required:
      - hex
      - ratio
      properties:
        hex:
          type: string
          description: 十六进制（HEX）格式的色值。
          pattern: ^#[0-9A-Fa-f]{6}$
        ratio:
          type: string
          description: 颜色所占百分比，所有 `ratio` 之和必须为 `100.00%`。
          pattern: ^([0-9]|[1-9][0-9]|100)\.[0-9]{2}%$
    Wan27ColorPalette:
      type: array
      description: 调色板列表。
      minItems: 3
      maxItems: 10
      items:
        $ref: '#/components/schemas/Wan27ColorPaletteItem'
    ImaImageGenerationResponse:
      type: object
      additionalProperties: true
      description: OpenAI Images 兼容响应（不同上游可能返回 url 或 b64_json）。
      properties:
        created:
          type: integer
          format: int64
          description: 响应创建时间（Unix 秒）。
        data:
          type: array
          description: 生成结果列表。
          items:
            type: object
            additionalProperties: true
            properties:
              url:
                type: string
                format: uri
                description: 图片 URL（当上游返回链接时）。建议接收后立即下载并保存，默认有效期约 30 天。
              b64_json:
                type: string
                description: Base64 编码图片（当上游返回二进制时）。
              revised_prompt:
                type: string
                description: 上游修订后的提示词（若有）。
    ImaImageCreateTaskResponse:
      type: object
      additionalProperties: true
      description: 图片异步任务提交响应。
      properties:
        id:
          type: string
          description: 公开任务 ID。
        task_id:
          type: string
          description: 与 `id` 相同。
        object:
          type: string
          example: image
        model:
          type: string
        status:
          type: string
          description: 初始状态（如 `queued` / `in_progress`）。
        progress:
          type: integer
          minimum: 0
          maximum: 100
        amount_usd:
          type: number
          format: double
          minimum: 0
          description: 任务完成后的美元金额（如返回）。
        created_at:
          type: integer
          format: int64
    PrunaImageCreateTaskResponse:
      type: object
      additionalProperties: true
      description: PrunaAI 图片任务提交响应，包含任务 ID、状态和创建时间。
      properties:
        id:
          type: string
          description: 公开任务 ID。
        task_id:
          type: string
          description: 与 `id` 相同。
        object:
          type: string
          example: image
        model:
          type: string
        status:
          type: string
          description: 初始状态（如 `queued` / `in_progress`）。
        progress:
          type: integer
          minimum: 0
          maximum: 100
        created_at:
          type: integer
          format: int64
    ImaImageTaskFetchResponse:
      type: object
      additionalProperties: true
      properties:
        code:
          type: string
          example: success
        data:
          type: object
          additionalProperties: true
          properties:
            task_id:
              type: string
            status:
              type: string
              description: 任务状态（如 queued/processing/succeeded/failed）。
            format:
              type: string
              description: 输出格式（若可识别）。
            url:
              type: string
              description: 成功后返回结果链接。该链接为平台托管资源，建议接收后立即下载保存，约 30 天后失效。
            error:
              nullable: true
              oneOf:
              - type: object
                additionalProperties: true
              - type: string
            metadata:
              nullable: true
              oneOf:
              - type: object
                additionalProperties: true
              - type: string
              - type: 'null'
            amount_usd:
              type: number
              format: double
              minimum: 0
              description: 任务完成后的美元金额（如返回）。
            usage:
              type: object
              additionalProperties: true
              description: 用量信息（如返回）。
              properties:
                input_tokens:
                  type: integer
                  minimum: 0
                  description: 输入 token
                output_tokens:
                  type: integer
                  minimum: 0
                  description: 输出 token
                total_tokens:
                  type: integer
                  minimum: 0
                  description: 总 token
    ImaProCreateResponse:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
          description: 公开任务 ID。
        task_id:
          type: string
          description: 与 `id` 相同。
        object:
          type: string
          example: video
        model:
          type: string
        status:
          type: string
        progress:
          type: integer
          minimum: 0
          maximum: 100
        created_at:
          type: integer
          format: int64
    ImaProQueryResponse:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
          description: 公开任务 ID。
        task_id:
          type: string
          description: 与 `id` 相同。
        object:
          type: string
          example: video
        model:
          type: string
          description: 模型名称。
        status:
          type: string
          description: OpenAI 风格状态（如 `queued` / `in_progress` / `completed` / `failed`）。
        progress:
          type: integer
          minimum: 0
          maximum: 100
        created_at:
          type: integer
          format: int64
        completed_at:
          type: integer
          format: int64
        amount_usd:
          type: number
          format: double
          minimum: 0
          description: 实际扣费美元金额。仅在任务成功完成且扣费确认后返回；排队、处理中、失败或尚未完成扣费确认时不返回。
        metadata:
          type: object
          additionalProperties: true
          description: 元数据（通常包含 `url`）。若含 `url`，建议按 30 天 TTL 进行持久化归档。
        results:
          type: array
          description: 结果列表（成功时通常包含视频 URL）。
          items:
            type: object
            additionalProperties: true
            properties:
              url:
                type: string
                format: uri
                description: 视频结果地址。该地址为平台托管短期链接，建议接收后立即下载并保存，默认约 30 天后失效。
              size:
                type: integer
              content_type:
                type: string
        usage:
          type: object
          additionalProperties: true
          description: 上游用量信息（透传）。
          properties:
            prompt_tokens:
              type: integer
            completion_tokens:
              type: integer
            total_tokens:
              type: integer
        error:
          type: object
          nullable: true
          description: 任务失败时的错误对象。
          properties:
            code:
              type: string
              example: task_failed
            message:
              type: string
              example: 'video generation failed: internal error: 601300'
    ErrorResponse:
      type: object
      additionalProperties: true
      properties:
        error:
          oneOf:
          - type: string
          - type: object
            additionalProperties: true
    TaskErrorResponse:
      type: object
      additionalProperties: true
      description: '任务接口（创建/查询）错误返回。

        常见字段：

        - `code`：错误码（可能是业务码或 HTTP 字符串码）

        - `message`：错误说明

        - `data`：通常为 `null`

        常见错误示例：

        - `text_to_video requires one text content item`

        - `status_code=500, task_id is empty`

        - `the parameter video pixel count specified in the request must be less than or equal to 927408`

        - `暂不支持人像`

        '
      required:
      - code
      - message
      properties:
        code:
          oneOf:
          - type: string
          - type: integer
          description: 错误码（如 `invalid_request`、`missing_model`、`task_not_exist`、`500`）。
        message:
          type: string
          description: 错误描述。
        data:
          nullable: true
          description: 扩展数据；当前实现多为 `null`。
    MjSubmitResponse:
      type: object
      additionalProperties: true
      properties:
        code:
          type: integer
          description: 1=成功，其他=失败。
        result:
          type: string
          description: 任务 ID。
        description:
          type: string
          description: 描述信息。
    MjTaskFetchResponse:
      type: object
      additionalProperties: true
      properties:
        mj_id:
          type: string
          description: MJ 任务 ID。
        status:
          type: string
          enum:
          - ''
          - SUCCESS
          - FAILURE
          description: 任务状态。
        progress:
          type: string
          example: 100%
        imageUrl:
          type: string
          format: uri
          description: 首图地址（兼容字段）。平台托管短期链接，建议接收后立即下载保存，默认约 30 天后失效。
        urls:
          type: array
          description: 完整图片列表（推荐优先使用）。平台托管短期链接，建议接收后立即下载保存，默认约 30 天后失效。
          items:
            type: string
            format: uri
        action:
          type: string
          description: 任务动作类型（如 `IMAGINE`、`UPSCALE`）。
        failReason:
          type: string
          description: 失败原因（失败时可能出现）。
        buttons:
          type: array
          items:
            type: object
            additionalProperties: true
    ModelItem:
      type: object
      properties:
        id:
          type: string
          description: 模型标识
        object:
          type: string
          example: model
        created:
          type: integer
          description: 模型创建时间（Unix 秒，兼容字段）
        owned_by:
          type: string
          description: 上游供应商标识
        supported_endpoint_types:
          type: array
          description: 模型支持的端点类型
          items:
            type: string
        reasoning:
          type: boolean
          description: 模型是否支持 reasoning（仅根据网关配置返回）
    ModelsListResponse:
      type: object
      properties:
        object:
          type: string
          example: list
        success:
          type: boolean
          example: true
        data:
          type: array
          items:
            $ref: '#/components/schemas/ModelItem'
    ChatCompletionRequest:
      type: object
      required:
      - model
      - messages
      properties:
        model:
          type: string
          description: 模型名称
          enum:
          - gpt-4.1
          - gpt-4.1-mini
          - gpt-4.1-nano
          - gpt-4o
          - gpt-4o-mini
          - gpt-5
          - gpt-5-mini
          - gpt-5.1
          - MiniMax-Text-01
          - MiniMax-M1
          - MiniMax-M2
          - MiniMax-M2.1
          - MiniMax-M2.1-highspeed
          - MiniMax-M2.5
          - MiniMax-M2.5-highspeed
          - claude-sonnet-4-5-20250929
          - claude-sonnet-4-6
          - claude-haiku-4-5-20251001
          - claude-opus-4-5-20251101
          - claude-opus-4-6
          - claude-opus-4-7
          - kimi-for-coding
          - deepseek-v4-pro
          - deepseek-v4-flash
          - gpt-5.4-mini
          - seed-sc-260215
        messages:
          type: array
          items:
            type: object
            required:
            - role
            - content
            properties:
              role:
                type: string
                enum:
                - system
                - user
                - assistant
              content:
                type: string
        stream:
          type: boolean
          default: false
          description: 是否启用流式响应
        temperature:
          type: number
          minimum: 0
          maximum: 2
          default: 1
        max_tokens:
          type: integer
          description: 最大生成 token 数
        tools:
          type: array
          description: 函数工具定义（OpenAI 兼容）
          items:
            type: object
            required:
            - type
            - function
            properties:
              type:
                type: string
                enum:
                - function
              function:
                type: object
                required:
                - name
                - parameters
                properties:
                  name:
                    type: string
                  description:
                    type: string
                  parameters:
                    type: object
        tool_choice:
          description: 工具选择策略
          oneOf:
          - type: string
            enum:
            - none
            - auto
            - required
          - type: object
            properties:
              type:
                type: string
                enum:
                - function
              function:
                type: object
                properties:
                  name:
                    type: string
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          example: chat.completion
        model:
          type: string
        choices:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
              message:
                type: object
                properties:
                  role:
                    type: string
                  content:
                    type: string
                  tool_calls:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                          enum:
                          - function
                        function:
                          type: object
                          properties:
                            name:
                              type: string
                            arguments:
                              type: string
              finish_reason:
                type: string
        usage:
          type: object
          properties:
            prompt_tokens:
              type: integer
            completion_tokens:
              type: integer
            total_tokens:
              type: integer
    ResponsesRequest:
      type: object
      required:
      - model
      - input
      properties:
        model:
          type: string
          enum:
          - gpt-5.2
          - gpt-5.3-codex
          - gpt-5.4
          - gpt-5.5
        input:
          type: string
          description: 输入文本
        max_output_tokens:
          type: integer
          description: 最大输出 token 数
        temperature:
          type: number
          minimum: 0
          maximum: 2
        stream:
          type: boolean
          default: false
    ResponsesResponse:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          example: response
        model:
          type: string
        status:
          type: string
          example: completed
        output:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              role:
                type: string
              content:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                    text:
                      type: string
        usage:
          type: object
          properties:
            input_tokens:
              type: integer
            output_tokens:
              type: integer
            total_tokens:
              type: integer
    AnthropicMessagesRequest:
      type: object
      required:
      - model
      - anthropic_version
      - max_tokens
      - messages
      properties:
        model:
          type: string
          enum:
          - claude-sonnet-4-5-20250929
          - claude-sonnet-4-6
          - claude-haiku-4-5-20251001
          - claude-opus-4-5-20251101
          - claude-opus-4-6
          - claude-opus-4-7
          - glm-5.1
          - deepseek-v4-flash
          description: Anthropic Messages 模型名称。
        anthropic_version:
          type: string
          default: bedrock-2023-05-31
          enum:
          - bedrock-2023-05-31
          description: Anthropic Bedrock API 版本，固定为 `bedrock-2023-05-31`。
        max_tokens:
          type: integer
          default: 4096
          description: 最大输出 token 数
        messages:
          type: array
          items:
            type: object
            required:
            - role
            - content
            properties:
              role:
                type: string
                enum:
                - user
                - assistant
              content:
                type: string
        system:
          type: string
          description: 系统提示词
        temperature:
          type: number
          minimum: 0
          maximum: 1
          default: 1
        stream:
          type: boolean
          default: false
          description: 是否使用流式响应。Playground 固定发送非流式请求。
    AnthropicMessagesResponse:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          example: message
        role:
          type: string
          example: assistant
        model:
          type: string
        content:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              text:
                type: string
        stop_reason:
          type: string
        usage:
          type: object
          properties:
            input_tokens:
              type: integer
            output_tokens:
              type: integer
    EmbeddingRequest:
      type: object
      required:
      - model
      - input
      properties:
        model:
          type: string
          enum:
          - text-embedding-3-large
          - text-embedding-3-small
          description: Embeddings 模型名称。当前支持 `text-embedding-3-large` 与 `text-embedding-3-small`。
        input:
          oneOf:
          - type: string
          - type: array
            items:
              type: string
          description: 待编码的文本，可以是字符串或字符串数组。
        encoding_format:
          type: string
          enum:
          - float
          - base64
          default: float
          description: 返回向量的编码格式：float 浮点数组（默认）或 base64 紧凑字符串。
        dimensions:
          type: integer
          minimum: 1
          maximum: 3072
          description: 指定输出向量维度，常用于压缩存储或保持与下游索引一致。
        user:
          type: string
          description: 终端用户标识符，传给上游用于滥用风控（可选）。
    EmbeddingResponse:
      type: object
      properties:
        object:
          type: string
          example: list
        data:
          type: array
          items:
            type: object
            properties:
              object:
                type: string
                example: embedding
              index:
                type: integer
              embedding:
                type: array
                items:
                  type: number
                  format: float
        model:
          type: string
          example: text-embedding-3-large
        usage:
          type: object
          properties:
            prompt_tokens:
              type: integer
            total_tokens:
              type: integer
    MidjourneyImagineRequest:
      type: object
      required:
      - model
      properties:
        model:
          type: string
          enum:
          - mj_imagine
          - mj_blend
          description: Midjourney 操作类型；imagine 文生图 / blend 多图融合。
        prompt:
          type: string
          description: 文生图提示词，可附带 MJ 参数，例如 `--ar`、`--niji`、`--stylize`、`--sref`、`--sw`、`--p`、`--iw`、`--c`、`--w`。使用 `--iw`
            时，prompt 必须以图片 URL 开头。
        base64Array:
          type: array
          items:
            type: string
          description: blend 用：2~5 张图片的 data URL（image/png|jpeg, base64）。
        dimensions:
          type: string
          enum:
          - PORTRAIT
          - SQUARE
          - LANDSCAPE
          description: blend 输出宽高比。
        botType:
          type: string
          enum:
          - MID_JOURNEY
          - NIJI_JOURNEY
          default: MID_JOURNEY
          description: 渲染机器人；默认 MID_JOURNEY，可选 NIJI_JOURNEY。
        state:
          type: string
          description: 任意业务上下文，用于回调关联，不影响图片生成。
    MidjourneyChangeRequest:
      type: object
      required:
      - model
      - taskId
      - customId
      properties:
        model:
          type: string
          enum:
          - mj_upscale
          - mj_variation
          - mj_low_variation
          - mj_high_variation
          - mj_reroll
          - mj_zoom
          - mj_custom_zoom
          - mj_pan
          description: 二次操作类型；与父任务 customId 配对。
        taskId:
          type: string
          description: 父任务 ID（imagine 返回的 result）。
        customId:
          type: string
          description: 父任务返回的 `buttons[].customId`，必须严格匹配。
        prompt:
          type: string
          description: custom_zoom 等需要的额外提示词，其他操作可省略。
        state:
          type: string
          description: 业务上下文，回调原样返回。
    MidjourneyModalRequest:
      type: object
      required:
      - model
      - taskId
      - customId
      properties:
        model:
          type: string
          enum:
          - mj_remix
          description: Remix / 区域重绘操作。
        taskId:
          type: string
          description: 父任务 ID。
        customId:
          type: string
          description: RemixModal 按钮 customId。
        prompt:
          type: string
          description: Remix 重塑的新提示词。
        maskBase64:
          type: string
          description: 可选；区域重绘的 mask 图（base64 PNG）。
        state:
          type: string
          description: 业务上下文。
    MidjourneySubmitResponse:
      type: object
      properties:
        code:
          type: integer
          example: 1
          description: 1=已受理；其他值见 description 字段。
        description:
          type: string
          example: Submit success
        result:
          type: string
          example: '1751234567890'
          description: 任务 ID，后续用于轮询。
        properties:
          type: object
          additionalProperties: true
    MidjourneyTaskResponse:
      type: object
      properties:
        id:
          type: string
          example: '1751234567890'
        action:
          type: string
          example: IMAGINE
        status:
          type: string
          enum:
          - NOT_START
          - SUBMITTED
          - MODAL
          - IN_PROGRESS
          - FAILURE
          - SUCCESS
          - CANCEL
          description: 任务状态机：NOT_START → SUBMITTED → IN_PROGRESS → SUCCESS|FAILURE|CANCEL。
        progress:
          type: string
          example: 100%
        prompt:
          type: string
        promptEn:
          type: string
        imageUrl:
          type: string
          format: uri
          description: 结果图 URL（成功后返回，短期链接，请尽快下载）。
        buttons:
          type: array
          items:
            type: object
            properties:
              customId:
                type: string
              label:
                type: string
              emoji:
                type: string
              style:
                type: integer
        properties:
          type: object
          additionalProperties: true
    ImageGenerationRequest:
      type: object
      required:
      - model
      - prompt
      properties:
        model:
          type: string
          enum:
          - seedream-5-0-260128
          - doubao-seedream-5-0-lite-260128
        prompt:
          type: string
          description: 图像描述
        size:
          type: string
          description: 图像尺寸（seedream 需 ≥ 3686400 像素，如 1920x1920）
          default: 1920x1920
    ImageGenerationResponse:
      type: object
      properties:
        created:
          type: integer
        data:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
              b64_json:
                type: string
    ViduVideoRequest:
      type: object
      title: Vidu 视频（viduq1 / viduq2 / viduq3）
      required:
      - model
      properties:
        model:
          type: string
          enum:
          - viduq1
          - viduq2
          - viduq2-pro
          - viduq2-turbo
          - viduq3-pro
          - viduq3-turbo
          description: 'Vidu 视频模型。

            - `viduq1`：固定 1080P/5s

            - `viduq2`：文生视频

            - `viduq2-pro`：仅图生视频

            - `viduq2-turbo`：仅图生视频

            - `viduq3-pro`：文生/图生视频，按秒计费

            - `viduq3-turbo`：文生/图生视频，按秒计费'
        prompt:
          type: string
          description: 视频描述提示词。文生视频时必填，图生视频时可选。
        images:
          type: array
          items:
            type: string
          description: '**重要：图生视频的参考图片 URL 数组。请自行保证输入 URL 在提交时可访问。**


            - 单图：参考图生视频

            - 双图：首尾帧生视频（第一张=首帧，第二张=尾帧）

            - `viduq2-pro`、`viduq2-turbo` 仅支持图生视频（必须传 images）'
        duration:
          type: integer
          default: 5
          description: '视频时长（秒）。

            - `viduq1`：固定 5s

            - `viduq2` 系列：支持 4~8s

            - `viduq3` 系列：支持 1~16s'
        size:
          type: string
          default: '16:9'
          description: 宽高比，如 `16:9`（默认）、`9:16`、`1:1`。
        metadata:
          type: object
          description: 扩展参数。
          properties:
            resolution:
              type: string
              enum:
              - 540p
              - 720p
              - 1080p
              default: 1080p
              description: 分辨率，默认 `1080p`。
    PixverseVideoCreateRequest:
      type: object
      title: Pixverse 视频请求
      required:
      - model
      - prompt
      additionalProperties: false
      description: Pixverse 视频生成请求体。适用于 `pixverse-c1` 与 `pixverse-v6`。
      properties:
        model:
          type: string
          enum:
          - pixverse-c1
          - pixverse-v6
          description: Pixverse 视频模型名称。
        prompt:
          type: string
          minLength: 1
          description: 视频提示词（必填）。
        duration:
          type: integer
          default: 5
          description: 视频时长（秒），默认 5。
        size:
          type: string
          default: '16:9'
          enum:
          - '16:9'
          - '9:16'
          - '1:1'
          description: 输出宽高比，默认 `16:9`。
        quality:
          type: string
          default: 720p
          enum:
          - 360p
          - 540p
          - 720p
          - 1080p
          description: 输出分辨率档位。
        metadata:
          type: object
          additionalProperties: true
          description: Pixverse 高级参数。
          properties:
            img_id:
              type: integer
              description: Pixverse 图片 ID；传入后按图生视频提交。
            audio:
              type: boolean
              description: 是否生成音频。
            generate_audio_switch:
              type: boolean
              description: 是否生成音频的别名字段。
            negative_prompt:
              type: string
              description: 反向提示词。
    VeoVideoCreateRequest:
      type: object
      title: Veo 视频请求
      required:
      - model
      - prompt
      additionalProperties: false
      description: Veo 视频生成请求体。适用于 `veo-3.0-generate-001` 与 `veo-3.1-fast-generate-001`。
      properties:
        model:
          type: string
          enum:
          - veo-3.0-generate-001
          - veo-3.1-fast-generate-001
          description: Veo 视频模型名称。
        prompt:
          type: string
          minLength: 1
          description: 视频提示词（必填）。
        image:
          type: string
          description: 可选首帧图片 URL。
        images:
          type: array
          minItems: 1
          maxItems: 3
          description: 图片 URL 数组。`veo-3.1-fast-generate-001` 使用该字段传 1~3 张参考图。两张图默认按参考图生视频处理；设置 `metadata.role_mode=frame`
            时，两张图按首尾帧处理。Veo 3.1 不使用 `reference_image_urls`。
          items:
            type: string
        duration:
          type: integer
          enum:
          - 4
          - 8
          description: 视频时长（秒），仅支持 4 或 8。
        seconds:
          type: string
          enum:
          - '4'
          - '8'
          description: 视频时长的字符串别名，仅支持 `"4"` 或 `"8"`。
        durationSeconds:
          type: integer
          enum:
          - 4
          - 8
          description: 视频时长字段，仅支持 4 或 8。
        resolution:
          type: string
          enum:
          - 720p
          - 1080p
          - 4k
          description: 输出分辨率。Veo 3.0 支持 720p/1080p；Veo 3.1 Fast 额外支持 4k。
        aspect_ratio:
          type: string
          enum:
          - '16:9'
          - '9:16'
          description: 输出宽高比。
        aspectRatio:
          type: string
          enum:
          - '16:9'
          - '9:16'
          description: 输出宽高比字段。
        size:
          type: string
          description: 可选尺寸字符串，可用于推导分辨率或宽高比。
        metadata:
          type: object
          additionalProperties: false
          description: Veo 高级参数。
          properties:
            durationSeconds:
              type: integer
              enum:
              - 4
              - 8
              description: 视频时长字段，仅支持 4 或 8。
            resolution:
              type: string
              enum:
              - 720p
              - 1080p
              - 4k
              description: 输出分辨率。
            aspectRatio:
              type: string
              enum:
              - '16:9'
              - '9:16'
              description: 输出宽高比。
            aspect_ratio:
              type: string
              enum:
              - '16:9'
              - '9:16'
              description: 输出宽高比别名。
            negativePrompt:
              type: string
              description: 反向提示词。
            personGeneration:
              type: string
              enum:
              - allow_all
              - allow_adult
              - dont_allow
              description: 人物生成策略。可选值：`allow_all`、`allow_adult`、`dont_allow`。
            storageUri:
              type: string
              description: 存储 URI。
            compressionQuality:
              type: string
              enum:
              - optimized
              - lossless
              description: 压缩质量。可选值：`optimized`、`lossless`。
            resizeMode:
              type: string
              description: 缩放模式。
            seed:
              type: integer
              description: 随机种子。
            role_mode:
              type: string
              enum:
              - reference
              - frame
              description: Veo 3.1 图片角色模式。`reference` 表示 `images` 按参考图处理；`frame` 表示两张图按首尾帧处理。
    KlingVideoRequest:
      type: object
      title: Kling 旧版视频（v1 / v1.6 / v2.x / o1）
      required:
      - model
      properties:
        model:
          type: string
          enum:
          - kling-v1
          - kling-v1-6
          - kling-v2-master
          - kling-v2-1-master
          - kling-v2-5-turbo
          - kling-v2-6
          - kling-video-o1
          description: Kling 视频模型名称。
        prompt:
          type: string
          description: 视频描述提示词。文生视频时必填。
        negative_prompt:
          type: string
          description: 反向提示词（可选），描述不希望出现的内容。
        image:
          type: string
          description: 参考图片 URL（图生视频时必填）。请自行保证输入 URL 在提交时可访问，且图片宽高与像素合法；否则上游可能返回 `Image pixel is invalid`。
        image_tail:
          type: string
          description: 尾帧图片 URL（首尾帧模式，可选）。请自行保证输入 URL 在提交时可访问，且图片宽高与像素合法；否则上游可能返回 `Image pixel is invalid`。
        mode:
          type: string
          enum:
          - std
          - pro
          default: std
          description: 品质模式。`std`（标准，默认）或 `pro`（高品质）。大师版模型无此区分。
        duration:
          type: integer
          enum:
          - 5
          - 10
          default: 5
          description: 视频时长（秒），支持 5 或 10，默认 5。
        aspect_ratio:
          type: string
          enum:
          - '1:1'
          - '16:9'
          - '9:16'
          default: '1:1'
          description: 宽高比，默认 `1:1`。
        cfg_scale:
          type: number
          default: 0.5
          description: 生成自由度，0~1，默认 0.5。值越小越自由，越大越贴合提示词。
        camera_control:
          type: object
          description: 镜头控制参数（可选）。
          properties:
            type:
              type: string
              description: 控制类型。
            config:
              type: object
              description: 镜头参数（horizontal, vertical, pan, tilt, roll, zoom）。
    KlingText2VideoRequest:
      type: object
      description: Kling 文生视频请求参数。使用 `model` 指定 Kling 视频模型。
      required:
      - model
      - prompt
      properties:
        model:
          type: string
          enum:
          - kling-v1
          - kling-v1-6
          - kling-v2-master
          - kling-v2-1-master
          - kling-v2-5-turbo
          - kling-v2-6
          - kling-video-o1
          description: Kling 视频模型名称。
        prompt:
          type: string
          description: 视频描述提示词。
        negative_prompt:
          type: string
          description: 反向提示词（可选），描述不希望出现的内容。
        mode:
          type: string
          enum:
          - std
          - pro
          default: std
          description: 品质模式。`std`（标准，默认）或 `pro`（高品质）。大师版模型无此区分。
        duration:
          type: integer
          enum:
          - 5
          - 10
          default: 5
          description: 视频时长（秒），支持 5 或 10，默认 5。
        aspect_ratio:
          type: string
          enum:
          - '1:1'
          - '16:9'
          - '9:16'
          default: '1:1'
          description: 宽高比，默认 `1:1`。
        cfg_scale:
          type: number
          default: 0.5
          description: 生成自由度，0~1，默认 0.5。值越小越自由，越大越贴合提示词。
        camera_control:
          type: object
          description: 镜头控制参数（可选）。
          properties:
            type:
              type: string
              description: 控制类型。
            config:
              type: object
              description: 镜头参数（horizontal, vertical, pan, tilt, roll, zoom）。
    KlingImage2VideoRequest:
      type: object
      description: Kling 图生视频请求参数。使用 `model` 指定 Kling 视频模型。
      required:
      - model
      - image
      properties:
        model:
          type: string
          enum:
          - kling-v1
          - kling-v1-6
          - kling-v2-master
          - kling-v2-1-master
          - kling-v2-5-turbo
          - kling-v2-6
          - kling-video-o1
          description: Kling 视频模型名称。
        image:
          type: string
          description: 参考图片 URL（图生视频必填）。请自行保证输入 URL 在提交时可访问，且图片宽高与像素合法；否则上游可能返回 `Image pixel is invalid`。
        image_tail:
          type: string
          description: 尾帧图片 URL（首尾帧模式，可选）。请自行保证输入 URL 在提交时可访问，且图片宽高与像素合法；否则上游可能返回 `Image pixel is invalid`。
        prompt:
          type: string
          description: 视频描述提示词。图生视频时可选。
        negative_prompt:
          type: string
          description: 反向提示词（可选），描述不希望出现的内容。
        mode:
          type: string
          enum:
          - std
          - pro
          default: std
          description: 品质模式。`std`（标准，默认）或 `pro`（高品质）。大师版模型无此区分。
        duration:
          type: integer
          enum:
          - 5
          - 10
          default: 5
          description: 视频时长（秒），支持 5 或 10，默认 5。
        aspect_ratio:
          type: string
          enum:
          - '1:1'
          - '16:9'
          - '9:16'
          default: '1:1'
          description: 宽高比，默认 `1:1`。
        cfg_scale:
          type: number
          default: 0.5
          description: 生成自由度，0~1，默认 0.5。值越小越自由，越大越贴合提示词。
        camera_control:
          type: object
          description: 镜头控制参数（可选）。
          properties:
            type:
              type: string
              description: 控制类型。
            config:
              type: object
              description: 镜头参数（horizontal, vertical, pan, tilt, roll, zoom）。
    KlingUnifiedVideoRequest:
      type: object
      description: Kling 通用视频端点请求参数，适用于 `POST /v1/video/generations`，同一 JSON 请求体也兼容 `POST /v1/videos`。
      required:
      - model
      properties:
        model:
          type: string
          enum:
          - kling-v1
          - kling-v1-6
          - kling-v2-master
          - kling-v2-1-master
          - kling-v2-5-turbo
          - kling-v2-6
          - kling-video-o1
          description: Kling 视频模型名称。
        prompt:
          type: string
          description: 视频描述提示词。文生视频时必填；图生视频时可选。
        image:
          type: string
          description: 图生视频参考图片 URL。单图图生视频推荐使用该字段；请自行保证输入 URL 在提交时可访问，且图片宽高与像素合法；否则上游可能返回 `Image pixel is invalid`。
        images:
          type: array
          items:
            type: string
          description: 图生视频参考图片 URL 数组。需要多图输入时使用；Kling 首尾帧更推荐将尾帧放入 `metadata.image_tail`。请自行保证输入 URL 在提交时可访问，且每张图片宽高与像素合法；否则上游可能返回
            `Image pixel is invalid`。
        duration:
          type: integer
          enum:
          - 5
          - 10
          default: 5
          description: 视频时长（秒）。
        size:
          type: string
          enum:
          - '1:1'
          - '16:9'
          - '9:16'
          default: '1:1'
          description: 宽高比。通用端点会映射为 Kling 的 `aspect_ratio`。
        metadata:
          type: object
          description: Kling 供应商参数。
          properties:
            mode:
              type: string
              enum:
              - std
              - pro
              default: std
              description: 品质模式。`std`（标准，默认）或 `pro`（高品质）。
            image_tail:
              type: string
              description: 尾帧图片 URL（首尾帧模式）。请自行保证输入 URL 在提交时可访问，且图片宽高与像素合法；否则上游可能返回 `Image pixel is invalid`。
            negative_prompt:
              type: string
              description: 反向提示词。
            cfg_scale:
              type: number
              default: 0.5
              description: 生成自由度，0~1，默认 0.5。
            camera_control:
              type: object
              description: 镜头控制参数。
    MiniMaxVideoGenerationRequest:
      type: object
      required:
      - model
      additionalProperties: false
      properties:
        model:
          type: string
          enum:
          - MiniMax-Hailuo-02
          - MiniMax-Hailuo-2.3
          - MiniMax-Hailuo-2.3-Fast
          description: MiniMax 视频模型（仅限 MiniMax）。
        prompt:
          type: string
          description: 视频描述
        duration:
          type: integer
          enum:
          - 6
          - 10
          default: 6
          description: 视频时长（秒），当前仅支持 6 或 10。
        size:
          type: string
          enum:
          - 512p
          - 768p
          - 1080p
          default: 768p
          description: 分辨率（按模型能力校验）。
        metadata:
          type: object
          description: 'MiniMax 供应商参数。

            - 图生视频：`{"first_frame_image":"URL"}`

            '
          properties:
            first_frame_image:
              type: string
              description: Hailuo 图生视频首帧图片 URL（`MiniMax-Hailuo-2.3-Fast` 必填）。请自行保证输入 URL 在提交时可访问。
      allOf:
      - if:
          properties:
            model:
              const: MiniMax-Hailuo-2.3-Fast
        then:
          required:
          - metadata
          properties:
            size:
              type: string
              enum:
              - 768p
              - 1080p
            metadata:
              type: object
              required:
              - first_frame_image
      - if:
          properties:
            model:
              const: MiniMax-Hailuo-2.3-Fast
            size:
              const: 1080p
        then:
          properties:
            duration:
              type: integer
              enum:
              - 6
      - if:
          properties:
            model:
              const: MiniMax-Hailuo-2.3
        then:
          properties:
            size:
              type: string
              enum:
              - 768p
              - 1080p
      - if:
          properties:
            model:
              const: MiniMax-Hailuo-2.3
            size:
              const: 1080p
        then:
          properties:
            duration:
              type: integer
              enum:
              - 6
      - if:
          properties:
            model:
              const: MiniMax-Hailuo-02
        then:
          properties:
            size:
              type: string
              enum:
              - 512p
              - 768p
              - 1080p
      - if:
          properties:
            model:
              const: MiniMax-Hailuo-02
            size:
              const: 1080p
        then:
          properties:
            duration:
              type: integer
              enum:
              - 6
    VideoTaskResponse:
      type: object
      properties:
        id:
          type: string
        task_id:
          type: string
        object:
          type: string
          example: video
        model:
          type: string
        status:
          type: string
          enum:
          - ''
          - in_progress
          - completed
          - failed
          description: 空字符串表示已提交待处理
        progress:
          type: integer
          minimum: 0
          maximum: 100
        created_at:
          type: integer
        completed_at:
          type: integer
        metadata:
          type: object
          properties:
            url:
              type: string
              description: 视频下载链接（completed 时有值）。该链接为平台托管短期资源，建议接收后立即下载保存，默认约 30 天后失效。
    ConsumeCallbackEvent:
      type: object
      required:
      - request_id
      - user_id
      - username
      - token_id
      - token_name
      - sk
      - model_name
      - channel_id
      - billing_source
      - prompt_tokens
      - completion_tokens
      - total_tokens
      - quota
      - amount_usd
      - timestamp
      - event_phase
      properties:
        request_id:
          type: string
          description: '网关请求 ID（可用于与使用日志对账）。

            当调用方请求头携带 `X-Trace-Id` 时，此字段与 `X-Trace-Id` 保持一致。

            '
        user_id:
          type: integer
          description: 用户 ID（兼容字段，建议优先使用 username）
          deprecated: true
        username:
          type: string
          description: 用户名（推荐使用）
        token_id:
          type: integer
          description: Token ID（兼容字段，建议优先使用 sk）
          deprecated: true
        token_name:
          type: string
          description: Token 名称
        sk:
          type: string
          description: 调用本次请求的 SK（带 sk- 前缀）
        model_name:
          type: string
          description: 实际请求模型名
        channel_id:
          type: integer
          description: 实际命中的渠道 ID
        billing_source:
          type: string
          enum:
          - wallet
          - subscription
          description: 扣减来源。
        prompt_tokens:
          type: integer
          minimum: 0
        completion_tokens:
          type: integer
          minimum: 0
        total_tokens:
          type: integer
          minimum: 0
        quota:
          type: integer
          minimum: 0
          description: 本次事件的 quota 数值。
        amount_usd:
          type: number
          format: double
          minimum: 0
          description: 本次事件的美元金额。
        timestamp:
          type: integer
          format: int64
          description: 事件生成时间（Unix 秒）
        event_phase:
          type: string
          enum:
          - settle
          description: '事件阶段，当前仅发送 `settle`。

            '
    ConsumeCallbackAck:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: accepted
    MjSubmitRequest:
      type: object
      required:
      - prompt
      properties:
        prompt:
          type: string
          description: MJ 提示词（支持 --ar、--v 等参数）
    MjChangeRequest:
      type: object
      required:
      - action
      - taskId
      - index
      properties:
        action:
          type: string
          enum:
          - UPSCALE
          - VARIATION
          - REROLL
        taskId:
          type: string
          description: 原始任务 ID
        index:
          type: integer
          minimum: 1
          maximum: 4
          description: 图片序号（1-4）
    MjTaskResponse:
      type: object
      properties:
        mj_id:
          type: string
        status:
          type: string
          enum:
          - ''
          - SUCCESS
          - FAILURE
        progress:
          type: string
          example: 100%
        imageUrl:
          type: string
          description: 首图地址（兼容字段）。平台托管短期链接，建议接收后立即下载保存，默认约 30 天后失效。
        urls:
          type: array
          description: 完整图片列表（推荐读取）。平台托管短期链接，建议接收后立即下载保存，默认约 30 天后失效。
          items:
            type: string
        action:
          type: string
        failReason:
          type: string
        buttons:
          type: array
          items:
            type: object
    MiniMaxVideosCreateRequest:
      type: object
      title: MiniMax Hailuo 视频（OpenAI Videos）
      required:
      - model
      additionalProperties: false
      properties:
        model:
          type: string
          enum:
          - MiniMax-Hailuo-02
          - MiniMax-Hailuo-2.3
          - MiniMax-Hailuo-2.3-Fast
          description: MiniMax 视频模型（openai-videos 端点）。
        prompt:
          type: string
          minLength: 1
          description: 视频提示词。
        duration:
          type: integer
          enum:
          - 6
          - 10
          default: 6
          description: 视频时长（秒），当前仅支持 6 或 10。
        size:
          type: string
          enum:
          - 512p
          - 768p
          - 1080p
          description: 分辨率（按模型能力校验）。
        metadata:
          type: object
          additionalProperties: true
          properties:
            first_frame_image:
              type: string
              format: uri
              description: 图生视频首帧图 URL（必填）。请自行保证输入 URL 在提交时可访问。
      allOf:
      - if:
          properties:
            model:
              const: MiniMax-Hailuo-2.3-Fast
        then:
          required:
          - metadata
          properties:
            size:
              type: string
              enum:
              - 768p
              - 1080p
            metadata:
              type: object
              required:
              - first_frame_image
      - if:
          properties:
            model:
              const: MiniMax-Hailuo-2.3-Fast
            size:
              const: 1080p
        then:
          properties:
            duration:
              type: integer
              enum:
              - 6
      - if:
          properties:
            model:
              const: MiniMax-Hailuo-2.3
        then:
          properties:
            size:
              type: string
              enum:
              - 768p
              - 1080p
      - if:
          properties:
            model:
              const: MiniMax-Hailuo-2.3
            size:
              const: 1080p
        then:
          properties:
            duration:
              type: integer
              enum:
              - 6
      - if:
          properties:
            model:
              const: MiniMax-Hailuo-02
        then:
          properties:
            size:
              type: string
              enum:
              - 512p
              - 768p
              - 1080p
      - if:
          properties:
            model:
              const: MiniMax-Hailuo-02
            size:
              const: 1080p
        then:
          properties:
            duration:
              type: integer
              enum:
              - 6
