{
  "openapi": "3.1.0",
  "info": {
    "title": "本站统一 API 接入文档",
    "version": "1.3.0",
    "description": "本站公开接口。GET /v1/models 仅返回模型广场当前展示且当前 API Key 有权限调用的公开 ID。视频、文本、图片按分类独立说明。使用本站域名和本站 Key。"
  },
  "servers": [
    {
      "url": "https://www.v6k.top",
      "description": "本站域名，不含 /v1；下列 paths 已包含 /v1。自部署时替换域名。"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Video",
      "description": "视频提交、查询和二进制下载"
    },
    {
      "name": "Text",
      "description": "聊天和 Responses"
    },
    {
      "name": "Images",
      "description": "图片生成和编辑"
    },
    {
      "name": "Models",
      "description": "模型广场公开模型 ID"
    },
    {
      "name": "Media",
      "description": "临时参考素材上传"
    }
  ],
  "paths": {
    "/v1/models": {
      "get": {
        "tags": [
          "Models"
        ],
        "operationId": "listModels",
        "summary": "查询当前令牌可用模型",
        "responses": {
          "200": {
            "description": "模型列表",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string"
                          },
                          "owned_by": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误、配置问题、额度不足或任务未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "密钥无效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "无权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "任务或路由不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "请求限流",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "服务暂不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "服务繁忙",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "请求超时",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/videos": {
      "post": {
        "tags": [
          "Video"
        ],
        "operationId": "createVideo",
        "summary": "创建视频任务",
        "description": "本站所有用户共用的 OpenAI 兼容视频入口。当前在线视频适配器共用客户端输入解析，接受 JSON、URL 编码表单和 multipart；素材类型、首帧能力、时长、分辨率和数量受所选模型限制。URL 必须无需登录即可直接访问。成功受理返回非空 id；超时或结果不明确时先查询任务，避免重复生成。 支持参考音频的模型可在 audios 中提交 MP3（audio/mpeg）公网直链；本地 MP3 先通过 POST /v1/media 上传，再使用返回的 url。本站上传素材保留 24 小时，大小、时长和数量仍须符合所选模型限制。 本地图片、视频、音频均可先通过 POST /v1/media 上传，再将每次返回的 url 分别放入 images、videos、audios，仅发送模型支持的素材类型。ratio/aspect_ratio 是宽高比（如 9:16）；resolution 是分辨率标记（如 720p）；size 是像素尺寸（如 720x1280），不能混填。所有参数范围以模型广场为准，示例秒数不是固定限制。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VideoRequest"
              },
              "examples": {
                "unified": {
                  "summary": "本站统一视频格式；ID 和时长以模型广场为准",
                  "value": {
                    "model": "YOUR_VIDEO_MODEL_ID",
                    "prompt": "A cat in a garden",
                    "seconds": 30,
                    "ratio": "16:9",
                    "images": []
                  }
                },
                "compatible": {
                  "summary": "OpenAI 兼容格式；仅用于支持 size 的模型",
                  "value": {
                    "model": "YOUR_VIDEO_MODEL_ID",
                    "prompt": "A cat in a garden",
                    "seconds": "30",
                    "size": "1280x720"
                  }
                },
                "aspect_ratio": {
                  "summary": "aspect_ratio 等价示例；与 ratio 使用相同参数规则",
                  "value": {
                    "model": "YOUR_VIDEO_MODEL_ID",
                    "prompt": "A cat in a garden",
                    "seconds": 30,
                    "images": [],
                    "aspect_ratio": "16:9"
                  }
                },
                "referenceAudio": {
                  "summary": "MP3 参考音频；仅限支持参考音频的模型",
                  "value": {
                    "model": "YOUR_VIDEO_MODEL_ID",
                    "prompt": "参考音频1的节奏，生成与音乐氛围匹配的新视频。",
                    "seconds": 5,
                    "audios": [
                      "https://example.com/reference.mp3"
                    ]
                  }
                },
                "portraitParameters": {
                  "summary": "竖屏参数示例：仅供支持对应参数的模型使用",
                  "value": {
                    "model": "YOUR_VIDEO_MODEL_ID",
                    "prompt": "竖屏画面，镜头缓慢推进。",
                    "seconds": 5,
                    "ratio": "9:16",
                    "resolution": "720p"
                  }
                },
                "uploadedReferences": {
                  "summary": "使用上传返回的素材 URL：仅保留所选模型支持的素材类型",
                  "value": {
                    "model": "YOUR_VIDEO_MODEL_ID",
                    "prompt": "参考图片1的人物、视频1的动作和音频1的节奏，生成新视频。",
                    "seconds": 5,
                    "ratio": "9:16",
                    "resolution": "720p",
                    "images": [
                      "https://www.v6k.top/v1/media/0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef.png"
                    ],
                    "videos": [
                      "https://www.v6k.top/v1/media/0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef.mp4"
                    ],
                    "audios": [
                      "https://www.v6k.top/v1/media/0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef.mp3"
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "prompt"
                ],
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "prompt": {
                    "type": "string"
                  },
                  "seconds": {
                    "type": "integer",
                    "description": "视频时长，单位为整数秒，例如 5。这只是示例，不是固定时长；范围、可选档位和默认值均以所选模型为准。只有明确支持自动时长或编辑用途的模型才可以传 -1。"
                  },
                  "ratio": {
                    "type": "string",
                    "description": "画面宽高比，格式为 宽:高。常见比例有 16:9（横屏）、9:16（竖屏）、1:1（方形）、4:3、3:4、21:9、9:21、3:2、2:3。ratio 与 aspect_ratio 二选一，具体可用比例以所选模型为准。 auto/adaptive 仅限明确支持的模型；不可相互替换。像素尺寸请用 size，不要写入比例字段。",
                    "examples": [
                      "16:9",
                      "9:16",
                      "1:1",
                      "4:3",
                      "3:4",
                      "21:9",
                      "9:21",
                      "3:2",
                      "2:3"
                    ]
                  },
                  "resolution": {
                    "type": "string",
                    "description": "分辨率标记例如 480p、720p、768p、1080p，各模型支持范围不同。固定分辨率模型可能不接受此字段，不能一律发送。",
                    "examples": [
                      "480p",
                      "720p",
                      "768p",
                      "1080p"
                    ]
                  },
                  "image": {
                    "type": "string",
                    "format": "binary"
                  },
                  "video": {
                    "type": "string",
                    "format": "binary"
                  },
                  "audio": {
                    "type": "string",
                    "format": "binary",
                    "description": "参考音频文件，可使用 MP3（audio/mpeg）；仅在所选模型支持参考音频和对应上传方式时使用。"
                  },
                  "input_reference": {
                    "type": "string",
                    "format": "binary",
                    "description": "单张输入图片；模型须支持对应方式。"
                  },
                  "images": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "重复图片上传；也可用文本字段提交 URL 数组，以模型支持为准。"
                  },
                  "size": {
                    "type": "string",
                    "description": "像素尺寸使用小写 x，例如 1280x720（横屏）或 720x1280（竖屏），不是比例。仅在模型支持时发送 size；不要把 720p 填进 size，也不要把 720x1280 填进 ratio/aspect_ratio。",
                    "examples": [
                      "1280x720",
                      "720x1280"
                    ]
                  },
                  "aspect_ratio": {
                    "type": "string",
                    "description": "画面宽高比，格式为 宽:高。常见比例有 16:9（横屏）、9:16（竖屏）、1:1（方形）、4:3、3:4、21:9、9:21、3:2、2:3。ratio 与 aspect_ratio 二选一，具体可用比例以所选模型为准。 auto/adaptive 仅限明确支持的模型；不可相互替换。像素尺寸请用 size，不要写入比例字段。",
                    "examples": [
                      "16:9",
                      "9:16",
                      "1:1",
                      "4:3",
                      "3:4",
                      "21:9",
                      "9:21",
                      "3:2",
                      "2:3"
                    ]
                  }
                },
                "description": "仅在所选模型支持上传时使用；由客户端生成 Content-Type 和 boundary。"
              },
              "description": "仅在模型支持时上传参考素材；支持的字段、素材类型、数量和大小以模型广场当前说明为准。Content-Type 与 boundary 由客户端自动生成。"
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/VideoRequest"
              },
              "description": "标量按字段提交；素材数组可使用重复字段、images[] 等字段名或 JSON 数组字符串。标量不能重复。"
            }
          }
        },
        "responses": {
          "200": {
            "description": "任务已受理，不代表已完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Video"
                },
                "example": {
                  "id": "task_example",
                  "object": "video",
                  "model": "YOUR_VIDEO_MODEL_ID",
                  "status": "queued",
                  "progress": 0,
                  "created_at": 1790467200
                }
              }
            }
          },
          "400": {
            "description": "参数错误、配置问题、额度不足或任务未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "密钥无效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "无权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "任务或路由不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "请求限流",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "服务暂不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "服务繁忙",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "请求超时",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/videos/{id}": {
      "get": {
        "tags": [
          "Video"
        ],
        "operationId": "retrieveVideo",
        "summary": "查询当前账户的视频任务",
        "description": "使用创建响应的本站id。建议每20秒查询，限流或暂时错误时退避。HTTP200也可能status=failed，必须检查status。",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "创建接口返回的本站任务 ID"
          }
        ],
        "responses": {
          "200": {
            "description": "任务状态",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Video"
                },
                "example": {
                  "id": "task_example",
                  "object": "video",
                  "model": "YOUR_VIDEO_MODEL_ID",
                  "status": "completed",
                  "progress": 100,
                  "created_at": 1790467200,
                  "completed_at": 1790467800
                }
              }
            }
          },
          "400": {
            "description": "参数错误、配置问题、额度不足或任务未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "密钥无效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "无权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "任务或路由不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "请求限流",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "服务暂不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "服务繁忙",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "请求超时",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/videos/{id}/content": {
      "get": {
        "tags": [
          "Video"
        ],
        "operationId": "downloadVideo",
        "summary": "下载已完成的视频",
        "description": "任务 completed 后返回视频二进制。支持的 Range 分段请求返回 206 和 Content-Range。结果不可用时返回本站错误。",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "创建接口返回的本站任务 ID"
          },
          {
            "name": "Range",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "bytes=0-1023",
            "description": "可选的字节范围；最终支持情况取决于媒体服务"
          }
        ],
        "responses": {
          "200": {
            "description": "视频二进制",
            "content": {
              "video/mp4": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "206": {
            "description": "部分视频内容，参见 Content-Range"
          },
          "304": {
            "description": "条件请求内容未修改"
          },
          "400": {
            "description": "参数错误、配置问题、额度不足或任务未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "密钥无效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "无权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "任务或路由不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "视频地址已不可用且无法刷新",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "416": {
            "description": "字节范围不满足"
          },
          "429": {
            "description": "请求限流",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "服务暂不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "服务繁忙",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "请求超时",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "head": {
        "tags": [
          "Video"
        ],
        "operationId": "headVideo",
        "summary": "查询视频响应头",
        "description": "任务 completed 后返回视频二进制。支持的 Range 分段请求返回 206 和 Content-Range。结果不可用时返回本站错误。",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "创建接口返回的本站任务 ID"
          },
          {
            "name": "Range",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "bytes=0-1023",
            "description": "可选的字节范围；最终支持情况取决于媒体服务"
          }
        ],
        "responses": {
          "200": {
            "description": "视频响应头",
            "content": {
              "video/mp4": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "206": {
            "description": "部分视频内容，参见 Content-Range"
          },
          "304": {
            "description": "条件请求内容未修改"
          },
          "400": {
            "description": "参数错误、配置问题、额度不足或任务未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "密钥无效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "无权限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "任务或路由不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "410": {
            "description": "视频地址已不可用且无法刷新",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "416": {
            "description": "字节范围不满足"
          },
          "429": {
            "description": "请求限流",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "请求错误，检查HTTP状态与错误体",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "服务暂不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "服务繁忙",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "请求超时",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/completions": {
      "post": {
        "summary": "聊天接口",
        "description": "使用对应类型的本站公开模型。结果在当前响应返回，不使用视频任务轮询。 策影文本按输入、输出及可选缓存读取 Token 定价，每百万 Token 展示价格。缓存单独定价时从输入总量扣除缓存命中量，避免重复计费。未配置缓存定价时全部输入按输入单价结算。策影仅通过此聊天入口接入文本；输出上限未填写时默认 4096。stream=true 为上游完成后的 SSE 兼容响应。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "messages"
                ],
                "properties": {
                  "model": {
                    "type": "string"
                  },
                  "messages": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "object",
                      "required": [
                        "role",
                        "content"
                      ],
                      "properties": {
                        "role": {
                          "type": "string"
                        },
                        "content": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "object"
                              }
                            }
                          ]
                        }
                      }
                    }
                  },
                  "stream": {
                    "type": "boolean"
                  },
                  "max_tokens": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1073741823,
                    "description": "最大输出 Token 数；与 max_completion_tokens 按模型支持情况选择，策影在两者都省略时默认 4096"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "对应接口结果；检查响应字段"
          },
          "400": {
            "description": "参数错误"
          },
          "401": {
            "description": "鉴权失败"
          },
          "403": {
            "description": "权限不足或额度不足"
          },
          "502": {
            "description": "处理失败"
          }
        },
        "tags": [
          "Text"
        ]
      }
    },
    "/v1/images/generations": {
      "post": {
        "summary": "图片生成接口",
        "description": "使用本站 API Key 和本站公开模型 ID。结果在当前 HTTP 响应的 data 中返回，不使用视频任务查询接口。按后台配置的本站售价和计费单位结算。图片按实际生成张数计费，n 默认 1；按请求数量预扣，按有效结果张数结算。同图 URL 与 Base64 双表示不重复计数。所有尺寸、质量、张数和可选参数以所选模型为准。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "prompt"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "description": "本站公开模型 ID；从 GET /v1/models 原样复制，不填写渠道名或上游 ID。"
                  },
                  "prompt": {
                    "type": "string",
                    "description": "图片生成或编辑提示词。"
                  },
                  "n": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 1,
                    "description": "请求生成张数，默认 1，上限以所选模型为准。当前图片接口接受 1–10 的整数，所选模型还需支持对应数量。"
                  },
                  "size": {
                    "type": "string",
                    "description": "图片尺寸，填写所选模型支持的值；不能套用视频的 resolution 参数。"
                  },
                  "quality": {
                    "type": "string",
                    "description": "质量档位，以所选模型能力为准。"
                  },
                  "response_format": {
                    "type": "string",
                    "enum": [
                      "url",
                      "b64_json"
                    ],
                    "description": "仅在模型支持时选择 url 或 b64_json；按实际响应读取结果。"
                  },
                  "background": {
                    "type": "string",
                    "description": "背景选项，仅在模型支持时填写。"
                  },
                  "output_format": {
                    "type": "string",
                    "description": "输出图片格式，仅在模型支持时填写。"
                  },
                  "output_compression": {
                    "type": "integer",
                    "description": "输出压缩设置，仅在模型支持时填写。"
                  },
                  "input_fidelity": {
                    "type": "string",
                    "description": "参考图片保真度，仅在模型支持时填写。"
                  },
                  "style": {
                    "type": "string",
                    "description": "图片风格，仅在模型支持时填写。"
                  },
                  "user": {
                    "type": "string",
                    "description": "可选下游用户标识。"
                  },
                  "moderation": {
                    "type": "string",
                    "description": "内容审核选项，仅在模型支持时填写。"
                  }
                }
              },
              "examples": {
                "basic": {
                  "summary": "文生图；替换为本站已上架的公开图片模型 ID",
                  "value": {
                    "model": "YOUR_IMAGE_MODEL_ID",
                    "prompt": "一只在草地上奔跑的柯基",
                    "n": 1
                  }
                },
                "urlResult": {
                  "summary": "仅在模型支持时请求 URL 结果",
                  "value": {
                    "model": "YOUR_IMAGE_MODEL_ID",
                    "prompt": "白色背景上的蓝色圆形",
                    "n": 1,
                    "response_format": "url"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "图片结果已返回。读取 data[].url 下载图片，或将 data[].b64_json 解码为图片字节；JSON 本身不是图片文件。图片不使用视频任务轮询或视频 content 下载接口。请及时保存图片；仅请求本站鉴权地址时携带本站 API Key。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "created": {
                      "type": "integer",
                      "description": "Unix 秒级时间戳。"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "description": "实际图片地址，请及时保存。"
                          },
                          "b64_json": {
                            "type": "string",
                            "description": "Base64 编码的图片字节。"
                          },
                          "revised_prompt": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "url": {
                    "summary": "URL 结果示例",
                    "value": {
                      "created": 1795622400,
                      "data": [
                        {
                          "url": "https://example.com/generated-image.png"
                        }
                      ]
                    }
                  },
                  "base64": {
                    "summary": "Base64 结果示例；示意字符串不是完整图片",
                    "value": {
                      "created": 1795622400,
                      "data": [
                        {
                          "b64_json": "BASE64_IMAGE_BYTES"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误"
          },
          "401": {
            "description": "鉴权失败"
          },
          "403": {
            "description": "权限不足或额度不足"
          },
          "502": {
            "description": "处理失败"
          }
        },
        "tags": [
          "Images"
        ]
      }
    },
    "/v1/responses": {
      "post": {
        "tags": [
          "Text"
        ],
        "summary": "文本 Responses（需模型支持）",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "input"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "description": "从模型广场或 GET /v1/models 原样复制公开模型 ID"
                  },
                  "input": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object"
                        }
                      }
                    ]
                  },
                  "stream": {
                    "type": "boolean",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "返回 response 对象，结果位于 output；stream=true 返回 SSE"
          },
          "400": {
            "description": "参数错误"
          },
          "401": {
            "description": "Key 无效"
          }
        }
      }
    },
    "/v1/images/edits": {
      "post": {
        "tags": [
          "Images"
        ],
        "summary": "编辑图片（需模型支持）",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "prompt"
                ],
                "anyOf": [
                  {
                    "required": [
                      "image"
                    ]
                  },
                  {
                    "required": [
                      "images"
                    ]
                  },
                  {
                    "required": [
                      "image_urls"
                    ]
                  },
                  {
                    "required": [
                      "reference_images"
                    ]
                  }
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "description": "本站公开模型 ID；从 GET /v1/models 原样复制，不填写渠道名或上游 ID。"
                  },
                  "prompt": {
                    "type": "string",
                    "description": "图片生成或编辑提示词。"
                  },
                  "n": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 1,
                    "description": "请求生成张数，默认 1，上限以所选模型为准。当前图片接口接受 1–10 的整数，所选模型还需支持对应数量。"
                  },
                  "size": {
                    "type": "string",
                    "description": "图片尺寸，填写所选模型支持的值；不能套用视频的 resolution 参数。"
                  },
                  "quality": {
                    "type": "string",
                    "description": "质量档位，以所选模型能力为准。"
                  },
                  "response_format": {
                    "type": "string",
                    "enum": [
                      "url",
                      "b64_json"
                    ],
                    "description": "仅在模型支持时选择 url 或 b64_json；按实际响应读取结果。"
                  },
                  "background": {
                    "type": "string",
                    "description": "背景选项，仅在模型支持时填写。"
                  },
                  "output_format": {
                    "type": "string",
                    "description": "输出图片格式，仅在模型支持时填写。"
                  },
                  "output_compression": {
                    "type": "integer",
                    "description": "输出压缩设置，仅在模型支持时填写。"
                  },
                  "input_fidelity": {
                    "type": "string",
                    "description": "参考图片保真度，仅在模型支持时填写。"
                  },
                  "style": {
                    "type": "string",
                    "description": "图片风格，仅在模型支持时填写。"
                  },
                  "user": {
                    "type": "string",
                    "description": "可选下游用户标识。"
                  },
                  "moderation": {
                    "type": "string",
                    "description": "内容审核选项，仅在模型支持时填写。"
                  },
                  "image": {
                    "oneOf": [
                      {
                        "type": "string",
                        "description": "公网 HTTP(S) 图片直链或模型支持的图片 Data URL。"
                      },
                      {
                        "type": "object",
                        "required": [
                          "url"
                        ],
                        "properties": {
                          "url": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "string",
                              "description": "公网 HTTP(S) 图片直链或模型支持的图片 Data URL。"
                            },
                            {
                              "type": "object",
                              "required": [
                                "url"
                              ],
                              "properties": {
                                "url": {
                                  "type": "string"
                                }
                              }
                            }
                          ]
                        },
                        "minItems": 1
                      }
                    ],
                    "description": "参考原图。支持这些等价字段的模型只使用一种，使用多项时必须一致；具体支持情况以所选模型说明为准。"
                  },
                  "images": {
                    "oneOf": [
                      {
                        "type": "string",
                        "description": "公网 HTTP(S) 图片直链或模型支持的图片 Data URL。"
                      },
                      {
                        "type": "object",
                        "required": [
                          "url"
                        ],
                        "properties": {
                          "url": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "string",
                              "description": "公网 HTTP(S) 图片直链或模型支持的图片 Data URL。"
                            },
                            {
                              "type": "object",
                              "required": [
                                "url"
                              ],
                              "properties": {
                                "url": {
                                  "type": "string"
                                }
                              }
                            }
                          ]
                        },
                        "minItems": 1
                      }
                    ],
                    "description": "参考原图。支持这些等价字段的模型只使用一种，使用多项时必须一致；具体支持情况以所选模型说明为准。"
                  },
                  "image_urls": {
                    "oneOf": [
                      {
                        "type": "string",
                        "description": "公网 HTTP(S) 图片直链或模型支持的图片 Data URL。"
                      },
                      {
                        "type": "object",
                        "required": [
                          "url"
                        ],
                        "properties": {
                          "url": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "string",
                              "description": "公网 HTTP(S) 图片直链或模型支持的图片 Data URL。"
                            },
                            {
                              "type": "object",
                              "required": [
                                "url"
                              ],
                              "properties": {
                                "url": {
                                  "type": "string"
                                }
                              }
                            }
                          ]
                        },
                        "minItems": 1
                      }
                    ],
                    "description": "参考原图。支持这些等价字段的模型只使用一种，使用多项时必须一致；具体支持情况以所选模型说明为准。"
                  },
                  "reference_images": {
                    "oneOf": [
                      {
                        "type": "string",
                        "description": "公网 HTTP(S) 图片直链或模型支持的图片 Data URL。"
                      },
                      {
                        "type": "object",
                        "required": [
                          "url"
                        ],
                        "properties": {
                          "url": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "string",
                              "description": "公网 HTTP(S) 图片直链或模型支持的图片 Data URL。"
                            },
                            {
                              "type": "object",
                              "required": [
                                "url"
                              ],
                              "properties": {
                                "url": {
                                  "type": "string"
                                }
                              }
                            }
                          ]
                        },
                        "minItems": 1
                      }
                    ],
                    "description": "参考原图。支持这些等价字段的模型只使用一种，使用多项时必须一致；具体支持情况以所选模型说明为准。"
                  },
                  "mask": {
                    "oneOf": [
                      {
                        "type": "string",
                        "description": "公网 HTTP(S) 图片直链或模型支持的图片 Data URL。"
                      },
                      {
                        "type": "object",
                        "required": [
                          "url"
                        ],
                        "properties": {
                          "url": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  }
                }
              },
              "examples": {
                "referenceUrl": {
                  "summary": "支持 JSON 原图输入的图片模型",
                  "value": {
                    "model": "YOUR_IMAGE_MODEL_ID",
                    "prompt": "把背景改为海边",
                    "image": [
                      "https://example.com/reference.png"
                    ],
                    "n": 1
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "prompt",
                  "image"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "description": "本站公开模型 ID；从 GET /v1/models 原样复制，不填写渠道名或上游 ID。"
                  },
                  "prompt": {
                    "type": "string",
                    "description": "图片生成或编辑提示词。"
                  },
                  "n": {
                    "type": "integer",
                    "minimum": 1,
                    "default": 1,
                    "description": "请求生成张数，默认 1，上限以所选模型为准。当前图片接口接受 1–10 的整数，所选模型还需支持对应数量。"
                  },
                  "size": {
                    "type": "string",
                    "description": "图片尺寸，填写所选模型支持的值；不能套用视频的 resolution 参数。"
                  },
                  "quality": {
                    "type": "string",
                    "description": "质量档位，以所选模型能力为准。"
                  },
                  "response_format": {
                    "type": "string",
                    "enum": [
                      "url",
                      "b64_json"
                    ],
                    "description": "仅在模型支持时选择 url 或 b64_json；按实际响应读取结果。"
                  },
                  "background": {
                    "type": "string",
                    "description": "背景选项，仅在模型支持时填写。"
                  },
                  "output_format": {
                    "type": "string",
                    "description": "输出图片格式，仅在模型支持时填写。"
                  },
                  "output_compression": {
                    "type": "integer",
                    "description": "输出压缩设置，仅在模型支持时填写。"
                  },
                  "input_fidelity": {
                    "type": "string",
                    "description": "参考图片保真度，仅在模型支持时填写。"
                  },
                  "style": {
                    "type": "string",
                    "description": "图片风格，仅在模型支持时填写。"
                  },
                  "user": {
                    "type": "string",
                    "description": "可选下游用户标识。"
                  },
                  "moderation": {
                    "type": "string",
                    "description": "内容审核选项，仅在模型支持时填写。"
                  },
                  "image": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "binary"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "binary"
                        },
                        "minItems": 1
                      }
                    ],
                    "description": "原图文件；多图重复 image 字段，或使用模型支持的 image[]。不得手动填写 multipart boundary。"
                  },
                  "mask": {
                    "type": "string",
                    "format": "binary",
                    "description": "可选蒙版文件，仅在模型支持时填写。"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "图片结果已返回。读取 data[].url 下载图片，或将 data[].b64_json 解码为图片字节；JSON 本身不是图片文件。图片不使用视频任务轮询或视频 content 下载接口。请及时保存图片；仅请求本站鉴权地址时携带本站 API Key。",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "created": {
                      "type": "integer",
                      "description": "Unix 秒级时间戳。"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "description": "实际图片地址，请及时保存。"
                          },
                          "b64_json": {
                            "type": "string",
                            "description": "Base64 编码的图片字节。"
                          },
                          "revised_prompt": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "url": {
                    "summary": "URL 结果示例",
                    "value": {
                      "created": 1795622400,
                      "data": [
                        {
                          "url": "https://example.com/generated-image.png"
                        }
                      ]
                    }
                  },
                  "base64": {
                    "summary": "Base64 结果示例；示意字符串不是完整图片",
                    "value": {
                      "created": 1795622400,
                      "data": [
                        {
                          "b64_json": "BASE64_IMAGE_BYTES"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "参数错误或模型不支持编辑"
          },
          "401": {
            "description": "Key 无效"
          }
        },
        "description": "仅限支持图片编辑的模型。按所选模型支持的方式传入 JSON 原图链接、图片 Data URL 或 multipart 原图文件；同一次请求不要混用原图链接和文件上传。多图和 mask 能力以模型为准。结果直接返回 data，不使用视频任务轮询。"
      }
    },
    "/v1/media": {
      "post": {
        "tags": [
          "Media"
        ],
        "operationId": "uploadReferenceMedia",
        "summary": "上传参考图片、视频、音频",
        "description": "本地素材先上传：使用本站 API Key，向 POST /v1/media 发送 multipart/form-data，文件字段名为 file，每次上传一个原始文件。Content-Type 和 boundary 由客户端自动生成。上传素材不等于创建视频任务。 上传服务可识别 PNG/JPEG/WebP/GIF 图片、MP4/WebM 视频和 MP3/M4A/AAC/FLAC/OGG/WAV 音频。上传成功不代表模型支持所有格式；素材数量、文件大小、时长、费用仍须符合所选模型与本站上传限制。 读取每次上传返回的顶层 url，不是 data.url。expires_at 是 Unix 秒级到期时间，素材上传后保留 24 小时，请在过期前使用。返回的素材直链无需附加 API Key 即可读取，只向生成流程提供需要使用的链接。 随后向 POST /v1/videos 提交 JSON：图片 url 放 images，视频 url 放 videos，音频 url 放 audios；只保留模型支持的素材类型。只有一个文件也要用数组。已有公开素材直链可直接使用，无需重复上传；本地路径、需要浏览器登录的链接和网页分享页都不能代替素材直链。",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "单个原始文件，例如 reference.png、reference.mp4、reference.mp3；不要上传 ZIP。实际签名须与格式相符。上传大小以上传服务配置为准，生成仍须符合所选模型限制。"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "上传成功；不代表视频任务已创建",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "url",
                    "expires_at"
                  ],
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "临时公开素材直链，无需额外 API Key。按素材类型放入视频请求的 images、videos 或 audios 数组。返回在顶层，不是 data.url。"
                    },
                    "expires_at": {
                      "type": "integer",
                      "format": "int64",
                      "description": "上传后 24 小时的过期时间，Unix 秒级时间戳。"
                    }
                  }
                },
                "examples": {
                  "image": {
                    "summary": "图片上传成功；此时尚未创建生成任务",
                    "value": {
                      "url": "https://www.v6k.top/v1/media/0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef.png",
                      "expires_at": 1794578400
                    }
                  },
                  "video": {
                    "summary": "视频上传成功；此时尚未创建生成任务",
                    "value": {
                      "url": "https://www.v6k.top/v1/media/0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef.mp4",
                      "expires_at": 1794578400
                    }
                  },
                  "audio": {
                    "summary": "音频上传成功；此时尚未创建生成任务",
                    "value": {
                      "url": "https://www.v6k.top/v1/media/0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef.mp3",
                      "expires_at": 1794578400
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "素材为空、超出站点上限或真实格式不支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "密钥无效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "创建素材地址或保存文件失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "素材存储盘暂不可用",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "填写本站签发的 API 令牌"
      }
    },
    "schemas": {
      "VideoRequest": {
        "type": "object",
        "required": [
          "model",
          "prompt"
        ],
        "properties": {
          "model": {
            "type": "string",
            "minLength": 1,
            "description": "原样填写 GET /v1/models 返回的本站公开模型 ID。"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "description": "非空视频描述；参考素材标记由所选模型决定，不支持的模型请勿使用 @图1 等专用标记。"
          },
          "seconds": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 3600
              },
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,3}$"
              },
              {
                "type": "integer",
                "const": -1
              },
              {
                "type": "string",
                "const": "-1"
              }
            ],
            "description": "视频时长，单位为整数秒，例如 5。这只是示例，不是固定时长；范围、可选档位和默认值均以所选模型为准。只有明确支持自动时长或编辑用途的模型才可以传 -1。"
          },
          "ratio": {
            "type": "string",
            "description": "画面宽高比，格式为 宽:高。常见比例有 16:9（横屏）、9:16（竖屏）、1:1（方形）、4:3、3:4、21:9、9:21、3:2、2:3。ratio 与 aspect_ratio 二选一，具体可用比例以所选模型为准。 auto/adaptive 仅限明确支持的模型；不可相互替换。像素尺寸请用 size，不要写入比例字段。",
            "examples": [
              "16:9",
              "9:16",
              "1:1",
              "4:3",
              "3:4",
              "21:9",
              "9:21",
              "3:2",
              "2:3"
            ]
          },
          "images": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "duration_seconds": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "maximum": 3600
                    }
                  }
                }
              ]
            },
            "description": "参考图片 URL 数组。可先将本地原始文件逐个上传至 POST /v1/media，读取每次返回的顶层 url 后填入此数组；已有公开素材直链也可使用。只有一个素材也使用数组。格式、数量、时长、大小及费用以所选模型为准；上传成功不等于模型支持。保留签名参数，不要填本地路径或网页分享链接。"
          },
          "resolution": {
            "type": "string",
            "description": "分辨率标记例如 480p、720p、768p、1080p，各模型支持范围不同。固定分辨率模型可能不接受此字段，不能一律发送。",
            "examples": [
              "480p",
              "720p",
              "768p",
              "1080p"
            ]
          },
          "videos": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "duration_seconds": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "maximum": 3600
                    }
                  }
                }
              ]
            },
            "description": "参考视频 URL 数组。可先将本地原始文件逐个上传至 POST /v1/media，读取每次返回的顶层 url 后填入此数组；已有公开素材直链也可使用。只有一个素材也使用数组。格式、数量、时长、大小及费用以所选模型为准；上传成功不等于模型支持。保留签名参数，不要填本地路径或网页分享链接。"
          },
          "audios": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "duration_seconds": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "maximum": 3600
                    }
                  }
                }
              ]
            },
            "description": "参考音频 URL 数组。可先将本地原始文件逐个上传至 POST /v1/media，读取每次返回的顶层 url 后填入此数组；已有公开素材直链也可使用。只有一个素材也使用数组。格式、数量、时长、大小及费用以所选模型为准；上传成功不等于模型支持。保留签名参数，不要填本地路径或网页分享链接。"
          },
          "metadata": {
            "type": "object",
            "description": "仅在所选模型的接入示例要求时使用，不要覆盖模型和计费时长。"
          },
          "size": {
            "type": "string",
            "description": "像素尺寸使用小写 x，例如 1280x720（横屏）或 720x1280（竖屏），不是比例。仅在模型支持时发送 size；不要把 720p 填进 size，也不要把 720x1280 填进 ratio/aspect_ratio。",
            "examples": [
              "1280x720",
              "720x1280"
            ]
          },
          "input_reference": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "image_url": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  }
                }
              },
              {
                "type": "array",
                "maxItems": 1,
                "items": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string"
                        },
                        "image_url": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "url": {
                                  "type": "string"
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            ],
            "description": "单张输入图/首帧 URL 或 URL 对象；multipart 可上传文件。它与 images 参考图保持独立，模型没有首帧能力时不会自动改成其他生成方式。多图请用 images。部分模型按其已有输入图契约映射为参考图。"
          },
          "aspect_ratio": {
            "type": "string",
            "description": "画面宽高比，格式为 宽:高。常见比例有 16:9（横屏）、9:16（竖屏）、1:1（方形）、4:3、3:4、21:9、9:21、3:2、2:3。ratio 与 aspect_ratio 二选一，具体可用比例以所选模型为准。 auto/adaptive 仅限明确支持的模型；不可相互替换。像素尺寸请用 size，不要写入比例字段。",
            "examples": [
              "16:9",
              "9:16",
              "1:1",
              "4:3",
              "3:4",
              "21:9",
              "9:21",
              "3:2",
              "2:3"
            ]
          },
          "duration": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 3600
              },
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,3}$"
              }
            ],
            "description": "seconds 的等价写法；同时填写时必须数值相同，实际时长须符合模型限制。"
          },
          "duration_seconds": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 3600
              },
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,3}$"
              }
            ],
            "description": "seconds 的等价写法；同时填写时必须数值相同，实际时长须符合模型限制。"
          },
          "durationSeconds": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 3600
              },
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,3}$"
              }
            ],
            "description": "seconds 的等价写法；同时填写时必须数值相同，实际时长须符合模型限制。"
          },
          "video_duration": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 3600
              },
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,3}$"
              }
            ],
            "description": "seconds 的等价写法；同时填写时必须数值相同，实际时长须符合模型限制。"
          },
          "reference_image_urls": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "duration_seconds": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "maximum": 3600
                    }
                  }
                }
              ]
            },
            "description": "images 的等价素材列表写法。URL 字符串和 URL 对象由公共入口解析；多个同类字段须内容相同。"
          },
          "reference_video_urls": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "duration_seconds": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "maximum": 3600
                    }
                  }
                }
              ]
            },
            "description": "videos 的等价素材列表写法。URL 字符串和 URL 对象由公共入口解析；多个同类字段须内容相同。"
          },
          "reference_audio_urls": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "required": [
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "duration_seconds": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "maximum": 3600
                    }
                  }
                }
              ]
            },
            "description": "audios 的等价素材列表写法。URL 字符串和 URL 对象由公共入口解析；多个同类字段须内容相同。"
          }
        }
      },
      "Video": {
        "type": "object",
        "required": [
          "id",
          "object",
          "model",
          "status",
          "progress",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "本站任务 ID，保持字符串，不要转换为数字。"
          },
          "object": {
            "type": "string",
            "const": "video"
          },
          "model": {
            "type": "string",
            "description": "本站公开模型 ID"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "in_progress",
              "completed",
              "failed",
              "unknown"
            ]
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "created_at": {
            "type": "integer",
            "description": "Unix 秒级时间戳"
          },
          "completed_at": {
            "type": "integer",
            "description": "仅成功时返回"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          },
          "url": {
            "type": "string",
            "description": "可选的本站成品地址。也可使用固定的 /v1/videos/{id}/content 下载。"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "code": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "description": "兼容旧版任务错误响应的可选数据"
          }
        },
        "description": "本站统一错误，不包含服务商地址、服务商模型 ID 或密钥"
      }
    }
  }
}
