{
  "openapi": "3.0.3",
  "info": {
    "title": "MiniMax-H3 API — api.seedance.nz",
    "version": "2026-09-05",
    "description": "MiniMax V2 请求及任务协议，使用  生成视频。支持文生、首帧、尾帧、首尾帧和多模态参考。480P/768P/1080P；普通4–15秒，驱动音频4–60秒。480P、2:3/3:2、驱动音频与音频控制、视频起始偏移及关键帧与参考素材混合属于扩展。自适应选择最近固定比例，参考模式默认16:9；不提供2K、Context-IR、再生成、seed等采样控制或官方媒体计量。终态usage表示最终向用户收取的实际金额。回调仅承诺终态通知，取消须由上游确认。"
  },
  "servers": [
    {
      "url": "https://api.seedance.nz",
      "description": "主站；租户使用自己的API域名。"
    }
  ],
  "security": [
    {
      "ApiKey": []
    }
  ],
  "paths": {
    "/v2/video_generation": {
      "post": {
        "operationId": "createMiniMaxH3Task",
        "summary": "创建MiniMax-H3视频任务",
        "tags": [
          "MiniMax-H3"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRequest"
              },
              "example": {
                "model": "MiniMax-H3",
                "content": [
                  {
                    "type": "text",
                    "text": "航拍薄雾中的山谷，镜头平稳前进。"
                  }
                ],
                "resolution": "480P",
                "duration": 5,
                "ratio": "16:9"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "异步任务已接受；不代表视频已完成。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "408": {
            "description": "已尝试提交后的超时可能保留公共任务ID；请检查X-Task-Id并查询，避免重复生成。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Task-Id": {
                "description": "可选：已尝试提交且结果不确定时保留的公共任务ID。应查询此ID，避免再次提交。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "建议至少等待的秒数；存在恢复任务时为5。",
                "schema": {
                  "type": "string",
                  "example": "5"
                }
              }
            }
          },
          "409": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Task-Id": {
                "description": "可选：已尝试提交且结果不确定时保留的公共任务ID。应查询此ID，避免再次提交。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "建议至少等待的秒数；存在恢复任务时为5。",
                "schema": {
                  "type": "string",
                  "example": "5"
                }
              }
            }
          },
          "502": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Task-Id": {
                "description": "可选：已尝试提交且结果不确定时保留的公共任务ID。应查询此ID，避免再次提交。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "建议至少等待的秒数；存在恢复任务时为5。",
                "schema": {
                  "type": "string",
                  "example": "5"
                }
              }
            }
          },
          "503": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Task-Id": {
                "description": "可选：已尝试提交且结果不确定时保留的公共任务ID。应查询此ID，避免再次提交。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "建议至少等待的秒数；存在恢复任务时为5。",
                "schema": {
                  "type": "string",
                  "example": "5"
                }
              }
            }
          },
          "504": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Task-Id": {
                "description": "可选：已尝试提交且结果不确定时保留的公共任务ID。应查询此ID，避免再次提交。",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "建议至少等待的秒数；存在恢复任务时为5。",
                "schema": {
                  "type": "string",
                  "example": "5"
                }
              }
            }
          }
        },
        "callbacks": {
          "taskResult": {
            "{$request.body#/callback_url}": {
              "post": {
                "summary": "验证challenge或通知任务终态",
                "security": [],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Challenge"
                          },
                          {
                            "$ref": "#/components/schemas/TaskResponse"
                          }
                        ]
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "description": "challenge验证请返回同值JSON challenge；终态通知返回2xx。",
                    "content": {
                      "application/json": {
                        "schema": {
                          "$ref": "#/components/schemas/Challenge"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "创建异步视频任务。若实际提交后结果不确定，错误响应可带X-Task-Id/Retry-After:5，正文仍为V2错误。保存公共ID并查询，后台仅能恢复bridge按公共ID保存的记录；不保证RH任务ID已丢失时可找回。此时保留预扣，不自动重新提交。"
      }
    },
    "/v2/query/video_generation/{task_id}": {
      "get": {
        "operationId": "getMiniMaxH3Task",
        "summary": "查询单个任务",
        "tags": [
          "MiniMax-H3"
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "创建返回的任务ID；须属于当前账户和租户。"
          }
        ],
        "responses": {
          "200": {
            "description": "当前任务状态和结果。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/query/video_generation": {
      "get": {
        "operationId": "listMiniMaxH3Tasks",
        "summary": "查询最近7天的任务",
        "tags": [
          "MiniMax-H3"
        ],
        "parameters": [
          {
            "name": "page_num",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "maximum": 10000
            },
            "description": "页码"
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "description": "每页数量，本网关上限100"
          },
          {
            "name": "filter.status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "running",
                "succeeded",
                "failed",
                "cancelled"
              ]
            },
            "description": "任务状态"
          },
          {
            "name": "filter.task_ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "description": "重复查询参数传入多个任务ID",
            "style": "form",
            "explode": true
          },
          {
            "name": "filter.model",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "MiniMax-H3"
              ]
            },
            "description": "模型"
          },
          {
            "name": "filter.task_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "generation"
              ]
            },
            "description": "本模型仅generation"
          }
        ],
        "responses": {
          "200": {
            "description": "任务列表及总数。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskList"
                }
              }
            }
          },
          "400": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/video_generation/{task_id}": {
      "delete": {
        "operationId": "deleteMiniMaxH3Task",
        "summary": "删除终态记录或尝试取消排队任务",
        "description": "成功、失败及已取消记录可软删除，财务历史保留且不重复退款。删除已取消记录是本服务扩展。只有排队任务且上游确认取消时返回cancelled；未确认则保留任务及扣费状态。",
        "tags": [
          "MiniMax-H3"
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "创建返回的任务ID；须属于当前账户和租户。"
          }
        ],
        "responses": {
          "200": {
            "description": "操作成功。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteResponse"
                }
              }
            }
          },
          "400": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "请求失败；参见error.type、error.message和字符串http_code。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/upload": {
      "post": {
        "operationId": "uploadMiniMaxH3Media",
        "summary": "上传素材并获取临时URL（本站通用接口）",
        "tags": [
          "Media"
        ],
        "description": "multipart/form-data字段file，单文件不超过50 MB，临时URL约24小时有效。上传成功后仍须满足模型的素材约束。本接口使用通用上传响应，不是MiniMax V2文件API。",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "临时素材URL。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "file_type": {
                      "type": "string"
                    },
                    "size": {
                      "type": "integer"
                    },
                    "expires_in": {
                      "type": "integer",
                      "example": 86400
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "本站通用上传错误响应。"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key"
      }
    },
    "schemas": {
      "TextContent": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "text"
            ]
          },
          "text": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "type",
          "text"
        ],
        "additionalProperties": false
      },
      "ImageContent": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "image_url"
            ]
          },
          "image_url": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "minLength": 1,
                "description": "服务端可读取的媒体 URL；本机路径和 blob: URL 不支持。"
              }
            },
            "required": [
              "url"
            ],
            "additionalProperties": false
          },
          "role": {
            "type": "string",
            "enum": [
              "first_frame",
              "last_frame",
              "reference_image"
            ],
            "default": "first_frame",
            "description": "首帧、尾帧可单独或同时提供，每种最多1张。还可与参考图、音频、视频或驱动音频混用，各类上限独立计数，属于本服务扩展。"
          }
        },
        "required": [
          "type",
          "image_url"
        ],
        "additionalProperties": false
      },
      "VideoContent": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "video_url"
            ]
          },
          "video_url": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "minLength": 1,
                "description": "服务端可读取的HTTP(S)视频URL；每条参考视频以及偏移后的素材需为2–15秒（24FPS的48–360帧）。"
              }
            },
            "required": [
              "url"
            ],
            "additionalProperties": false
          },
          "role": {
            "type": "string",
            "enum": [
              "reference_video"
            ],
            "default": "reference_video"
          },
          "start_time_seconds": {
            "type": "number",
            "minimum": 0,
            "default": 0,
            "description": "参考视频的非负起始秒数，位于内容项顶层；按24FPS四舍五入换算为跳过帧数，例如2.5秒跳过60帧。"
          }
        },
        "required": [
          "type",
          "video_url"
        ],
        "additionalProperties": false
      },
      "AudioContent": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "audio_url"
            ]
          },
          "audio_url": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "minLength": 1,
                "description": "服务端可读取的媒体 URL；本机路径和 blob: URL 不支持。"
              }
            },
            "required": [
              "url"
            ],
            "additionalProperties": false
          },
          "role": {
            "type": "string",
            "enum": [
              "reference_audio",
              "drive_audio"
            ],
            "default": "reference_audio"
          }
        },
        "required": [
          "type",
          "audio_url"
        ],
        "additionalProperties": false
      },
      "AudioControl": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "native",
              "lock_source",
              "remix_source",
              "reference_only"
            ],
            "description": "有drive_audio时缺省lock_source，否则native。非native模式需要drive_audio。native也可附带驱动，但不锁定原音轨；是否作为参考由add_drive_as_reference决定。"
          },
          "denoise_strength": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "取值0–1，显式0会保留。调节remix_source的音轨重生成；lock_source有效值固定0；其他模式缺省0.35。"
          },
          "add_drive_as_reference": {
            "type": "boolean",
            "description": "显式false会保留。带drive_audio且非native时默认true，native默认false；reference_only省略为true，显式false报错。"
          }
        },
        "additionalProperties": false
      },
      "CreateResponse": {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string"
          }
        },
        "required": [
          "task_id"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "error"
            ]
          },
          "error": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "http_code": {
                "type": "string",
                "example": "400"
              }
            },
            "required": [
              "type",
              "message",
              "http_code"
            ]
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "error"
        ]
      },
      "Challenge": {
        "type": "object",
        "properties": {
          "challenge": {
            "type": "string"
          }
        },
        "required": [
          "challenge"
        ]
      },
      "DeleteResponse": {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string"
          },
          "action": {
            "type": "string",
            "enum": [
              "deleted",
              "cancelled"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "deleted",
              "cancelled"
            ]
          }
        },
        "required": [
          "task_id",
          "action",
          "status"
        ]
      },
      "CreateRequest": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "MiniMax-H3"
            ]
          },
          "content": {
            "type": "array",
            "minItems": 1,
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/TextContent"
                },
                {
                  "$ref": "#/components/schemas/ImageContent"
                },
                {
                  "$ref": "#/components/schemas/VideoContent"
                },
                {
                  "$ref": "#/components/schemas/AudioContent"
                }
              ]
            },
            "description": "至少一个非空text，拼接后最多10000字符。最多9张参考图、3条参考音频、3条参考视频，另加1条驱动音频；首/尾帧最多各1张。可同时组合这些类别，服务自动选择混合模式（扩展）。"
          },
          "resolution": {
            "type": "string",
            "enum": [
              "480P",
              "768P",
              "1080P",
              "480p",
              "768p",
              "1080p"
            ],
            "description": "480P 和1080P 是本服务扩展，不提供2K。1080P 保留原生32像素对齐，16:9输出1920×1088。"
          },
          "duration": {
            "type": "integer",
            "minimum": 4,
            "maximum": 60,
            "description": "普通请求4–15秒，含drive_audio时4–60秒。"
          },
          "ratio": {
            "type": "string",
            "enum": [
              "1:1",
              "2:3",
              "3:2",
              "3:4",
              "4:3",
              "9:16",
              "16:9",
              "21:9",
              "adaptive",
              "auto"
            ],
            "description": "纯文本必填固定比例。参考模式省略时为16:9，显式adaptive/auto不支持。关键帧省略或adaptive/auto时按首帧（仅有尾帧时按尾帧）选择最近的RH固定比例；也支持显式固定比例。与官方自适应行为有差异。"
          },
          "audio_control": {
            "$ref": "#/components/schemas/AudioControl"
          },
          "callback_url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://",
            "description": "公开HTTPS地址，仅443端口。先POST challenge，3秒内HTTP200回显JSON或纯文本。终态通知收到2xx视为送达；最多5次，失败等待1/2/4/8分钟，允许重复投递。"
          }
        },
        "required": [
          "model",
          "content",
          "resolution",
          "duration"
        ],
        "additionalProperties": false
      },
      "Task": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "model": {
            "type": "string",
            "enum": [
              "MiniMax-H3"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "created_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix秒"
          },
          "updated_at": {
            "type": "integer",
            "format": "int64",
            "description": "Unix秒"
          },
          "content": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "url"
            ]
          },
          "resolution": {
            "type": "string",
            "enum": [
              "480P",
              "768P",
              "1080P"
            ]
          },
          "duration": {
            "type": "integer",
            "description": "请求的计费输出秒数；工作流按24FPS、17n+5帧对齐，实际播放时长可能略长。"
          },
          "ratio": {
            "type": "string",
            "enum": [
              "1:1",
              "2:3",
              "3:2",
              "3:4",
              "4:3",
              "9:16",
              "16:9",
              "21:9",
              "adaptive",
              "auto"
            ],
            "description": "完成时为实际固定比例；尚未解析关键帧的任务可能仍为adaptive/auto。"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ]
          },
          "usage": {
            "$ref": "#/components/schemas/TaskChargeUsage"
          },
          "task_type": {
            "type": "string",
            "enum": [
              "generation"
            ]
          },
          "modality": {
            "type": "string",
            "enum": [
              "video"
            ]
          }
        },
        "required": [
          "id",
          "model",
          "status",
          "created_at",
          "updated_at",
          "resolution",
          "duration",
          "task_type",
          "modality"
        ],
        "description": "官方V2风格任务。仅在最终结算后返回usage；amount与用户实际扣费完全一致，不是预扣。失败或取消任务退款后amount为0。不暴露预扣额或上游成本字段。"
      },
      "TaskChargeUsage": {
        "type": "object",
        "description": "最终用户扣费。任务尚未最终结算时省略整个usage字段。",
        "properties": {
          "amount": {
            "type": "number",
            "format": "double",
            "description": "用户实际扣费金额；绝不是预扣金额。",
            "example": 0.75
          },
          "currency": {
            "type": "string",
            "description": "站点面向用户展示的结算币种。",
            "example": "CNY"
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "additionalProperties": false
      },
      "TaskResponse": {
        "type": "object",
        "properties": {
          "task": {
            "$ref": "#/components/schemas/Task"
          }
        },
        "required": [
          "task"
        ]
      },
      "TaskList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ]
      }
    }
  },
  "externalDocs": {
    "url": "https://api.seedance.nz/docs/minimax-h3-api.md",
    "description": "完整使用说明与兼容边界"
  },
  "x-pricing-cny-per-output-second": {
    "480P": 0.15,
    "768P": 0.3,
    "1080P": 0.45
  }
}
