{ "info": { "title": "AI模型接口", "description": "可灵 v2.6 模型视频生成接口,支持文生视频、图生视频、有声视频和动作控制等功能", "version": "1.0.0", "contact": { "name": "七牛云 AI 大模型推理 API", "url": "https://www.qiniu.com/ai" } }, "tags": [ { "name": "模型" }, { "name": "聊天" }, { "name": "聊天/gemini-3.0-pro-preview" }, { "name": "聊天/gemini-2.5-pro" }, { "name": "聊天/openai/gpt-5" }, { "name": "聊天/openai/gpt-5.2" }, { "name": "聊天/openai/gpt-5.2-codex" }, { "name": "聊天/gemini-2.5-flash" }, { "name": "聊天/claude-4.5-sonnet" }, { "name": "聊天/claude-4.6-opus" }, { "name": "聊天/deepseek/deepseek-v3.2-251201" }, { "name": "聊天/deepseek-v3" }, { "name": "聊天/claude-3.7-sonnet" }, { "name": "聊天/doubao-seed-1.6" }, { "name": "聊天/qwen3-max-2026-01-23" }, { "name": "聊天/moonshotai/kimi-k2.5" }, { "name": "视频" }, { "name": "视频/sora-2" }, { "name": "视频/sora-2-pro" }, { "name": "视频/kling-v2-1" }, { "name": "视频/kling-v2-5-turbo" }, { "name": "视频/kling-v2-6" }, { "name": "视频/kling-v3" }, { "name": "视频/kling-video-o1" }, { "name": "视频/kling-v3-omni" }, { "name": "视频/viduq1" }, { "name": "视频/viduq2" }, { "name": "视频/viduq2-pro" }, { "name": "视频/viduq2-turbo" }, { "name": "视频/Veo" }, { "name": "视频/veo-3.1-fast-generate-001" }, { "name": "图像生成" }, { "name": "图像生成/kling-v1" }, { "name": "图像生成/kling-v1-5" }, { "name": "图像生成/kling-v2" }, { "name": "图像生成/kling-v2-new" }, { "name": "图像生成/kling-v2-1" }, { "name": "图像生成/gemini-2.5-flash-image" }, { "name": "图像生成/gemini-3.0-pro-image-preview" }, { "name": "图像生成/gemini-3.1-flash-image-preview" }, { "name": "图像生成/kling-image-o1" }, { "name": "文件" }, { "name": "视频/Sora" }, { "name": "默认模块/视频/kling-v2-1" }, { "name": "默认模块/视频/kling-v2-5-turbo" }, { "name": "可灵 v2.6" }, { "name": "默认模块/视频/kling-video-o1" }, { "name": "视频/Vidu" }, { "name": "视频生成" }, { "name": "Files" } ], "paths": { "/v1/models": { "get": { "summary": "模型列表", "deprecated": false, "description": "", "tags": [ "模型" ], "parameters": [], "responses": { "200": { "description": "", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "object": "list", "data": [ { "id": "doubao-seed-1.6-thinking", "object": "model", "created": 1755242697, "owned_by": "system" }, { "id": "doubao-seed-1.6-flash", "object": "model", "created": 1755242599, "owned_by": "system" }, { "id": "doubao-seed-1.6", "object": "model", "created": 1755241785, "owned_by": "system" }, { "id": "doubao-1.5-vision-pro", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "doubao-1.5-thinking-pro", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "doubao-1.5-pro-32k", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "mimo-v2-flash", "object": "model", "created": 1765950910, "owned_by": "system" }, { "id": "z-ai/glm-4.7", "object": "model", "created": 1766459139, "owned_by": "system" }, { "id": "minimax/minimax-m2.1", "object": "model", "created": 1766470220, "owned_by": "system" }, { "id": "glm-4.5", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "minimax/minimax-m2", "object": "model", "created": 1761618594, "owned_by": "system" }, { "id": "z-ai/glm-4.6", "object": "model", "created": 1760155542, "owned_by": "system" }, { "id": "qwen3-max-preview", "object": "model", "created": 1757139635, "owned_by": "system" }, { "id": "deepseek/deepseek-v3.2-251201", "object": "model", "created": 1764587960, "owned_by": "system" }, { "id": "glm-4.5-air", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "deepseek/deepseek-v3.2-exp-thinking", "object": "model", "created": 1759143007, "owned_by": "system" }, { "id": "deepseek/deepseek-v3.2-exp", "object": "model", "created": 1759142897, "owned_by": "system" }, { "id": "deepseek-v3.1", "object": "model", "created": 1755609557, "owned_by": "system" }, { "id": "deepseek/deepseek-math-v2", "object": "model", "created": 1764843837, "owned_by": "system" }, { "id": "moonshotai/kimi-k2-thinking", "object": "model", "created": 1762499974, "owned_by": "system" }, { "id": "qwen3-max", "object": "model", "created": 1758693892, "owned_by": "system" }, { "id": "MiniMax-M1", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "qwen3-next-80b-a3b-thinking", "object": "model", "created": 1757662142, "owned_by": "system" }, { "id": "qwen3-next-80b-a3b-instruct", "object": "model", "created": 1757662892, "owned_by": "system" }, { "id": "moonshotai/kimi-k2-0905", "object": "model", "created": 1757308736, "owned_by": "system" }, { "id": "deepseek-v3", "object": "model", "created": 1755051424, "owned_by": "system" }, { "id": "deepseek-v3-0324", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "deepseek/deepseek-v3.1-terminus-thinking", "object": "model", "created": 1758547768, "owned_by": "system" }, { "id": "deepseek/deepseek-v3.1-terminus", "object": "model", "created": 1758547876, "owned_by": "system" }, { "id": "qwen3-coder-480b-a35b-instruct", "object": "model", "created": 1755170619, "owned_by": "system" }, { "id": "qwen3-235b-a22b-thinking-2507", "object": "model", "created": 1754981531, "owned_by": "system" }, { "id": "qwen3-235b-a22b-instruct-2507", "object": "model", "created": 1754981498, "owned_by": "system" }, { "id": "qwen3-235b-a22b", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "meituan/longcat-flash-chat", "object": "model", "created": 1762316660, "owned_by": "system" }, { "id": "kimi-k2", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "qwen3-32b", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "qwen3-30b-a3b", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "qwen2.5-vl-7b-instruct", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "qwen2.5-vl-72b-instruct", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "qwen-vl-max-2025-01-25", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "qwen-max-2025-01-25", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "qwen-turbo", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "deepseek-r1-0528", "object": "model", "created": 1754380642, "owned_by": "system" }, { "id": "deepseek-r1", "object": "model", "created": 1754380642, "owned_by": "system" } ] } }, "schema": { "type": "object", "properties": { "object": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "object": { "type": "string" }, "created": { "type": "integer" }, "owned_by": { "type": "string" } }, "required": [ "id", "object", "created", "owned_by" ], "x-apifox-orders": [ "id", "object", "created", "owned_by" ], "x-apifox-ignore-properties": [] } } }, "required": [ "object", "data" ], "x-apifox-orders": [ "object", "data" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "模型", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425177994-run", "produces": [ "application/json" ] } }, "/v1/chat/completions": { "post": { "summary": "对话接口 - 支持文生图、图生图和纯对话", "deprecated": false, "description": "通用对话接口,支持 Gemini 模型的文生图、图生图和纯对话功能。\n\n**接口特点**:\n- **支持流式输出**:可以实时接收生成进度\n- **展示思考过程**:返回模型的推理过程(reasoning_content)\n- **更灵活的交互**:可以只聊天不生图,也可以生成图像\n- **多模态支持**:在对话中自然地混合文本和图像输入", "operationId": "createChatCompletion", "tags": [ "图像生成/gemini-3.1-flash-image-preview" ], "parameters": [ { "required": true, "name": "body", "in": "body", "schema": { "$ref": "#/definitions/Gemini31FlashImageChatCompletionRequest" } } ], "responses": { "200": { "description": "请求成功", "headers": {}, "x-apifox-ordering": 0, "examples": { "application/json": { "id": "chatcmpl-2f8236e9f2b34bd391289576d0e23e72", "object": "chat.completion", "created": 1764574464, "model": "gemini-3.1-flash-image-preview", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "", "reasoning_content": "**Analyzing the Icon Redesign**\n\nI'm focused on the icon's elements...", "images": [ { "type": "image_url", "image_url": { "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABYAAAAMACAIAAAASU1SbA.........." }, "index": 0 } ] }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 19, "completion_tokens": 1322, "total_tokens": 1341, "prompt_tokens_details": { "text_tokens": 19 }, "completion_tokens_details": { "reasoning_tokens": 202, "image_tokens": 1120 } } } }, "schema": { "$ref": "#/definitions/ChatCompletionResponse3" } }, "400": { "description": "错误响应", "headers": {}, "x-apifox-ordering": 1, "schema": { "type": "object", "description": "错误响应体", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string", "description": "错误信息" }, "type": { "type": "string", "description": "错误类型" }, "code": { "type": "string", "description": "错误代码" } }, "x-apifox-orders": [ "message", "type", "code" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "error" ], "x-apifox-ignore-properties": [] } }, "401": { "description": "错误响应", "headers": {}, "x-apifox-ordering": 2, "schema": { "type": "object", "description": "错误响应体", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string", "description": "错误信息" }, "type": { "type": "string", "description": "错误类型" }, "code": { "type": "string", "description": "错误代码" } }, "x-apifox-orders": [ "message", "type", "code" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "error" ], "x-apifox-ignore-properties": [] } }, "500": { "description": "错误响应", "headers": {}, "x-apifox-ordering": 3, "schema": { "type": "object", "description": "错误响应体", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string", "description": "错误信息" }, "type": { "type": "string", "description": "错误类型" }, "code": { "type": "string", "description": "错误代码" } }, "x-apifox-orders": [ "message", "type", "code" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "error" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "图像生成/gemini-3.1-flash-image-preview", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178073-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/v1/messages": { "post": { "summary": "Anthropic协议", "deprecated": false, "description": "", "tags": [ "聊天" ], "parameters": [ { "required": true, "name": "body", "in": "body", "schema": { "type": "object", "properties": { "model": { "type": "string" }, "messages": { "type": "array", "items": { "type": "object", "properties": { "role": { "type": "string" }, "content": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string" }, "text": { "type": "string" } }, "x-apifox-orders": [ "type", "text" ], "x-apifox-ignore-properties": [] } } }, "x-apifox-orders": [ "role", "content" ], "x-apifox-ignore-properties": [] } }, "max_tokens": { "type": "integer" } }, "required": [ "model", "messages", "max_tokens" ], "x-apifox-orders": [ "model", "messages", "max_tokens" ], "x-apifox-ignore-properties": [] } } ], "responses": { "200": { "description": "", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "id": "msg_f69c4d5d67c64d3bae8865537ee82ee8", "type": "message", "role": "assistant", "model": "claude-4.5-sonnet", "content": [ { "type": "text", "text": "你好!很高兴见到你。有什么我可以帮助你的吗?" } ], "stop_reason": "end_turn", "usage": { "input_tokens": 10, "output_tokens": 29, "cache_creation_input_tokens": 0 } } }, "schema": { "type": "object", "properties": {}, "x-apifox-orders": [], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "聊天", "x-apifox-status": "developing", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425177997-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/v1/llm/v1/responses": { "post": { "summary": "Response API", "deprecated": false, "description": "此接口为白名单内测接口,不对所有人开放", "tags": [ "聊天" ], "parameters": [ { "name": "api-version", "in": "query", "description": "", "required": true, "type": "string", "x-example": "2025-04-01-preview" }, { "name": "Authorization", "in": "header", "description": "", "required": true, "type": "string", "x-example": "Bearer xxx" }, { "name": "Content-Type", "in": "header", "description": "", "required": true, "type": "string", "x-example": "application/json" }, { "required": true, "name": "body", "in": "body", "schema": { "type": "object", "properties": { "input": { "type": "string" }, "reasoning": { "type": "object", "properties": { "effort": { "type": "string" }, "summary": { "type": "string" } }, "required": [ "effort", "summary" ], "x-apifox-orders": [ "effort", "summary" ], "x-apifox-ignore-properties": [] }, "include": { "type": "array", "items": { "type": "string" } }, "stream": { "type": "boolean" }, "model": { "type": "string" } }, "required": [ "input", "reasoning", "include", "stream", "model" ], "x-apifox-orders": [ "input", "reasoning", "include", "stream", "model" ], "x-apifox-ignore-properties": [] } } ], "responses": { "200": { "description": "", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "id": "resp_HRgZB1Zd2T5ga4s9hWoBSPF60vyXm3EA16FMq3n_nANTyUxNjmva2AItT_EZsmzC5Ky4V4UmlFVvCYF30-Jt4pGvzr9_mLzYAcDwd_BGad90SwuGkJKU2wjJo5odR6X8HJJYzHTlzkZzQbb95nvataeuS_zJRMAf6T67oVHiMHzBhIcc0SU2i-ieU82zkHp9HdN4at5uMPRGxMdTldpnUeCFgEQiTW_2p7GOxbg_6taiyARNgt_-TzRLzLaHoSb-gcnq6j2Ttlo1Pl4ut4nwWPMD8poeh5jMDR0NfMeI_yzdN2MVMDyesvqa7CVrNYLMqmPGcXAw7VK93zsRGripC1ECqwxog3g8t61icJEuBr-o4YtRTF4R4o750SJxQe-wMc1KNOH3ZWFATp9ylt1AMVmp2RxgOrOpe-uIHsbzXHGTpCSMr09KLt-OfCPievFvkb_66ov5YCjlFvh8u-3U76xa", "created_at": 1770773311, "error": null, "incomplete_details": null, "instructions": null, "metadata": {}, "model": "gpt-5.2", "object": "response", "output": [ { "id": "rs_04929f4aa000473500698bdb3fe4ac81909d630d22afd983e6", "summary": [ { "text": "**Counting letters in \"strawberry\"**\n\nI’m working on counting the letter \"r\" in \"strawberry\". I see that \"straw\" has one \"r\" at position 3, and \"berry\" has two \"r's\". So, to break it down: \"straw\" = 1 r, \"berry\" = 2 r's. That gives a total of 3 r's in \"strawberry.\" I’ll make sure to provide this clear answer.", "type": "summary_text" } ], "type": "reasoning", "content": null, "encrypted_content": "gAAAAABpi9tCFtB7INhYGtZX62PYLdnzdZPHtUgE2VcqC3HmcdfI2RsyWZ4IZgkQuqldd77rQLa7eWDQdOYmAcMifPuwaQp0stJMElP35TZr17mAOPxsuXL0IRptDPSU5hhSH1HQ8OE5XDaDkyCTbsbhKOt2LW5PZrCJs2N_-xfYGrps_pMhAMyhj2JwmBlt-Bh7INleBeW44IBAAwecps6yfgOp6Ndd3y7hNS4fgflMbBl2_YNMNQU8TKjj7VvcMZtL0Lwl3EazcqoPwve_ZSVyXy6a2qqdxU5YFPy_tDQPcJdmtv_xifNIdvpawqpyNJkUajMhlV0OdJ-jcPgKLpr7K9ZY5tTRAqJNgaByzVr68v_dmWPucobPVu1vtTGSPmzTBYSPYXvJn8oOz1npaVNz-Cb-zIQwTCht6QaIcTA3lx_eMa_aCn0P_AeG02ID9nQVylxp1x7xRU6sTHeNm-2qIzjzrl1vhJM9TEGU77WI2IvfbcPFOMbtUbqMUIF7iszFXisn1GpNLMLX8oqLzWcJaGufqZ5jFfAcnpr39914On3Oe04rgYOzT-xTODzguwy-glCZQpKk4gqFr2cUc-PEj3ufuq6NgM4lQkLJ0M3nx01rVO3cGtm3wRM7xvy2s1K5OKyCLdWFcLif_l4eSn4sv8NVBuWsYSbk0XeNdkbE0jsfdLIEkiVULlntdAESzqzYA4jtk5tI970qD9AlX-i5z2KItr3iPI_kgLiN18cEIwxWC7ceFnL39yBOMAH7wgo7x3QGIxc3VKlRRjfgP0pI-t81IsYQWEAcx0b4CXkOpMyNTkYRC-sGbqDqmW4k1oE3nmxmrdbI3oVwl8jNsaRTRPy4CQDB5C0MXmJKhoxB0z8_K42PBMtzJSRPu_zT8Q0k1b--WM9E5wgRlyU6rntnsglVsxy-z6acLSO7pqQ7xb2y9HxXbekrF9hn6jyWK-4yMbLiFOBCanrWdjpB_wpLGe7MIIxPDdgN1NeQnSrqGOv9TeY2Mj-hUB3YYJWircmW5twYLz7ClysHfsMQl9ShcL-r-wAvDTSszgRy7xxFc301g-AOPxvlhGq99OEKMCEuRvqFckx_T6cKcSYvyOx7-ozv-GVauQ==", "status": null }, { "id": "msg_04929f4aa000473500698bdb427260819083f6a9ea24d63c16", "content": [ { "annotations": [], "text": "There are **3** “r”s in **strawberry**.", "type": "output_text", "logprobs": [] } ], "role": "assistant", "status": "completed", "type": "message" } ], "parallel_tool_calls": true, "temperature": 1, "tool_choice": "auto", "tools": [], "top_p": 0.98, "max_output_tokens": null, "previous_response_id": null, "reasoning": { "effort": "high", "summary": "detailed" }, "status": "completed", "text": { "format": { "type": "text" }, "verbosity": "medium" }, "truncation": "disabled", "usage": { "input_tokens": 20, "input_tokens_details": { "audio_tokens": null, "cached_tokens": 0, "text_tokens": null }, "output_tokens": 98, "output_tokens_details": { "reasoning_tokens": 76, "text_tokens": null }, "total_tokens": 118, "cost": null }, "user": null, "store": true, "background": false, "completed_at": 1770773314, "content_filters": [ { "blocked": false, "source_type": "prompt", "content_filter_raw": null, "content_filter_results": {}, "content_filter_offsets": { "start_offset": 1431, "end_offset": 1473, "check_offset": 0 } }, { "blocked": false, "source_type": "completion", "content_filter_raw": null, "content_filter_results": {}, "content_filter_offsets": { "start_offset": 0, "end_offset": 0, "check_offset": 0 } } ], "max_tool_calls": null, "prompt_cache_key": null, "prompt_cache_retention": null, "safety_identifier": null, "service_tier": "default", "top_logprobs": 0 } }, "schema": { "type": "object", "properties": {}, "x-apifox-orders": [], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "聊天", "x-apifox-status": "developing", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425177998-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/v1/videos": { "post": { "summary": "创建视频任务", "deprecated": false, "description": "", "operationId": "createVideoKlingO1", "tags": [ "视频/kling-v3-omni" ], "parameters": [ { "required": true, "name": "body", "in": "body", "schema": { "$ref": "#/definitions/KlingV3OmniCreateRequest" } } ], "responses": { "200": { "description": "视频任务创建成功", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "schema": { "$ref": "#/definitions/KlingVideoO1CreateResponse" } }, "400": { "description": "请求参数错误", "headers": {}, "x-apifox-name": "请求有误", "x-apifox-ordering": 1, "schema": { "type": "object", "properties": {}, "x-apifox-ignore-properties": [], "x-apifox-orders": [] } }, "401": { "description": "未授权 - API Key 无效或缺失", "headers": {}, "x-apifox-name": "未认证", "x-apifox-ordering": 2, "schema": { "type": "object", "properties": {}, "x-apifox-ignore-properties": [], "x-apifox-orders": [] } } }, "security": [], "x-apifox-folder": "视频/kling-v3-omni", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178030-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/v1/videos/{id}": { "get": { "summary": "查询视频生成状态", "deprecated": false, "description": "根据视频任务 ID 查询 kling-v3-omni 模型的视频生成状态和结果。建议定期轮询直到状态变为 completed 或 failed。", "operationId": "getVideoStatusKlingO1", "tags": [ "视频/kling-v3-omni" ], "parameters": [ { "name": "id", "in": "path", "description": "视频任务 ID,创建视频时返回的 id 字段", "required": true, "type": "string", "x-example": "qvideo-user123-1766391125174150336" } ], "responses": { "200": { "description": "成功获取视频任务状态", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "schema": { "$ref": "#/definitions/KlingVideoO1StatusResponse" } }, "401": { "description": "未授权 - API Key 无效或缺失", "headers": {}, "x-apifox-name": "未认证", "x-apifox-ordering": 1, "schema": { "type": "object", "properties": {}, "x-apifox-ignore-properties": [], "x-apifox-orders": [] } }, "404": { "description": "视频任务不存在", "headers": {}, "x-apifox-name": "未找到", "x-apifox-ordering": 2, "schema": { "type": "object", "properties": {}, "x-apifox-ignore-properties": [], "x-apifox-orders": [] } } }, "security": [], "x-apifox-folder": "视频/kling-v3-omni", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178031-run", "produces": [ "application/json" ] } }, "/v1/videos/{id}/remix": { "post": { "summary": "视频 Remix", "deprecated": false, "description": "基于已完成的视频任务,使用新的提示词重新生成视频。保持原视频的时长和分辨率。", "operationId": "remixVideo", "tags": [ "视频/sora-2-pro", "视频/Sora" ], "parameters": [ { "name": "id", "in": "path", "description": "原视频任务 ID(必须是已完成的视频任务)", "required": true, "type": "string", "x-example": "qvideo-user123-1766453713089395279" }, { "required": true, "name": "body", "in": "body", "schema": { "type": "object", "required": [ "prompt" ], "properties": { "prompt": { "type": "string", "description": "新的视频生成提示词,最大 2500 字符。描述希望在新视频中呈现的变化、风格或效果。", "maxLength": 2500, "example": "将场景改为夜晚,增加霓虹灯效果,赛博朋克风格" } }, "x-apifox-orders": [ "prompt" ], "x-apifox-ignore-properties": [] } } ], "responses": { "200": { "description": "Remix 任务创建成功", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "id": "qvideo-user123-1766454050923137689", "object": "video", "model": "sora-2", "status": "queued", "created_at": 1766454050, "updated_at": 1766454050, "seconds": "4", "size": "1280x720", "remixed_from_video_id": "qvideo-user123-1766453713089395279" } }, "schema": { "type": "object", "properties": {}, "x-apifox-orders": [], "x-apifox-ignore-properties": [] } }, "400": { "description": "请求参数错误或原视频未完成", "headers": {}, "x-apifox-name": "请求有误", "x-apifox-ordering": 1, "schema": { "type": "object", "properties": {}, "x-apifox-orders": [], "x-apifox-ignore-properties": [] } }, "404": { "description": "原视频任务不存在", "headers": {}, "x-apifox-name": "未找到", "x-apifox-ordering": 2, "schema": { "type": "object", "properties": {}, "x-apifox-orders": [], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "视频/sora-2-pro", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178019-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/queue/fal-ai/vidu/q1/text-to-video": { "post": { "summary": "创建文生视频任务", "deprecated": false, "description": "创建文生视频任务,返回任务ID和查询任务状态及结果的URL", "tags": [ "视频/viduq1", "视频/Vidu" ], "parameters": [ { "name": "Content-Type", "in": "header", "description": "", "required": false, "type": "string", "x-example": "application/json" }, { "required": true, "name": "body", "in": "body", "schema": { "type": "object", "properties": { "prompt": { "type": "string", "description": "文本提示词\n生成视频的文本描述。\n注:字符长度不能超过 2000 个字符" }, "style": { "type": "string", "description": "风格\n默认 general,可选值:general、anime\ngeneral:通用风格,可以通过提示词来控制风格\nanime:动漫风格,仅在动漫风格表现突出,可以通过不同的动漫风格提示词来控制\n注:使用q2模型时该参数不生效" }, "seed": { "type": "integer", "description": "随机种子\n当默认不传或者传0时,会使用随机数替代\n手动设置则使用设置的种子" }, "duration": { "type": "integer", "description": "视频时长参数\n默认5秒,可选:5" }, "resolution": { "type": "string", "description": "分辨率参数,默认值依据模型和视频时长而定:\nviduq1(5秒):默认 1080p,可选:1080p" }, "aspect_ratio": { "type": "string", "description": "比例\n默认 16:9,可选值:16:9、9:16、3:4、4:3、1:1\n注:3:4、4:3仅支持q2模型" }, "movement_amplitude": { "type": "string", "description": "运动幅度\n默认 auto,可选值:auto、small、medium、large" }, "bgm": { "type": "boolean", "description": "是否为生成的视频添加背景音乐。\n默认:false,可选值 true 、false\n传 true 时系统将从预设 BGM 库中自动挑选合适的音乐并添加;不传或为 false 则不添加 BGM。\nBGM不限制时长,系统根据视频时长自动适配" } }, "required": [ "prompt", "aspect_ratio", "bgm" ], "x-apifox-orders": [ "prompt", "style", "seed", "duration", "resolution", "aspect_ratio", "movement_amplitude", "bgm" ], "x-apifox-ignore-properties": [] } } ], "responses": { "200": { "description": "", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "status": "IN_QUEUE", "request_id": "qvideo-root-1770718628185826174", "response_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174", "status_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174/status", "cancel_url": "" } }, "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "视频任务状态" }, "request_id": { "type": "string", "description": "视频任务唯一 ID" }, "response_url": { "type": "string", "description": "查询任务结果的URL" }, "status_url": { "type": "string", "description": "查询任务状态的URL" }, "cancel_url": { "type": "string", "description": "取消任务的URL(暂未支持)" } }, "required": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "视频/viduq1", "x-apifox-status": "developing", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178032-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/queue/fal-ai/vidu/q1/reference-to-video": { "post": { "summary": "创建参考生视频任务-主体调用(支持音视频功能)", "deprecated": false, "description": "创建参考生视频任务参考生视频分为音视频直出、视频直出功能,二者使用相同的接口地址与请求方式,请求体不同,参考下方示例。\n参考生视频-音视频直出:您可以指定视频中的主体用台词对话,直接生成完整的音视频;\n参考生视频-视频直出:为视频的场景配置对应背景音乐,不含台词;\n返回任务ID和查询任务状态及结果的URL", "tags": [ "视频/viduq1", "视频/Vidu" ], "parameters": [ { "name": "Content-Type", "in": "header", "description": "", "required": false, "type": "string", "x-example": "application/json" }, { "required": true, "name": "body", "in": "body", "schema": { "type": "object", "properties": { "prompt": { "type": "string", "description": "文本提示词\n生成视频的文本描述。\n注1:字符长度不能超过 2000 个字符\n注2:使用sujects主体参数时,可以通过@主体id 来表示主体内容,例如:\"@1 和 @2 在一起吃火锅,并且旁白音说火锅大家都爱吃。\"" }, "subjects": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "主体id,后续生成时可以通过@主体id的方式使用" }, "images": { "type": "array", "items": { "type": "string" }, "description": "该主体对应的图片url,每个主体最多支持3张图片\n注1:支持传入图片 Base64 编码或图片URL(确保可访问)\n注2:图片支持 png、jpeg、jpg、webp格式\n注3:图片像素不能小于 128*128,且比例需要小于1:4或者4:1,且大小不超过50M。\n注4:请注意,http请求的post body不超过20MB,且编码必须包含适当的内容类型字符串,例如:\ndata:image/png;base64,{base64_encode}" }, "voice_id": { "type": "string", "description": "音色ID用来决定视频中的声音音色,为空时系统会自动推荐,可选枚举值参考列表:新音色列表\n或者您可以使用声音复刻API来复刻任意音色,voice_id可以互通" } }, "required": [ "id", "images", "voice_id" ], "x-apifox-orders": [ "id", "images", "voice_id" ], "x-apifox-ignore-properties": [] }, "description": "图片主体信息支持1-7个主体,主体图片共1 ~ 7张" }, "seed": { "type": "integer", "description": "随机种子\n当默认不传或者传0时,会使用随机数替代\n手动设置则使用设置的种子" }, "audio": { "type": "boolean", "description": "是否使用音视频直出能力,可选值 true、false\ntrue:使用音视频直出能力。\nfalse:不使用音视频直出能力。\n使用subjects参数调用音视频直出能力时选用" }, "duration": { "type": "integer", "description": "视频时长参数\n默认5秒,可选:5" }, "resolution": { "type": "string", "description": "分辨率参数,默认值依据模型和视频时长而定:\nviduq1(5秒):默认 1080p,可选:1080p" }, "movement_amplitude": { "type": "string", "description": "运动幅度\n默认 auto,可选值:auto、small、medium、large" }, "aspect_ratio": { "type": "string", "description": "比例\n默认 16:9,可选值:16:9、9:16、3:4、4:3、1:1\n注:3:4、4:3仅支持q2模型" }, "bgm": { "type": "boolean", "description": "是否为生成的视频添加背景音乐。\n默认:false,可选值 true 、false\n传 true 时系统将从预设 BGM 库中自动挑选合适的音乐并添加;不传或为 false 则不添加 BGM。\nBGM不限制时长,系统根据视频时长自动适配" } }, "required": [ "prompt", "subjects", "duration", "resolution", "movement_amplitude", "aspect_ratio", "bgm" ], "x-apifox-orders": [ "prompt", "subjects", "seed", "audio", "duration", "resolution", "movement_amplitude", "aspect_ratio", "bgm" ], "x-apifox-ignore-properties": [] } } ], "responses": { "200": { "description": "", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "status": "IN_QUEUE", "request_id": "qvideo-root-1770718628185826174", "response_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174", "status_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174/status", "cancel_url": "" } }, "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "视频任务状态" }, "request_id": { "type": "string", "description": "视频任务唯一 ID" }, "response_url": { "type": "string", "description": "查询任务结果的URL" }, "status_url": { "type": "string", "description": "查询任务状态的URL" }, "cancel_url": { "type": "string", "description": "取消任务的URL(暂未支持)" } }, "required": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "视频/viduq1", "x-apifox-status": "developing", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178034-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/queue/fal-ai/vidu/requests/{request_id}/status": { "get": { "summary": "查询任务状态", "deprecated": false, "description": "根据request_id查询视频任务的状态", "tags": [ "视频/viduq2-turbo" ], "parameters": [ { "name": "request_id", "in": "path", "description": "", "required": true, "type": "string" } ], "responses": { "200": { "description": "", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "status": "COMPLETED", "request_id": "qvideo-root-1770720203757316283", "response_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770720203757316283", "status_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770720203757316283/status", "cancel_url": "", "metrics": { "inference_time": 2252 }, "result": { "video": { "url": "https://aitoken-video.qnaigc.com/root/qvideo-root-1770720203757316283/1.mp4?e=1771327255&token=IDB69r4gicDbMd9Fbmn9w2bWuEENg9i5_yasXqhp:ak0Qh973b2_JYshnkbvwG87rakI=", "content_type": "video/mp4" } } } }, "schema": { "type": "object", "properties": { "status": { "type": "string" }, "request_id": { "type": "string" }, "response_url": { "type": "string" }, "status_url": { "type": "string" }, "cancel_url": { "type": "string" }, "metrics": { "type": "object", "properties": { "inference_time": { "type": "integer" } }, "required": [ "inference_time" ], "x-apifox-orders": [ "inference_time" ], "x-apifox-ignore-properties": [] }, "result": { "type": "object", "properties": { "video": { "type": "object", "properties": { "url": { "type": "string" }, "content_type": { "type": "string" } }, "required": [ "url", "content_type" ], "x-apifox-orders": [ "url", "content_type" ], "x-apifox-ignore-properties": [] } }, "required": [ "video" ], "x-apifox-orders": [ "video" ], "x-apifox-ignore-properties": [] } }, "required": [ "status", "request_id", "response_url", "status_url", "cancel_url", "metrics", "result" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url", "metrics", "result" ], "x-apifox-ignore-properties": [] } }, "202": { "description": "", "headers": {}, "x-apifox-name": "已接受", "x-apifox-ordering": 1, "examples": { "application/json": { "status": "IN_PROGRESS", "request_id": "qvideo-root-1770893175562127288", "response_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770893175562127288", "status_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770893175562127288/status", "cancel_url": "", "queue_position": 0, "logs": null } }, "schema": { "type": "object", "properties": { "status": { "type": "string" }, "request_id": { "type": "string" }, "response_url": { "type": "string" }, "status_url": { "type": "string" }, "cancel_url": { "type": "string" }, "queue_position": { "type": "integer" }, "logs": { "type": "null" } }, "required": [ "status", "request_id", "response_url", "status_url", "cancel_url", "queue_position", "logs" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url", "queue_position", "logs" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "视频/viduq2-turbo", "x-apifox-status": "developing", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178048-run", "produces": [ "application/json" ] } }, "/queue/fal-ai/vidu/requests/{request_id}": { "get": { "summary": "查询任务结果", "deprecated": false, "description": "根据request_id查询视频任务的结果", "tags": [ "视频/viduq2-turbo" ], "parameters": [ { "name": "request_id", "in": "path", "description": "", "required": true, "type": "string" } ], "responses": { "200": { "description": "", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "video": { "url": "https://aitoken-video.qnaigc.com/root/qvideo-root-1770708425639493000/1.mp4?e=1771314526&token=IDB69r4gicDbMd9Fbmn9w2bWuEENg9i5_yasXqhp:fw2OIbh4wSMbl5UA1VxIf-y-kP0=", "content_type": "video/mp4" } } }, "schema": { "type": "object", "properties": { "video": { "type": "object", "properties": { "url": { "type": "string" }, "content_type": { "type": "string" } }, "required": [ "url", "content_type" ], "x-apifox-orders": [ "url", "content_type" ], "x-apifox-ignore-properties": [] } }, "required": [ "video" ], "x-apifox-orders": [ "video" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "视频/viduq2-turbo", "x-apifox-status": "developing", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178049-run", "produces": [ "application/json" ] } }, "/queue/fal-ai/vidu/q2/text-to-video": { "post": { "summary": "创建文生视频任务", "deprecated": false, "description": "创建文生视频任务,返回任务ID和查询任务状态及结果的URL", "tags": [ "视频/viduq2", "视频/Vidu" ], "parameters": [ { "name": "Content-Type", "in": "header", "description": "", "required": false, "type": "string", "x-example": "application/json" }, { "required": true, "name": "body", "in": "body", "schema": { "type": "object", "properties": { "prompt": { "type": "string", "description": "文本提示词\n生成视频的文本描述。\n注:字符长度不能超过 2000 个字符" }, "style": { "type": "string", "description": "风格\n默认 general,可选值:general、anime\ngeneral:通用风格,可以通过提示词来控制风格\nanime:动漫风格,仅在动漫风格表现突出,可以通过不同的动漫风格提示词来控制\n注:使用q2模型时该参数不生效" }, "seed": { "type": "integer", "description": "随机种子\n当默认不传或者传0时,会使用随机数替代\n手动设置则使用设置的种子" }, "duration": { "type": "integer", "description": "视频时长参数\n默认5秒,可选:1-10" }, "resolution": { "type": "string", "description": "分辨率参数,默认值依据模型和视频时长而定:\nviduq1(5秒):默认 1080p,可选:1080p" }, "aspect_ratio": { "type": "string", "description": "比例\n默认 16:9,可选值:16:9、9:16、3:4、4:3、1:1\n注:3:4、4:3仅支持q2模型" }, "movement_amplitude": { "type": "string", "description": "运动幅度\n默认 auto,可选值:auto、small、medium、large" }, "bgm": { "type": "boolean", "description": "是否为生成的视频添加背景音乐。\n默认:false,可选值 true 、false\n传 true 时系统将从预设 BGM 库中自动挑选合适的音乐并添加;不传或为 false 则不添加 BGM。\nBGM不限制时长,系统根据视频时长自动适配" } }, "required": [ "prompt", "aspect_ratio", "bgm" ], "x-apifox-orders": [ "prompt", "style", "seed", "duration", "resolution", "aspect_ratio", "movement_amplitude", "bgm" ], "x-apifox-ignore-properties": [] } } ], "responses": { "200": { "description": "", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "status": "IN_QUEUE", "request_id": "qvideo-root-1770718628185826174", "response_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174", "status_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174/status", "cancel_url": "" } }, "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "视频任务状态" }, "request_id": { "type": "string", "description": "视频任务唯一 ID" }, "response_url": { "type": "string", "description": "查询任务结果的URL" }, "status_url": { "type": "string", "description": "查询任务状态的URL" }, "cancel_url": { "type": "string", "description": "取消任务的URL(暂未支持)" } }, "required": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "视频/viduq2", "x-apifox-status": "developing", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178037-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/queue/fal-ai/vidu/q2/reference-to-video": { "post": { "summary": "创建参考生视频任务-主体调用(支持音视频功能)", "deprecated": false, "description": "创建参考生视频任务参考生视频分为音视频直出、视频直出功能,二者使用相同的接口地址与请求方式,请求体不同,参考下方示例。\n参考生视频-音视频直出:您可以指定视频中的主体用台词对话,直接生成完整的音视频;\n参考生视频-视频直出:为视频的场景配置对应背景音乐,不含台词;\n返回任务ID和查询任务状态及结果的URL", "tags": [ "视频/viduq2", "视频/Vidu" ], "parameters": [ { "name": "Content-Type", "in": "header", "description": "", "required": false, "type": "string", "x-example": "application/json" }, { "required": true, "name": "body", "in": "body", "schema": { "type": "object", "properties": { "prompt": { "type": "string", "description": "文本提示词\n生成视频的文本描述。\n注1:字符长度不能超过 2000 个字符\n注2:使用sujects主体参数时,可以通过@主体id 来表示主体内容,例如:\"@1 和 @2 在一起吃火锅,并且旁白音说火锅大家都爱吃。\"" }, "subjects": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "主体id,后续生成时可以通过@主体id的方式使用" }, "images": { "type": "array", "items": { "type": "string" }, "description": "该主体对应的图片url,每个主体最多支持3张图片\n注1:支持传入图片 Base64 编码或图片URL(确保可访问)\n注2:图片支持 png、jpeg、jpg、webp格式\n注3:图片像素不能小于 128*128,且比例需要小于1:4或者4:1,且大小不超过50M。\n注4:请注意,http请求的post body不超过20MB,且编码必须包含适当的内容类型字符串,例如:\ndata:image/png;base64,{base64_encode}" }, "voice_id": { "type": "string", "description": "音色ID用来决定视频中的声音音色,为空时系统会自动推荐,可选枚举值参考列表:新音色列表\n或者您可以使用声音复刻API来复刻任意音色,voice_id可以互通" } }, "required": [ "id", "images", "voice_id" ], "x-apifox-orders": [ "id", "images", "voice_id" ], "x-apifox-ignore-properties": [] }, "description": "图片主体信息支持1-7个主体,主体图片共1 ~ 7张" }, "seed": { "type": "integer", "description": "随机种子\n当默认不传或者传0时,会使用随机数替代\n手动设置则使用设置的种子" }, "audio": { "type": "boolean", "description": "是否使用音视频直出能力,可选值 true、false\ntrue:使用音视频直出能力。\nfalse:不使用音视频直出能力。\n使用subjects参数调用音视频直出能力时选用" }, "duration": { "type": "integer", "description": "视频时长参数\n默认5秒,可选:5" }, "resolution": { "type": "string", "description": "分辨率参数,默认值依据模型和视频时长而定:\nviduq1(5秒):默认 1080p,可选:1080p" }, "movement_amplitude": { "type": "string", "description": "运动幅度\n默认 auto,可选值:auto、small、medium、large" }, "aspect_ratio": { "type": "string", "description": "比例\n默认 16:9,可选值:16:9、9:16、3:4、4:3、1:1\n注:3:4、4:3仅支持q2模型" }, "bgm": { "type": "boolean", "description": "是否为生成的视频添加背景音乐。\n默认:false,可选值 true 、false\n传 true 时系统将从预设 BGM 库中自动挑选合适的音乐并添加;不传或为 false 则不添加 BGM。\nBGM不限制时长,系统根据视频时长自动适配" } }, "required": [ "prompt", "subjects", "duration", "resolution", "movement_amplitude", "aspect_ratio", "bgm" ], "x-apifox-orders": [ "prompt", "subjects", "seed", "audio", "duration", "resolution", "movement_amplitude", "aspect_ratio", "bgm" ], "x-apifox-ignore-properties": [] } } ], "responses": { "200": { "description": "", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "status": "IN_QUEUE", "request_id": "qvideo-root-1770718628185826174", "response_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174", "status_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174/status", "cancel_url": "" } }, "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "视频任务状态" }, "request_id": { "type": "string", "description": "视频任务唯一 ID" }, "response_url": { "type": "string", "description": "查询任务结果的URL" }, "status_url": { "type": "string", "description": "查询任务状态的URL" }, "cancel_url": { "type": "string", "description": "取消任务的URL(暂未支持)" } }, "required": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "视频/viduq2", "x-apifox-status": "developing", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178039-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/queue/fal-ai/vidu/q2/image-to-video/pro": { "post": { "summary": "创建图生视频任务", "deprecated": false, "description": "创建图生视频任务,返回任务ID和查询任务状态及结果的URL", "tags": [ "视频/viduq2-pro", "视频/Vidu" ], "parameters": [ { "name": "Content-Type", "in": "header", "description": "", "required": false, "type": "string", "x-example": "application/json" }, { "required": true, "name": "body", "in": "body", "schema": { "type": "object", "properties": { "prompt": { "type": "string", "description": "文本提示词\n生成视频的文本描述。\n注:字符长度不能超过 2000 个字符" }, "image_url": { "type": "string", "description": "首帧图像\n模型将以此参数中传入的图片为首帧画面来生成视频。\n注1:支持传入图片 Base64 编码或图片URL(确保可访问);\n注2:只支持输入 1 张图;\n注3:图片支持 png、jpeg、jpg、webp格式;\n注4:图片比例需要小于 1:4 或者 4:1 ;\n注5:图片大小不超过 50 MB;\n注6:请注意,http请求的post body不超过20MB,且编码必须包含适当的内容类型字符串,例如:\ndata:image/png;base64,{base64_encode}" }, "audio": { "type": "boolean", "description": "是否使用音视频直出能力,默认为false,枚举值为:\n- false:不需要音视频直出,输出静音视频\n- true:需要音视频直出,输出带台词以及背景音的视频\n注1:该参数为true时,voice_id参数才生效\n注2:该参数为true时,仅q3模型支持错峰\n注3:当model 为q3 时,该参数默认值为true" }, "voice_id": { "type": "string", "description": "音色id,q3模型不生效\n用来决定视频中的声音音色,为空时系统会自动推荐,可选枚举值参考列表:新音色列表\n同时您可以使用声音复刻API来复刻任意音色,voice_id可以互通" }, "is_rec": { "type": "boolean", "description": "是否使用推荐提示词\n- true:是,由系统自动推荐提示词,并使用提示词内容生成视频,推荐提示词数量=1\n- false:否,根据输入的prompt生成视频\n注意:启用推荐提示词后,每个任务多消耗10积分" }, "seed": { "type": "integer", "description": "随机种子\n当默认不传或者传0时,会使用随机数替代\n手动设置则使用设置的种子" }, "duration": { "type": "integer", "description": "视频时长参数\n默认5秒,可选:5" }, "resolution": { "type": "string", "description": "分辨率参数,默认值依据模型和视频时长而定:\nviduq1(5秒):默认 1080p,可选:1080p" }, "movement_amplitude": { "type": "string", "description": "运动幅度\n默认 auto,可选值:auto、small、medium、large" } }, "required": [ "image_url" ], "x-apifox-orders": [ "prompt", "image_url", "audio", "voice_id", "is_rec", "seed", "duration", "resolution", "movement_amplitude" ], "x-apifox-ignore-properties": [] } } ], "responses": { "200": { "description": "", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "status": "IN_QUEUE", "request_id": "qvideo-root-1770718628185826174", "response_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174", "status_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174/status", "cancel_url": "" } }, "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "视频任务状态" }, "request_id": { "type": "string", "description": "视频任务唯一 ID" }, "response_url": { "type": "string", "description": "查询任务结果的URL" }, "status_url": { "type": "string", "description": "查询任务状态的URL" }, "cancel_url": { "type": "string", "description": "取消任务的URL(暂未支持)" } }, "required": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "视频/viduq2-pro", "x-apifox-status": "developing", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178042-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/queue/fal-ai/vidu/q2/start-end-to-video/pro": { "post": { "summary": "创建首尾帧生视频任务", "deprecated": false, "description": "创建首尾帧生视频任务,返回任务ID和查询任务状态及结果的URL", "tags": [ "视频/viduq2-pro", "视频/Vidu" ], "parameters": [ { "name": "Content-Type", "in": "header", "description": "", "required": false, "type": "string", "x-example": "application/json" }, { "required": true, "name": "body", "in": "body", "schema": { "type": "object", "properties": { "prompt": { "type": "string", "description": "文本提示词\n生成视频的文本描述。\n注:字符长度不能超过 2000 个字符" }, "start_image_url": { "type": "string", "description": "首帧图像\n模型将以此参数中传入的图片为首帧画面来生成视频。\n注1:支持传入图片 Base64 编码或图片URL(确保可访问);\n注2:只支持输入 1 张图;\n注3:图片支持 png、jpeg、jpg、webp格式;\n注4:图片比例需要小于 1:4 或者 4:1 ;\n注5:图片大小不超过 50 MB;\n注6:请注意,http请求的post body不超过20MB,且编码必须包含适当的内容类型字符串,例如:\ndata:image/png;base64,{base64_encode}" }, "end_image_url": { "type": "string", "description": "尾帧图像\n模型将以此参数中传入的图片为尾帧画面来生成视频。要求同上" }, "is_rec": { "type": "boolean", "description": "是否使用推荐提示词\n- true:是,由系统自动推荐提示词,并使用提示词内容生成视频,推荐提示词数量=1\n- false:否,根据输入的prompt生成视频\n注意:启用推荐提示词后,每个任务多消耗10积分" }, "seed": { "type": "integer", "description": "随机种子\n当默认不传或者传0时,会使用随机数替代\n手动设置则使用设置的种子" }, "duration": { "type": "integer", "description": "视频时长参数\n默认5秒,可选:5" }, "resolution": { "type": "string", "description": "分辨率参数,默认值依据模型和视频时长而定:\nviduq1(5秒):默认 1080p,可选:1080p" }, "movement_amplitude": { "type": "string", "description": "运动幅度\n默认 auto,可选值:auto、small、medium、large" } }, "required": [ "start_image_url", "end_image_url" ], "x-apifox-orders": [ "prompt", "start_image_url", "end_image_url", "is_rec", "seed", "duration", "resolution", "movement_amplitude" ], "x-apifox-ignore-properties": [] } } ], "responses": { "200": { "description": "", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "status": "IN_QUEUE", "request_id": "qvideo-root-1770718628185826174", "response_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174", "status_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174/status", "cancel_url": "" } }, "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "视频任务状态" }, "request_id": { "type": "string", "description": "视频任务唯一 ID" }, "response_url": { "type": "string", "description": "查询任务结果的URL" }, "status_url": { "type": "string", "description": "查询任务状态的URL" }, "cancel_url": { "type": "string", "description": "取消任务的URL(暂未支持)" } }, "required": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "视频/viduq2-pro", "x-apifox-status": "developing", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178043-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/queue/fal-ai/vidu/q2/image-to-video/turbo": { "post": { "summary": "创建图生视频任务", "deprecated": false, "description": "创建图生视频任务,返回任务ID和查询任务状态及结果的URL", "tags": [ "视频/viduq2-turbo", "视频/Vidu" ], "parameters": [ { "name": "Content-Type", "in": "header", "description": "", "required": false, "type": "string", "x-example": "application/json" }, { "required": true, "name": "body", "in": "body", "schema": { "type": "object", "properties": { "prompt": { "type": "string", "description": "文本提示词\n生成视频的文本描述。\n注:字符长度不能超过 2000 个字符" }, "image_url": { "type": "string", "description": "首帧图像\n模型将以此参数中传入的图片为首帧画面来生成视频。\n注1:支持传入图片 Base64 编码或图片URL(确保可访问);\n注2:只支持输入 1 张图;\n注3:图片支持 png、jpeg、jpg、webp格式;\n注4:图片比例需要小于 1:4 或者 4:1 ;\n注5:图片大小不超过 50 MB;\n注6:请注意,http请求的post body不超过20MB,且编码必须包含适当的内容类型字符串,例如:\ndata:image/png;base64,{base64_encode}" }, "audio": { "type": "boolean", "description": "是否使用音视频直出能力,默认为false,枚举值为:\n- false:不需要音视频直出,输出静音视频\n- true:需要音视频直出,输出带台词以及背景音的视频\n注1:该参数为true时,voice_id参数才生效\n注2:该参数为true时,仅q3模型支持错峰\n注3:当model 为q3 时,该参数默认值为true" }, "voice_id": { "type": "string", "description": "音色id,q3模型不生效\n用来决定视频中的声音音色,为空时系统会自动推荐,可选枚举值参考列表:新音色列表\n同时您可以使用声音复刻API来复刻任意音色,voice_id可以互通" }, "is_rec": { "type": "boolean", "description": "是否使用推荐提示词\n- true:是,由系统自动推荐提示词,并使用提示词内容生成视频,推荐提示词数量=1\n- false:否,根据输入的prompt生成视频\n注意:启用推荐提示词后,每个任务多消耗10积分" }, "seed": { "type": "integer", "description": "随机种子\n当默认不传或者传0时,会使用随机数替代\n手动设置则使用设置的种子" }, "duration": { "type": "integer", "description": "视频时长参数\n默认5秒,可选:5" }, "resolution": { "type": "string", "description": "分辨率参数,默认值依据模型和视频时长而定:\nviduq1(5秒):默认 1080p,可选:1080p" }, "movement_amplitude": { "type": "string", "description": "运动幅度\n默认 auto,可选值:auto、small、medium、large" } }, "required": [ "prompt", "audio", "voice_id", "is_rec" ], "x-apifox-orders": [ "prompt", "image_url", "audio", "voice_id", "is_rec", "seed", "duration", "resolution", "movement_amplitude" ], "x-apifox-ignore-properties": [] } } ], "responses": { "200": { "description": "", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "status": "IN_QUEUE", "request_id": "qvideo-root-1770718628185826174", "response_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174", "status_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174/status", "cancel_url": "" } }, "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "视频任务状态" }, "request_id": { "type": "string", "description": "视频任务唯一 ID" }, "response_url": { "type": "string", "description": "查询任务结果的URL" }, "status_url": { "type": "string", "description": "查询任务状态的URL" }, "cancel_url": { "type": "string", "description": "取消任务的URL(暂未支持)" } }, "required": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "视频/viduq2-turbo", "x-apifox-status": "developing", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178046-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/queue/fal-ai/vidu/q2/start-end-to-video/turbo": { "post": { "summary": "创建首尾帧生视频任务", "deprecated": false, "description": "创建首尾帧生视频任务,返回任务ID和查询任务状态及结果的URL", "tags": [ "视频/viduq2-turbo", "视频/Vidu" ], "parameters": [ { "name": "Content-Type", "in": "header", "description": "", "required": false, "type": "string", "x-example": "application/json" }, { "required": true, "name": "body", "in": "body", "schema": { "type": "object", "properties": { "prompt": { "type": "string", "description": "文本提示词\n生成视频的文本描述。\n注:字符长度不能超过 2000 个字符" }, "start_image_url": { "type": "string", "description": "首帧图像\n模型将以此参数中传入的图片为首帧画面来生成视频。\n注1:支持传入图片 Base64 编码或图片URL(确保可访问);\n注2:只支持输入 1 张图;\n注3:图片支持 png、jpeg、jpg、webp格式;\n注4:图片比例需要小于 1:4 或者 4:1 ;\n注5:图片大小不超过 50 MB;\n注6:请注意,http请求的post body不超过20MB,且编码必须包含适当的内容类型字符串,例如:\ndata:image/png;base64,{base64_encode}" }, "end_image_url": { "type": "string", "description": "尾帧图像\n模型将以此参数中传入的图片为尾帧画面来生成视频。要求同上" }, "is_rec": { "type": "boolean", "description": "是否使用推荐提示词\n- true:是,由系统自动推荐提示词,并使用提示词内容生成视频,推荐提示词数量=1\n- false:否,根据输入的prompt生成视频\n注意:启用推荐提示词后,每个任务多消耗10积分" }, "seed": { "type": "integer", "description": "随机种子\n当默认不传或者传0时,会使用随机数替代\n手动设置则使用设置的种子" }, "duration": { "type": "integer", "description": "视频时长参数\n默认5秒,可选:5" }, "resolution": { "type": "string", "description": "分辨率参数,默认值依据模型和视频时长而定:\nviduq1(5秒):默认 1080p,可选:1080p" }, "movement_amplitude": { "type": "string", "description": "运动幅度\n默认 auto,可选值:auto、small、medium、large" } }, "required": [ "start_image_url", "end_image_url" ], "x-apifox-orders": [ "prompt", "start_image_url", "end_image_url", "is_rec", "seed", "duration", "resolution", "movement_amplitude" ], "x-apifox-ignore-properties": [] } } ], "responses": { "200": { "description": "", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "status": "IN_QUEUE", "request_id": "qvideo-root-1770718628185826174", "response_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174", "status_url": "https://api.qnaigc.com/queue/fal-ai/vidu/requests/qvideo-root-1770718628185826174/status", "cancel_url": "" } }, "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "视频任务状态" }, "request_id": { "type": "string", "description": "视频任务唯一 ID" }, "response_url": { "type": "string", "description": "查询任务结果的URL" }, "status_url": { "type": "string", "description": "查询任务状态的URL" }, "cancel_url": { "type": "string", "description": "取消任务的URL(暂未支持)" } }, "required": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "视频/viduq2-turbo", "x-apifox-status": "developing", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178047-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/v1/videos/generations": { "post": { "summary": "创建视频生成任务", "deprecated": false, "description": "提交一个异步视频生成任务。任务创建成功后返回任务 ID,可通过 GET `/videos/generations/{id}` 查询任务状态和结果。\n\n支持以下生成模式:\n- **文生视频**:仅提供 prompt\n- **图生视频**:提供 prompt + image\n- **参考图片生成**:提供 prompt + referenceImages(仅 veo-2.0-generate-exp 和 veo-3.1-generate-preview 支持)\n\n**回调通知**:可选设置 `callback_url`,任务到达终态(Completed / Failed)时,系统会向该 URL 发送 HTTP POST 请求,payload 结构与 GET 查询接口响应一致。最多重试 3 次(指数退避 2s → 4s),4xx 客户端错误不重试。\n\n\ncallback的消息体和查询接口一致,参考:\n```json\n{\n \"id\": \"chatvideo-1772778462403778814-root\",\n \"model\": \"veo-3.0-generate-preview\",\n \"status\": \"Completed\",\n \"message\": \"完成\",\n \"data\": {\n \"videos\": [\n {\n \"url\": \"https://aitoken-video.qnaigc.com/root/out-chatvideo-1772778462403778814-root/sample_0.mp4?e=1773988232&token=IDB69r4gicDbMd9Fbmn9w2bWuEENg9i5_yasXqhp:P5Y96rq6S2wkU8PCp7gqqGLVhbM=\",\n \"mimeType\": \"video/mp4\"\n }\n ]\n },\n \"created_at\": \"2026-03-06T14:27:42+08:00\",\n \"updated_at\": \"2026-03-06T14:30:32.811531241+08:00\"\n}\n```", "operationId": "createVideoGeneration", "tags": [ "视频/Veo", "视频生成" ], "parameters": [ { "required": true, "name": "body", "in": "body", "schema": { "$ref": "#/definitions/CreateVideoGenerationRequest" } } ], "responses": { "200": { "description": "任务创建成功,返回任务 ID", "headers": {}, "x-apifox-ordering": 0, "examples": { "application/json": { "id": "chatvideo-1709712000000000000-uid123" } }, "schema": { "$ref": "#/definitions/CreateVideoGenerationResponse" } }, "400": { "description": "请求参数错误", "headers": {}, "x-apifox-ordering": 1, "schema": { "$ref": "#/definitions/ErrorResponse" } }, "401": { "description": "认证失败", "headers": {}, "x-apifox-ordering": 2, "examples": { "application/json": { "error": { "message": "access denied for invalid api key", "type": "authentication_error" } } }, "schema": { "$ref": "#/definitions/ErrorResponse" } }, "403": { "description": "API Key 额度不足", "headers": {}, "x-apifox-ordering": 3, "examples": { "application/json": { "error": { "message": "quota exceeded", "type": "quota_exceeded" } } }, "schema": { "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "服务器内部错误", "headers": {}, "x-apifox-ordering": 4, "examples": { "application/json": { "error": { "message": "internal server error", "type": "create_vertex_job_withdb_failed" } } }, "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "security": [], "x-apifox-folder": "视频/Veo", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178050-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/v1/videos/generations/{id}": { "get": { "summary": "查询视频生成任务", "deprecated": false, "description": "通过任务 ID 查询视频生成任务的状态和结果。任务完成后,响应中的 `data.videos` 字段包含生成的视频下载链接(有效期 14 天)。", "operationId": "getVideoGeneration", "tags": [ "视频/Veo", "视频生成" ], "parameters": [ { "name": "id", "in": "path", "description": "任务 ID,由创建任务接口返回", "required": true, "type": "string", "x-example": "chatvideo-1709712000000000000-uid123" } ], "responses": { "200": { "description": "查询成功,返回任务详情", "headers": {}, "x-apifox-ordering": 0, "schema": { "$ref": "#/definitions/VideoGenerationJobInfo" } }, "401": { "description": "认证失败", "headers": {}, "x-apifox-ordering": 1, "examples": { "application/json": { "error": { "message": "access denied for invalid api key", "type": "authentication_error" } } }, "schema": { "$ref": "#/definitions/ErrorResponse" } }, "500": { "description": "服务器内部错误", "headers": {}, "x-apifox-ordering": 2, "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "security": [], "x-apifox-folder": "视频/Veo", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178051-run", "produces": [ "application/json" ] } }, "/queue/fal-ai/veo3.1/fast/image-to-video": { "post": { "summary": "创建图生视频任务", "deprecated": false, "description": "", "tags": [ "视频/veo-3.1-fast-generate-001" ], "parameters": [ { "required": true, "name": "body", "in": "body", "schema": { "$ref": "#/definitions/Veo31FastImageToVideoInput" } } ], "responses": { "200": { "description": "The request status.", "headers": {}, "x-apifox-ordering": 0, "schema": { "$ref": "#/definitions/QueueStatus" } } }, "security": [], "x-apifox-folder": "视频/veo-3.1-fast-generate-001", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178052-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/queue/fal-ai/veo3.1/fast/image-to-video/requests/{request_id}/status": { "get": { "summary": "查询状态", "deprecated": false, "description": "", "tags": [ "视频/veo-3.1-fast-generate-001" ], "parameters": [ { "name": "request_id", "in": "path", "description": "Request ID", "required": true, "type": "string", "x-example": "" }, { "name": "logs", "in": "query", "description": "Whether to include logs (`1`) in the response or not (`0`).", "required": false, "type": "number" } ], "responses": { "200": { "description": "The request status.", "headers": {}, "x-apifox-ordering": 0, "schema": { "$ref": "#/definitions/QueueStatus" } } }, "security": [], "x-apifox-folder": "视频/veo-3.1-fast-generate-001", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178053-run", "produces": [ "application/json" ] } }, "/fal-ai/veo3.1/fast/image-to-video/requests/{request_id}": { "get": { "summary": "获取结果", "deprecated": false, "description": "", "tags": [ "视频/veo-3.1-fast-generate-001" ], "parameters": [ { "name": "request_id", "in": "path", "description": "Request ID", "required": true, "type": "string", "x-example": "" } ], "responses": { "200": { "description": "Result of the request.", "headers": {}, "x-apifox-ordering": 0, "schema": { "$ref": "#/definitions/Veo31FastImageToVideoOutput" } } }, "security": [], "x-apifox-folder": "视频/veo-3.1-fast-generate-001", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178054-run", "produces": [ "application/json" ] } }, "/v1/images/generations": { "post": { "summary": "文生图接口 - 根据文本描述生成图像", "deprecated": false, "description": "根据文本描述生成全新的图像,支持多种分辨率和宽高比配置。", "operationId": "createImageGeneration", "tags": [ "图像生成/gemini-3.1-flash-image-preview" ], "parameters": [ { "required": true, "name": "body", "in": "body", "schema": { "$ref": "#/definitions/Gemini31FlashImageGenerationRequest" } } ], "responses": { "200": { "description": "请求成功", "headers": {}, "x-apifox-ordering": 0, "schema": { "$ref": "#/definitions/ImageGenerationResponse4" } }, "400": { "description": "错误响应", "headers": {}, "x-apifox-ordering": 1, "schema": { "type": "object", "description": "错误响应体", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string", "description": "错误信息" }, "type": { "type": "string", "description": "错误类型" }, "code": { "type": "string", "description": "错误代码" } }, "x-apifox-orders": [ "message", "type", "code" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "error" ], "x-apifox-ignore-properties": [] } }, "401": { "description": "错误响应", "headers": {}, "x-apifox-ordering": 2, "schema": { "type": "object", "description": "错误响应体", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string", "description": "错误信息" }, "type": { "type": "string", "description": "错误类型" }, "code": { "type": "string", "description": "错误代码" } }, "x-apifox-orders": [ "message", "type", "code" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "error" ], "x-apifox-ignore-properties": [] } }, "500": { "description": "错误响应", "headers": {}, "x-apifox-ordering": 3, "schema": { "type": "object", "description": "错误响应体", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string", "description": "错误信息" }, "type": { "type": "string", "description": "错误类型" }, "code": { "type": "string", "description": "错误代码" } }, "x-apifox-orders": [ "message", "type", "code" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "error" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "图像生成/gemini-3.1-flash-image-preview", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178074-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/v1/images/tasks/{task_id}": { "get": { "summary": "查询任务状态", "deprecated": false, "description": "根据任务 ID 查询图像生成状态和结果", "operationId": "getKlingV21TaskStatus", "tags": [ "图像生成/kling-v2-1" ], "parameters": [ { "name": "task_id", "in": "path", "description": "图像生成任务 ID", "required": true, "type": "string", "x-example": "image-1762159125266058362-1383010xxx" } ], "responses": { "200": { "description": "查询成功", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "schema": { "$ref": "#/definitions/KlingImageTaskStatusResponse" } }, "401": { "description": "认证失败", "headers": {}, "x-apifox-name": "未认证", "x-apifox-ordering": 1, "schema": { "$ref": "#/definitions/ErrorResponse5" } }, "404": { "description": "任务不存在", "headers": {}, "x-apifox-name": "未找到", "x-apifox-ordering": 2, "schema": { "$ref": "#/definitions/ErrorResponse5" } } }, "security": [], "x-apifox-folder": "图像生成/kling-v2-1", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178066-run", "produces": [ "application/json" ] } }, "/v1/images/edits": { "post": { "summary": "图生图接口 - 基于输入图像生成新图像", "deprecated": false, "description": "基于输入图像和文本描述生成新的图像,支持图像编辑、风格转换和内容修改。", "operationId": "createImageEdit", "tags": [ "图像生成/gemini-3.1-flash-image-preview" ], "parameters": [ { "required": true, "name": "body", "in": "body", "schema": { "$ref": "#/definitions/Gemini31FlashImageEditRequest" } } ], "responses": { "200": { "description": "请求成功", "headers": {}, "x-apifox-ordering": 0, "examples": { "application/json": { "created": 1234567890, "data": [ { "b64_json": "iVBORw0KGgoAAAANSUhEUgA..." } ], "output_format": "png", "usage": { "total_tokens": 6234, "input_tokens": 1234, "output_tokens": 5000, "input_tokens_details": { "text_tokens": 234, "image_tokens": 1000 } } } }, "schema": { "$ref": "#/definitions/ImageGenerationResponse4" } }, "400": { "description": "错误响应", "headers": {}, "x-apifox-ordering": 1, "schema": { "type": "object", "description": "错误响应体", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string", "description": "错误信息" }, "type": { "type": "string", "description": "错误类型" }, "code": { "type": "string", "description": "错误代码" } }, "x-apifox-orders": [ "message", "type", "code" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "error" ], "x-apifox-ignore-properties": [] } }, "401": { "description": "错误响应", "headers": {}, "x-apifox-ordering": 2, "schema": { "type": "object", "description": "错误响应体", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string", "description": "错误信息" }, "type": { "type": "string", "description": "错误类型" }, "code": { "type": "string", "description": "错误代码" } }, "x-apifox-orders": [ "message", "type", "code" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "error" ], "x-apifox-ignore-properties": [] } }, "500": { "description": "错误响应", "headers": {}, "x-apifox-ordering": 3, "schema": { "type": "object", "description": "错误响应体", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string", "description": "错误信息" }, "type": { "type": "string", "description": "错误类型" }, "code": { "type": "string", "description": "错误代码" } }, "x-apifox-orders": [ "message", "type", "code" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "error" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "图像生成/gemini-3.1-flash-image-preview", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178075-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/queue/fal-ai/kling-image/o1": { "post": { "summary": "创建图像生成任务", "deprecated": false, "description": "创建可灵 OmniImage 图像生成任务。支持文本提示词、参考图片的多模态输入方式。任务为异步执行,创建成功后返回任务 ID,需通过查询接口获取生成结果。", "operationId": "createOmniImageTask", "tags": [ "图像生成/kling-image-o1", "图像生成" ], "parameters": [ { "required": true, "name": "body", "in": "body", "schema": { "type": "object", "x-apifox-refs": { "01KGEWR74HSCCK6CHKVY8C8B5X": { "$ref": "#/definitions/CreateOmniImageRequest", "x-apifox-overrides": { "sync_mode": null, "output_format": null, "elements": null } } }, "x-apifox-orders": [ "01KGEWR74HSCCK6CHKVY8C8B5X" ], "properties": { "prompt": { "type": "string", "description": "文本提示词,使用 <<>> 引用参考图,最大 2500 字符", "maxLength": 2500 }, "image_urls": { "type": "array", "description": "参考图 URL 列表,在 prompt 中用 <<>> 引用(1-indexed),最多 10 张", "items": { "type": "string", "format": "uri" }, "maxItems": 10 }, "resolution": { "type": "string", "description": "分辨率:1K 或 2K,默认 1K(兼容小写 1k/2k)", "enum": [ "1K", "2K", "1k", "2k" ] }, "num_images": { "type": "integer", "description": "生成数量 1-9,默认 1", "minimum": 1, "maximum": 9 }, "aspect_ratio": { "type": "string", "description": "纵横比,默认 auto", "enum": [ "auto", "16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9" ] } }, "required": [ "prompt" ], "x-apifox-ignore-properties": [ "prompt", "image_urls", "resolution", "num_images", "aspect_ratio" ] } } ], "responses": { "200": { "description": "服务器内部错误", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "status": "IN_QUEUE", "request_id": "qimage-root-1770199726278452760", "response_url": "https://api.qnaigc.com/queue/fal-ai/kling-image/requests/qimage-root-1770199726278452760", "status_url": "https://api.qnaigc.com/queue/fal-ai/kling-image/requests/qimage-root-1770199726278452760/status", "cancel_url": "" } }, "schema": { "type": "object", "properties": { "status": { "type": "string" }, "request_id": { "type": "string" }, "response_url": { "type": "string" }, "status_url": { "type": "string" }, "cancel_url": { "type": "string" } }, "required": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "图像生成/kling-image-o1", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178076-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] } }, "/queue/fal-ai/kling-image/requests/{task_id}/status": { "get": { "summary": "查询图像生成任务", "deprecated": false, "description": "根据任务 ID 查询图像生成任务的状态和结果。任务完成后,返回生成的图像 URL 列表。", "operationId": "getImageTaskInfo", "tags": [ "图像生成/kling-image-o1", "图像生成" ], "parameters": [ { "name": "task_id", "in": "path", "description": "任务 ID,由创建任务接口返回", "required": true, "type": "string", "x-example": "qimage-root-1770105770654149000" } ], "responses": { "200": { "description": "服务器内部错误", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "schema": { "type": "object", "properties": { "status": { "type": "string" }, "request_id": { "type": "string" }, "response_url": { "type": "string" }, "status_url": { "type": "string" }, "cancel_url": { "type": "string" }, "metrics": { "type": "object", "properties": { "inference_time": { "type": "integer" } }, "required": [ "inference_time" ], "x-apifox-orders": [ "inference_time" ], "x-apifox-ignore-properties": [] }, "result": { "type": "object", "properties": { "images": { "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string" }, "content_type": { "type": "string" } }, "required": [ "url", "content_type" ], "x-apifox-orders": [ "url", "content_type" ], "x-apifox-ignore-properties": [] } } }, "required": [ "images" ], "x-apifox-orders": [ "images" ], "x-apifox-ignore-properties": [] } }, "required": [ "status", "request_id", "response_url", "status_url", "cancel_url", "metrics", "result" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url", "metrics", "result" ], "x-apifox-ignore-properties": [] } }, "202": { "description": "", "headers": {}, "x-apifox-name": "已接受", "x-apifox-ordering": 2, "examples": { "application/json": { "status": "IN_QUEUE", "request_id": "qimage-root-1770893295619315911", "response_url": "https://api.qnaigc.com/queue/fal-ai/kling-image/requests/qimage-root-1770893295619315911", "status_url": "https://api.qnaigc.com/queue/fal-ai/kling-image/requests/qimage-root-1770893295619315911/status", "cancel_url": "", "queue_position": 0, "logs": null } }, "schema": { "type": "object", "properties": { "status": { "type": "string" }, "request_id": { "type": "string" }, "response_url": { "type": "string" }, "status_url": { "type": "string" }, "cancel_url": { "type": "string" }, "queue_position": { "type": "integer" }, "logs": { "type": "null" } }, "required": [ "status", "request_id", "response_url", "status_url", "cancel_url", "queue_position", "logs" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url", "queue_position", "logs" ], "x-apifox-ignore-properties": [] } }, "400": { "description": "", "headers": {}, "x-apifox-name": "请求有误", "x-apifox-ordering": 1, "examples": { "application/json": { "detail": { "type": "invalid_request_error", "message": "image job not found: qimage-root-17702006830614227446" } } }, "schema": { "type": "object", "properties": { "detail": { "type": "object", "properties": { "type": { "type": "string" }, "message": { "type": "string" } }, "required": [ "type", "message" ], "x-apifox-orders": [ "type", "message" ], "x-apifox-ignore-properties": [] } }, "required": [ "detail" ], "x-apifox-orders": [ "detail" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "图像生成/kling-image-o1", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178077-run", "produces": [ "application/json" ] } }, "/queue/fal-ai/kling-image/requests/{task_id}": { "get": { "summary": "获取结果", "deprecated": false, "description": "根据任务 ID 查询图像生成任务的状态和结果。任务完成后,返回生成的图像 URL 列表。", "operationId": "getImageTaskInfo", "tags": [ "图像生成/kling-image-o1", "图像生成" ], "parameters": [ { "name": "task_id", "in": "path", "description": "任务 ID,由创建任务接口返回", "required": true, "type": "string", "x-example": "chatimage-1704067200000000000-user123" } ], "responses": { "200": { "description": "服务器内部错误", "headers": {}, "x-apifox-name": "成功", "x-apifox-ordering": 0, "examples": { "application/json": { "images": [ { "url": "https://aitoken-video.qnaigc.com/images/root/qimage-root-1770105770654149000/0.png?e=1770710614&token=IDB69r4gicDbMd9Fbmn9w2bWuEENg9i5_yasXqhp:juaQpRC__BdIP-h8EDNgPmkk99M=", "content_type": "image/png" }, { "url": "https://aitoken-video.qnaigc.com/images/root/qimage-root-1770105770654149000/1.png?e=1770710614&token=IDB69r4gicDbMd9Fbmn9w2bWuEENg9i5_yasXqhp:uB_mVes2XTcNByHqTdXPm1VGq5A=", "content_type": "image/png" } ] } }, "schema": { "type": "object", "properties": { "images": { "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string" }, "content_type": { "type": "string" } }, "required": [ "url", "content_type" ], "x-apifox-orders": [ "url", "content_type" ], "x-apifox-ignore-properties": [] } } }, "required": [ "images" ], "x-apifox-orders": [ "images" ], "x-apifox-ignore-properties": [] } }, "400": { "description": "", "headers": {}, "x-apifox-name": "请求有误", "x-apifox-ordering": 1, "examples": { "application/json": { "status": "IN_QUEUE", "request_id": "qimage-root-1770106198254457000", "response_url": "https://localhost:8094/queue/fal-ai/kling-image/requests/qimage-root-1770106198254457000", "status_url": "https://localhost:8094/queue/fal-ai/kling-image/requests/qimage-root-1770106198254457000/status", "cancel_url": "https://localhost:8094/queue/fal-ai/kling-image/requests/qimage-root-1770106198254457000/cancel", "detail": { "message": "Request is still in progress" } } }, "schema": { "type": "object", "properties": { "status": { "type": "string" }, "request_id": { "type": "string" }, "response_url": { "type": "string" }, "status_url": { "type": "string" }, "cancel_url": { "type": "string" }, "detail": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ], "x-apifox-orders": [ "message" ], "x-apifox-ignore-properties": [] } }, "required": [ "status", "request_id", "response_url", "status_url", "cancel_url", "detail" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url", "detail" ], "x-apifox-ignore-properties": [] } } }, "security": [], "x-apifox-folder": "图像生成/kling-image-o1", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178078-run", "produces": [ "application/json" ] } }, "/v1/files": { "post": { "summary": "创建文件上传任务", "deprecated": false, "description": "### 文件上传\n\n这是一个异步文件上传导入任务。本接口专为 **Gemini 模型大文件理解场景** 优化。\n\n#### 💡 为什么使用此接口?\nVertex AI 在通过 HTTP 直接传入文件进行理解时,存在 **15MB** 的硬性限制。对于大于 15MB 的文件(如长视频、高分辨率图像),官方要求必须使用 Google Cloud Storage (GCS) 链接。\n**本接口旨在简化该流程**:您只需提供文件的公开 URL,系统将自动把文件转存至 GCS 并对接 Vertex AI,您无需自行配置或管理 GCS 存储桶。\n\n#### 接口约束\n* **支持场景**:仅适用于 Gemini 模型的大文件(>15MB)多模态理解。\n* **文件大小**:最大支持 **2GB**。\n* **网络要求**:`source_url` 必须是公网可访问的 HTTP/HTTPS 地址。\n\n#### 调用流程\n1. **提交任务**:调用本接口提交 `source_url`。\n2. **获取 ID**:接口立即返回 `file_id`,任务进入后台**异步处理**队列。\n3. **检查状态**:客户端需轮询 `GET /files/{file_id}` 接口,直到文件状态变更为 `ready` 。", "operationId": "createFile", "tags": [ "文件", "Files" ], "parameters": [ { "required": true, "name": "body", "in": "body", "schema": { "type": "object", "x-apifox-refs": { "01KH3S2XHEY7G7FCBB72DFDW7G": { "$ref": "#/definitions/CreateFileRequest", "x-apifox-overrides": { "kodo": null } } }, "x-apifox-orders": [ "01KH3S2XHEY7G7FCBB72DFDW7G" ], "properties": { "model": { "type": "string", "description": "目标模型 ID,如 gemini-2.0-flash等。\n文件将被同步到该模型所需的云存储服务。\n同系列模型创建的file_id可以共用。例如 gemini-2.0-flash 模型创建的file_id,gemini-3.0-pro-preview 也调用。", "example": "gemini-2.0-flash" }, "source_url": { "type": "string", "format": "uri", "description": "公开可访问的文件 URL(HTTP/HTTPS)。", "example": "https://example.com/documents/sample.pdf" }, "expires_in": { "type": "integer", "description": "过期时间(秒)。范围:3600(1小时)~ 604800(7天),默认 172800(48小时)", "minimum": 3600, "maximum": 604800, "default": 172800, "example": 172800 } }, "required": [ "model" ], "x-apifox-ignore-properties": [ "model", "source_url", "expires_in" ] } } ], "responses": { "201": { "description": "文件导入任务创建成功", "headers": {}, "x-apifox-ordering": 0, "examples": { "application/json": { "id": "qfile-12345-1770727746152401856-01d742", "object": "file", "status": "pending", "model": "gemini-3.0-pro-preview", "created_at": 1770727746, "expires_at": 1770900546 } }, "schema": { "$ref": "#/definitions/FileResponse" } }, "400": { "description": "", "headers": {}, "x-apifox-name": "请求有误", "x-apifox-ordering": 1, "schema": { "$ref": "#/definitions/FileError" } } }, "security": [], "x-apifox-folder": "文件", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178079-run", "consumes": [ "application/json" ], "produces": [ "application/json" ] }, "get": { "summary": "列出用户文件", "deprecated": false, "description": "获取当前用户的文件列表。支持按状态过滤和游标分页。\n\n分页使用游标方式,通过 `after` 参数传入上一页最后一条记录的 ID 来获取下一页数据。", "operationId": "listFiles", "tags": [ "文件", "Files" ], "parameters": [ { "name": "status", "in": "query", "description": "按文件状态过滤", "required": false, "enum": [ "pending", "uploading", "ready", "failed", "expired" ], "type": "string" }, { "name": "limit", "in": "query", "description": "分页大小,范围 1-100,默认 20", "required": false, "minimum": 1, "maximum": 100, "default": 20, "type": "integer" }, { "name": "after", "in": "query", "description": "游标分页参数,传入上一页最后一条记录的 ID", "required": false, "type": "string" }, { "name": "order", "in": "query", "description": "排序方向,默认按创建时间降序", "required": false, "enum": [ "asc", "desc" ], "default": "desc", "type": "string" } ], "responses": { "200": { "description": "成功返回文件列表", "headers": {}, "x-apifox-ordering": 0, "examples": { "application/json": { "object": "list", "data": [ { "id": "qfile-12345-1705382400-abc123", "object": "file", "status": "ready", "model": "gemini-2.0-flash", "created_at": 1705382400, "synced_at": 1705382450, "expires_at": 1705555200, "file_name": "sample.pdf", "file_size": 1048576, "content_type": "application/pdf" }, { "id": "qfile-12345-1705296000-def456", "object": "file", "status": "expired", "model": "gpt-4o", "created_at": 1705296000, "synced_at": 1705296100, "expires_at": 1705468800, "file_name": "image.png", "file_size": 204800, "content_type": "image/png" } ], "has_more": true, "first_id": "qfile-12345-1705382400-abc123", "last_id": "qfile-12345-1705296000-def456" } }, "schema": { "$ref": "#/definitions/FileListResponse" } } }, "security": [], "x-apifox-folder": "文件", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178081-run", "produces": [ "application/json" ] } }, "/v1/files/{file_id}": { "get": { "summary": "查询文件状态", "deprecated": false, "description": "根据文件 ID 查询文件的详细信息和当前状态。\n\n**状态说明**:\n- `pending`:等待处理\n- `uploading`:正在上传到目标存储\n- `ready`:上传完成,可用于推理\n- `failed`:上传失败,查看 error 字段获取详细信息\n- `expired`:文件已过期,需要重新创建\n\n---\n\n\n### 🚀 调用示例:从导入到推理\n\n以下展示了当文件处理完成并获得 `file_id` 后,如何在模型推理接口中使用该文件。\n\n#### 场景:视频理解\n假设您已通过本接口上传了一个长视频,并获得了文件 ID:`qfile-123-1770719212268100147-e0011b`。\n\n**请求说明**:\n在推理接口(Chat/Completions)的 `messages` 数组中,将 `type` 指定为 `file` 或 `image_url` ,并填入对应的 `file_id` 或 `url`。\n\n**请求报文 (JSON)**:\n\n```json\n{\n \"stream\": false,\n \"model\": \"gemini-3.0-pro-preview\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"这段视频里发生了什么?请详细描述。\"\n },\n {\n \"type\": \"file\",\n \"file\": {\n \"file_id\": \"qfile-123-1770719212268100147-e0011b\",\n \"format\": \"video/mp4\"\n }\n }\n ]\n }\n ]\n}\n```", "operationId": "getFile", "tags": [ "文件", "Files" ], "parameters": [ { "name": "file_id", "in": "path", "description": "文件唯一标识,格式:qfile-{user}-{timestamp}-{nonce}", "required": true, "pattern": "^qfile-[0-9]+-[0-9]+-[a-z0-9]+$", "type": "string", "x-example": "" } ], "responses": { "200": { "description": "成功返回文件详情", "headers": {}, "x-apifox-ordering": 0, "schema": { "$ref": "#/definitions/FileResponse" } }, "400": { "description": "请求参数错误", "headers": {}, "x-apifox-ordering": 1, "schema": { "$ref": "#/definitions/ErrorResponse5" } }, "401": { "description": "认证失败", "headers": {}, "x-apifox-ordering": 2, "schema": { "$ref": "#/definitions/ErrorResponse5" } }, "404": { "description": "文件不存在", "headers": {}, "x-apifox-ordering": 3, "schema": { "$ref": "#/definitions/ErrorResponse5" } }, "500": { "description": "服务器内部错误", "headers": {}, "x-apifox-ordering": 4, "schema": { "$ref": "#/definitions/ErrorResponse5" } } }, "security": [], "x-apifox-folder": "文件", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178080-run", "produces": [ "application/json" ] }, "delete": { "summary": "删除文件", "deprecated": false, "description": "删除指定的文件记录及其在目标存储中的资源。\n\n删除操作会:\n1. 删除数据库中的文件记录\n2. 尝试删除目标云存储中的文件副本(如果存在)\n\n**注意**:删除操作不可逆,请谨慎操作。", "operationId": "deleteFile", "tags": [ "文件", "Files" ], "parameters": [ { "name": "file_id", "in": "path", "description": "文件唯一标识,格式:qfile-{uid}-{timestamp}-{nonce}", "required": true, "pattern": "^qfile-[0-9]+-[0-9]+-[a-z0-9]+$", "type": "string", "x-example": "" } ], "responses": { "200": { "description": "文件删除成功", "headers": {}, "x-apifox-ordering": 0, "examples": { "application/json": { "id": "qfile-12345-1705382400-abc123", "object": "file", "deleted": true } }, "schema": { "$ref": "#/definitions/FileDeleteResponse" } }, "400": { "description": "请求参数错误", "headers": {}, "x-apifox-ordering": 1, "schema": { "$ref": "#/definitions/ErrorResponse5" } }, "401": { "description": "认证失败", "headers": {}, "x-apifox-ordering": 2, "schema": { "$ref": "#/definitions/ErrorResponse5" } }, "404": { "description": "文件不存在", "headers": {}, "x-apifox-ordering": 3, "schema": { "$ref": "#/definitions/ErrorResponse5" } }, "500": { "description": "服务器内部错误", "headers": {}, "x-apifox-ordering": 4, "schema": { "$ref": "#/definitions/ErrorResponse5" } } }, "security": [], "x-apifox-folder": "文件", "x-apifox-status": "released", "x-run-in-apifox": "https://app.apifox.com/web/project/7908369/apis/api-425178082-run", "produces": [ "application/json" ] } } }, "security": [], "swagger": "2.0", "definitions": { "ChatCompletionRequest": { "type": "object", "description": "AI模型请求的中继表单结构", "required": [ "model", "messages" ], "properties": { "model": { "type": "string", "description": "模型名称", "example": "gpt-4" }, "messages": { "type": "array", "description": "对话消息列表", "items": { "$ref": "#/definitions/ChatCompletionRequestMessage" } }, "stream": { "type": "boolean", "description": "是否使用流式响应", "default": false }, "max_tokens": { "type": "integer", "description": "生成的最大token数", "example": 2048, "x-nullable": true }, "presence_penalty": { "type": "number", "format": "float", "description": "存在惩罚系数,范围 -2.0 到 2.0", "minimum": -2, "maximum": 2, "x-nullable": true }, "frequency_penalty": { "type": "number", "format": "float", "description": "频率惩罚系数,范围 -2.0 到 2.0", "minimum": -2, "maximum": 2, "x-nullable": true }, "repetition_penalty": { "type": "number", "format": "float", "description": "重复惩罚系数", "x-nullable": true }, "temperature": { "type": "number", "format": "float", "description": "采样温度,范围 0.0 到 2.0", "minimum": 0, "maximum": 2, "example": 0.7, "x-nullable": true }, "top_p": { "type": "number", "format": "float", "description": "核采样参数,范围 0.0 到 1.0", "minimum": 0, "maximum": 1, "x-nullable": true }, "top_k": { "type": "integer", "description": "Top-K采样参数", "x-nullable": true }, "tools": { "type": "array", "description": "函数工具列表", "items": { "$ref": "#/definitions/ToolObject" }, "x-nullable": true }, "tool_choice": { "type": "object", "properties": {}, "x-apifox-orders": [], "description": "工具选择策略,可以是字符串或对象", "x-apifox-ignore-properties": [] }, "type": { "type": "string", "description": "请求类型", "x-nullable": true }, "enable_thinking": { "type": "boolean", "description": "是否启用思考模式", "x-nullable": true }, "chat_template_kwargs": { "description": "腾讯模型支持的聊天模板参数", "$ref": "#/definitions/ChatTemplateKwargs" }, "thinking": { "description": "思考类型配置", "$ref": "#/definitions/ThinkType" }, "reasoning": { "description": "推理配置", "$ref": "#/definitions/ReasoningType" }, "reasoning_effort": { "type": "string", "description": "推理强度", "enum": [ "low", "medium", "high", "minimal", "none" ], "x-apifox-enum": [ { "value": "low", "name": "", "description": "" }, { "value": "medium", "name": "", "description": "" }, { "value": "high", "name": "", "description": "" }, { "value": "minimal", "name": "", "description": "" }, { "value": "none", "name": "", "description": "" } ], "x-nullable": true }, "modalities": { "type": "array", "description": "支持的模态类型列表", "items": { "type": "string", "example": "text" }, "x-nullable": true }, "image_config": { "description": "图像配置参数", "$ref": "#/definitions/ImageConfig" }, "response_format": { "description": "响应格式配置", "x-nullable": true }, "safety_settings": { "type": "array", "description": "Gemini安全设置列表", "items": { "$ref": "#/definitions/SafetySetting" }, "x-nullable": true } }, "x-apifox-orders": [ "model", "messages", "stream", "max_tokens", "presence_penalty", "frequency_penalty", "repetition_penalty", "temperature", "top_p", "top_k", "tools", "tool_choice", "type", "enable_thinking", "chat_template_kwargs", "thinking", "reasoning", "reasoning_effort", "modalities", "image_config", "response_format", "safety_settings" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "ChatCompletionRequestMessage": { "type": "object", "description": "请求消息对象", "properties": { "role": { "type": "string", "description": "消息角色", "enum": [ "system", "user", "assistant", "function", "tool" ] }, "content": { "description": "消息内容,可以是字符串或内容对象数组" }, "name": { "type": "string", "description": "函数名称或用户名称", "x-nullable": true }, "function_call": { "description": "函数调用信息(仅限role为function时填写)", "$ref": "#/definitions/FunctionCall" }, "tool_call_id": { "type": "string", "description": "工具调用ID(仅限role为tool时填写)", "x-nullable": true }, "tool_calls": { "type": "array", "description": "工具调用列表(仅限role为assistant时填写)", "items": { "$ref": "#/definitions/ToolCall" }, "x-nullable": true }, "reasoning_content": { "type": "string", "description": "推理内容" }, "images": { "type": "array", "description": "图片列表", "items": { "$ref": "#/definitions/Image" }, "x-nullable": true }, "thinking_blocks": { "type": "array", "description": "思考块列表", "items": { "$ref": "#/definitions/ThinkingBlock" }, "x-nullable": true } }, "x-apifox-orders": [ "role", "content", "name", "function_call", "tool_call_id", "tool_calls", "reasoning_content", "images", "thinking_blocks" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "MessageContent": { "type": "object", "description": "消息内容对象,支持多种类型", "required": [ "type" ], "properties": { "type": { "type": "string", "description": "内容类型", "enum": [ "text", "image_url", "video_url", "file", "input_audio", "file_url", "video" ] }, "text": { "type": "string", "description": "文本内容", "x-nullable": true }, "image_url": { "description": "图片URL对象", "$ref": "#/definitions/ImageUrl" }, "video_url": { "description": "视频URL对象", "$ref": "#/definitions/VideoUrl" }, "file": { "description": "文件对象", "$ref": "#/definitions/File" }, "input_audio": { "description": "音频输入对象", "$ref": "#/definitions/InputAudio" }, "video": { "type": "array", "description": "视频URL列表", "items": { "type": "string" }, "x-nullable": true }, "file_url": { "description": "文件URL对象(支持docx/xlsx/pptx/pdf)", "$ref": "#/definitions/FileUrl" }, "thinking": { "type": "string", "description": "思考内容" }, "signature": { "type": "string", "description": "签名", "x-nullable": true }, "cache_control": { "description": "缓存控制", "$ref": "#/definitions/CacheControl" } }, "x-apifox-orders": [ "type", "text", "image_url", "video_url", "file", "input_audio", "video", "file_url", "thinking", "signature", "cache_control" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "ImageUrl": { "type": "object", "description": "图片URL对象", "properties": { "url": { "type": "string", "description": "图片URL地址" }, "detail": { "type": "string", "description": "图片细节级别", "enum": [ "auto", "low", "high" ], "x-nullable": true } }, "x-apifox-orders": [ "url", "detail" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "VideoUrl": { "type": "object", "description": "视频URL对象", "properties": { "url": { "type": "string", "description": "视频URL地址" } }, "x-apifox-orders": [ "url" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "File": { "type": "object", "description": "文件对象", "properties": { "file_data": { "type": "string", "description": "文件数据(base64编码)" }, "file_id": { "type": "string", "description": "文件ID" }, "format": { "type": "string", "description": "文件格式" } }, "x-apifox-orders": [ "file_data", "file_id", "format" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "FileUrl": { "type": "object", "description": "文件URL对象", "properties": { "url": { "type": "string", "description": "文件URL地址" }, "detail": { "type": "string", "description": "文件详细级别", "x-nullable": true } }, "x-apifox-orders": [ "url", "detail" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "InputAudio": { "type": "object", "description": "音频输入对象", "properties": { "data": { "type": "string", "description": "音频数据(base64编码)" }, "format": { "type": "string", "description": "音频格式", "enum": [ "wav", "mp3", "ogg", "pcm" ] } }, "x-apifox-orders": [ "data", "format" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "CacheControl": { "type": "object", "description": "缓存控制对象", "properties": { "type": { "type": "string", "description": "缓存类型" }, "ttl": { "type": "string", "description": "缓存过期时间" } }, "x-apifox-orders": [ "type", "ttl" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "ThinkingBlock": { "type": "object", "description": "思考块对象", "properties": { "type": { "type": "string", "description": "思考块类型" }, "thinking": { "type": "string", "description": "思考内容" }, "signature": { "type": "string", "description": "签名", "x-nullable": true } }, "x-apifox-orders": [ "type", "thinking", "signature" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "Image": { "type": "object", "description": "图片对象", "properties": { "type": { "type": "string", "description": "图片类型" }, "image_url": { "$ref": "#/definitions/ImageUrlObject" }, "index": { "type": "integer", "description": "图片索引" } }, "x-apifox-orders": [ "type", "image_url", "index" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "ImageUrlObject": { "type": "object", "description": "图片URL详情对象", "properties": { "url": { "type": "string", "description": "图片URL地址" }, "checksum": { "type": "string", "description": "图片校验和" } }, "x-apifox-orders": [ "url", "checksum" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "ToolObject": { "type": "object", "description": "工具对象", "required": [ "type", "function" ], "properties": { "type": { "type": "string", "description": "工具类型", "enum": [ "function" ] }, "function": { "$ref": "#/definitions/ToolFunction" } }, "x-apifox-orders": [ "type", "function" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "ToolFunction": { "type": "object", "description": "工具函数定义", "required": [ "name", "parameters" ], "properties": { "name": { "type": "string", "description": "函数名称" }, "description": { "type": "string", "description": "函数描述" }, "url": { "type": "string", "description": "函数URL", "x-nullable": true }, "parameters": { "$ref": "#/definitions/ToolParameters" } }, "x-apifox-orders": [ "name", "description", "url", "parameters" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "ToolParameters": { "type": "object", "description": "工具参数定义", "properties": { "type": { "type": "string", "description": "参数类型", "enum": [ "object" ] }, "properties": { "type": "object", "description": "参数属性定义", "additionalProperties": { "type": "object", "x-apifox-orders": [] }, "x-apifox-orders": [], "properties": {}, "x-apifox-ignore-properties": [] }, "property": { "type": "object", "description": "参数属性定义(备用字段)", "additionalProperties": { "type": "object", "x-apifox-orders": [] }, "x-apifox-orders": [], "properties": {}, "x-apifox-ignore-properties": [] }, "required": { "type": "array", "description": "必填参数列表", "items": { "type": "string" }, "x-nullable": true } }, "x-apifox-orders": [ "type", "properties", "property", "required" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "ToolCall": { "type": "object", "description": "工具调用对象", "required": [ "type", "id", "function" ], "properties": { "index": { "type": "integer", "description": "调用索引", "x-nullable": true }, "type": { "type": "string", "description": "调用类型", "enum": [ "function" ] }, "id": { "type": "string", "description": "调用ID" }, "function": { "$ref": "#/definitions/ToolCallFunction" } }, "x-apifox-orders": [ "index", "type", "id", "function" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "ToolCallFunction": { "type": "object", "description": "工具调用函数信息", "properties": { "name": { "type": "string", "description": "函数名称" }, "arguments": { "type": "string", "description": "函数参数(JSON字符串)" } }, "x-apifox-orders": [ "name", "arguments" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "FunctionCall": { "type": "object", "description": "函数调用对象", "required": [ "name", "arguments" ], "properties": { "name": { "type": "string", "description": "函数名称" }, "arguments": { "type": "string", "description": "函数参数(JSON字符串)" } }, "x-apifox-orders": [ "name", "arguments" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "ChatTemplateKwargs": { "type": "object", "description": "腾讯聊天模板参数", "properties": { "thinking": { "type": "boolean", "description": "腾讯DeepSeek思考参数" }, "enable_thinking": { "type": "boolean", "description": "是否启用思考模式" }, "thinking_budget": { "type": "integer", "description": "思考token预算" } }, "x-apifox-orders": [ "thinking", "enable_thinking", "thinking_budget" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "ThinkType": { "type": "object", "description": "思考类型配置", "properties": { "type": { "type": "string", "description": "思考模式类型", "enum": [ "disabled", "enabled", "auto" ] }, "budget_tokens": { "type": "integer", "description": "思考token预算", "x-nullable": true } }, "x-apifox-orders": [ "type", "budget_tokens" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "ReasoningType": { "type": "object", "description": "OpenAI推理配置", "properties": { "effort": { "type": "string", "description": "推理强度", "enum": [ "low", "medium", "high" ] }, "max_tokens": { "type": "integer", "description": "最大推理token数" }, "exclude": { "type": "boolean", "description": "是否排除推理内容" }, "enabled": { "type": "boolean", "description": "是否启用DeepSeek v3.1思考模式" } }, "x-apifox-orders": [ "effort", "max_tokens", "exclude", "enabled" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "ImageConfig": { "type": "object", "description": "图像配置参数", "properties": { "aspect_ratio": { "type": "string", "description": "图像宽高比", "example": "16:9" }, "image_size": { "type": "string", "description": "图像尺寸", "example": "4K" } }, "x-apifox-orders": [ "aspect_ratio", "image_size" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "SafetySetting": { "type": "object", "description": "Gemini模型安全设置", "required": [ "category", "threshold" ], "properties": { "category": { "type": "string", "description": "危害类别", "example": "HARM_CATEGORY_HARASSMENT" }, "threshold": { "type": "string", "description": "阻止阈值", "enum": [ "BLOCK_NONE", "BLOCK_ONLY_HIGH", "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_LOW_AND_ABOVE" ] } }, "x-apifox-orders": [ "category", "threshold" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "聊天" }, "SoraVideoTask": { "type": "object", "description": "Sora 视频任务基本信息", "required": [ "id", "object", "model", "status", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "description": "视频任务唯一 ID", "example": "qvideo-user123-1766453713089395279" }, "object": { "type": "string", "description": "对象类型,固定为 video", "enum": [ "video" ], "example": "video" }, "model": { "type": "string", "description": "使用的模型名称", "example": "sora-2" }, "status": { "type": "string", "description": "任务状态", "enum": [ "initializing", "queued", "in_progress", "downloading", "uploading", "completed", "failed", "cancelled" ], "example": "queued" }, "created_at": { "type": "integer", "description": "创建时间(Unix 时间戳,秒)", "example": 1766453713 }, "updated_at": { "type": "integer", "description": "更新时间(Unix 时间戳,秒)", "example": 1766453713 }, "seconds": { "type": "string", "description": "视频时长(秒)", "example": "4" }, "size": { "type": "string", "description": "视频分辨率(宽 x 高)", "example": "1280x720" } }, "x-apifox-orders": [ "id", "object", "model", "status", "created_at", "updated_at", "seconds", "size" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/Sora" }, "SoraVideoTaskRemix": { "allOf": [ { "$ref": "#/definitions/SoraVideoTask" }, { "type": "object", "required": [ "remixed_from_video_id" ], "properties": { "remixed_from_video_id": { "type": "string", "description": "原视频任务 ID", "example": "qvideo-user123-1766453713089395279" } }, "x-apifox-orders": [ "remixed_from_video_id" ], "x-apifox-ignore-properties": [] } ], "description": "Sora 视频 Remix 任务", "x-apifox-folder": "视频/Sora" }, "KlingV21CreateRequest": { "type": "object", "required": [ "model", "prompt", "input_reference" ], "properties": { "model": { "type": "string", "enum": [ "kling-v2-1" ], "description": "视频生成模型名称,固定为 kling-v2-1" }, "prompt": { "type": "string", "maxLength": 2500, "description": "视频生成的文本描述提示词,最大 2500 字符。建议包含场景描述、动作、风格、光线、氛围等细节" }, "negative_prompt": { "type": "string", "description": "负向文本提示词。不能超过2500个字符" }, "input_reference": { "type": "string", "description": "参考图像。支持传入图片 Base64 编码或图片 URL(不要添加前缀如 data:image/png;base64,)。支持格式:.jpg/.jpeg/.png,文件大小不超过 10MB,宽高不小于 300px,宽高比介于 1:2.5 ~ 2.5:1 之间" }, "image_tail": { "type": "string", "description": "参考图像 - 尾帧控制。同时配置 input_reference 和 image_tail 参数时,表示控制首尾帧生视频,此时 mode 参数仅支持 pro 模式" }, "seconds": { "type": "string", "enum": [ "5", "10" ], "default": "5", "description": "视频时长(秒),可选值:5 或 10" }, "size": { "type": "string", "enum": [ "1920x1080", "1080x1920", "1280x720", "720x1280", "1080x1080", "720x720" ], "default": "1920x1080", "description": "视频分辨率,格式:宽x高。该字段主要用于控制横竖屏方向,实际分辨率品质由 mode 字段控制" }, "mode": { "type": "string", "enum": [ "std", "pro" ], "default": "std", "description": "生成视频的模式。std:标准模式(720P),性价比高;pro:专家模式(1080P),质量更佳" } }, "x-apifox-orders": [ "model", "prompt", "negative_prompt", "input_reference", "image_tail", "seconds", "size", "mode" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/kling-v2-1" }, "KlingV21CreateResponse": { "type": "object", "properties": { "id": { "type": "string", "description": "视频任务唯一 ID,用于后续查询任务状态" }, "object": { "type": "string", "enum": [ "video" ], "description": "对象类型,固定为 video" }, "model": { "type": "string", "description": "使用的模型名称,例如 kling-v2-1" }, "mode": { "type": "string", "description": "生成模式,std(标准模式)或 pro(专家模式)" }, "status": { "type": "string", "description": "任务状态,通常为 queued(排队中)" }, "created_at": { "type": "integer", "description": "创建时间(Unix 时间戳,秒)" }, "updated_at": { "type": "integer", "description": "更新时间(Unix 时间戳,秒)" }, "seconds": { "type": "string", "description": "视频时长(秒)" }, "size": { "type": "string", "description": "请求体中的视频分辨率(宽 x 高)" } }, "x-apifox-orders": [ "id", "object", "model", "mode", "status", "created_at", "updated_at", "seconds", "size" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/kling-v2-1" }, "KlingV21StatusResponse": { "type": "object", "description": "视频任务状态响应", "properties": { "id": { "type": "string", "description": "视频任务唯一 ID" }, "object": { "type": "string", "enum": [ "video" ], "description": "对象类型,固定为 video" }, "model": { "type": "string", "description": "使用的模型名称" }, "mode": { "type": "string", "description": "生成模式,std 或 pro,仅在成功时返回" }, "status": { "type": "string", "enum": [ "initializing", "queued", "in_progress", "downloading", "uploading", "completed", "failed", "cancelled" ], "description": "任务状态:initializing(初始化中)、queued(排队中)、in_progress(处理中)、downloading(下载中)、uploading(上传中)、completed(已完成)、failed(失败)、cancelled(已取消)" }, "created_at": { "type": "integer", "description": "创建时间(Unix 时间戳,秒)" }, "updated_at": { "type": "integer", "description": "更新时间(Unix 时间戳,秒)" }, "completed_at": { "type": "integer", "description": "完成时间(Unix 时间戳,秒),仅在已完成或失败时返回" }, "seconds": { "type": "string", "description": "视频时长(秒)" }, "size": { "type": "string", "description": "视频分辨率(宽 x 高)" }, "task_result": { "type": "object", "description": "任务结果,包含生成的视频列表,仅在已完成时返回", "properties": { "videos": { "type": "array", "description": "生成的视频列表", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "视频 ID,全局唯一" }, "url": { "type": "string", "description": "视频下载 URL(注意:生成的视频会在 7 天后过期,请及时转存)" }, "duration": { "type": "string", "description": "视频时长(秒)" } }, "x-apifox-orders": [ "id", "url", "duration" ], "x-apifox-ignore-properties": [] } } }, "x-apifox-orders": [ "videos" ], "x-apifox-ignore-properties": [] }, "error": { "type": "object", "description": "错误信息,仅在失败时返回", "properties": { "code": { "type": "string", "description": "错误码" }, "message": { "type": "string", "description": "错误描述" } }, "x-apifox-orders": [ "code", "message" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "id", "object", "model", "mode", "status", "created_at", "updated_at", "completed_at", "seconds", "size", "task_result", "error" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频" }, "KlingV25TurboCreateRequest": { "type": "object", "required": [ "model", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "kling-v2-5-turbo" ], "description": "视频生成模型名称,固定为 kling-v2-5-turbo" }, "prompt": { "type": "string", "maxLength": 2500, "description": "视频生成的文本描述提示词,最大 2500 字符。建议包含场景描述、动作、风格、光线、氛围等细节" }, "negative_prompt": { "type": "string", "description": "负向文本提示词。不能超过2500个字符" }, "input_reference": { "type": "string", "description": "参考图像。支持传入图片 Base64 编码或图片 URL(不要添加前缀如 data:image/png;base64,)。支持格式:.jpg/.jpeg/.png,文件大小不超过 10MB,宽高不小于 300px,宽高比介于 1:2.5 ~ 2.5:1 之间" }, "image_tail": { "type": "string", "description": "参考图像 - 尾帧控制。同时配置 input_reference 和 image_tail 参数时,表示控制首尾帧生视频,此时 mode 参数仅支持 pro 模式" }, "seconds": { "type": "string", "enum": [ "5", "10" ], "default": "5", "description": "视频时长(秒),可选值:5 或 10" }, "size": { "type": "string", "enum": [ "1920x1080", "1080x1920", "1280x720", "720x1280", "1080x1080", "720x720" ], "default": "1920x1080", "description": "视频分辨率,格式:宽x高。该字段主要用于控制横竖屏方向,实际分辨率品质由 mode 字段控制" }, "mode": { "type": "string", "enum": [ "std", "pro" ], "default": "std", "description": "生成视频的模式。std:标准模式(720P),性价比高;pro:专家模式(1080P),质量更佳" } }, "x-apifox-orders": [ "model", "prompt", "negative_prompt", "input_reference", "image_tail", "seconds", "size", "mode" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/kling-v2-5-turbo" }, "KlingV25TurboCreateResponse": { "type": "object", "properties": { "id": { "type": "string", "description": "视频任务唯一 ID,用于后续查询任务状态" }, "object": { "type": "string", "enum": [ "video" ], "description": "对象类型,固定为 video" }, "model": { "type": "string", "description": "使用的模型名称,例如 kling-v2-5-turbo" }, "mode": { "type": "string", "description": "生成模式,std(标准模式)或 pro(专家模式)" }, "status": { "type": "string", "description": "任务状态,通常为 queued(排队中)" }, "created_at": { "type": "integer", "description": "创建时间(Unix 时间戳,秒)" }, "updated_at": { "type": "integer", "description": "更新时间(Unix 时间戳,秒)" }, "seconds": { "type": "string", "description": "视频时长(秒)" }, "size": { "type": "string", "description": "请求体中的视频分辨率(宽 x 高)" } }, "x-apifox-orders": [ "id", "object", "model", "mode", "status", "created_at", "updated_at", "seconds", "size" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/kling-v2-5-turbo" }, "KlingV25TurboStatusResponse": { "type": "object", "description": "视频任务状态响应", "properties": { "id": { "type": "string", "description": "视频任务唯一 ID" }, "object": { "type": "string", "enum": [ "video" ], "description": "对象类型,固定为 video" }, "model": { "type": "string", "description": "使用的模型名称" }, "mode": { "type": "string", "description": "生成模式,std 或 pro,仅在成功时返回" }, "status": { "type": "string", "enum": [ "initializing", "queued", "in_progress", "downloading", "uploading", "completed", "failed", "cancelled" ], "description": "任务状态:initializing(初始化中)、queued(排队中)、in_progress(处理中)、downloading(下载中)、uploading(上传中)、completed(已完成)、failed(失败)、cancelled(已取消)" }, "created_at": { "type": "integer", "description": "创建时间(Unix 时间戳,秒)" }, "updated_at": { "type": "integer", "description": "更新时间(Unix 时间戳,秒)" }, "completed_at": { "type": "integer", "description": "完成时间(Unix 时间戳,秒),仅在已完成或失败时返回" }, "seconds": { "type": "string", "description": "视频时长(秒)" }, "size": { "type": "string", "description": "视频分辨率(宽 x 高)" }, "task_result": { "type": "object", "description": "任务结果,包含生成的视频列表,仅在已完成时返回", "properties": { "videos": { "type": "array", "description": "生成的视频列表", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "视频 ID,全局唯一" }, "url": { "type": "string", "description": "视频下载 URL(注意:生成的视频会在 7 天后过期,请及时转存)" }, "duration": { "type": "string", "description": "视频时长(秒)" } }, "x-apifox-orders": [ "id", "url", "duration" ], "x-apifox-ignore-properties": [] } } }, "x-apifox-orders": [ "videos" ], "x-apifox-ignore-properties": [] }, "error": { "type": "object", "description": "错误信息,仅在失败时返回", "properties": { "code": { "type": "string", "description": "错误码" }, "message": { "type": "string", "description": "错误描述" } }, "x-apifox-orders": [ "code", "message" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "id", "object", "model", "mode", "status", "created_at", "updated_at", "completed_at", "seconds", "size", "task_result", "error" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频" }, "KlingVideoO1CreateRequest": { "type": "object", "required": [ "model", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "kling-video-o1" ], "description": "视频生成模型名称,固定为 kling-video-o1" }, "prompt": { "type": "string", "maxLength": 2500, "description": "视频生成的文本描述提示词,最大 2500 字符。建议包含场景描述、动作、风格、光线、氛围等细节" }, "image_list": { "type": "array", "description": "参考图列表,包括主体、场景、风格等参考图片,也可作为首帧或尾帧生成视频。支持传入图片 Base64 编码或图片 URL", "items": { "type": "object", "required": [ "image" ], "properties": { "image": { "type": "string", "description": "图片 URL 或 Base64 编码(不要添加前缀如 data:image/png;base64,)。支持格式:.jpg/.jpeg/.png,文件大小不超过 10MB,宽高不小于 300px" }, "type": { "type": "string", "enum": [ "first_frame", "end_frame" ], "description": "图片类型:first_frame 为首帧,end_frame 为尾帧。有尾帧图时必须有首帧图" } }, "x-apifox-orders": [ "image", "type" ], "x-apifox-ignore-properties": [] }, "maxItems": 7 }, "video_list": { "type": "array", "description": "参考视频列表,通过 URL 方式提供。参考视频可作为特征参考视频或待编辑视频", "items": { "type": "object", "required": [ "video_url" ], "properties": { "video_url": { "type": "string", "description": "视频 URL。支持格式:MP4/MOV,时长 3-10 秒,宽高 720px-2160px,帧率 24-60fps,大小不超过 200MB" }, "refer_type": { "type": "string", "enum": [ "feature", "base" ], "description": "参考视频类型:feature 为特征参考视频,base 为待编辑视频" }, "keep_original_sound": { "type": "string", "enum": [ "yes", "no" ], "description": "是否保留视频原声:yes 保留,no 不保留" } }, "x-apifox-orders": [ "video_url", "refer_type", "keep_original_sound" ], "x-apifox-ignore-properties": [] }, "maxItems": 1 }, "seconds": { "type": "string", "enum": [ "5", "10" ], "default": "5", "description": "视频时长(秒),可选值:5 或 10" }, "size": { "type": "string", "enum": [ "1920x1080", "1080x1920", "1280x720", "720x1280", "1080x1080", "720x720" ], "default": "1920x1080", "description": "视频分辨率,格式:宽x高。该字段主要用于控制横竖屏方向,实际分辨率品质由 mode 字段控制" }, "mode": { "type": "string", "enum": [ "std", "pro" ], "default": "std", "description": "生成视频的模式。std:标准模式(720P),性价比高;pro:专家模式(1080P),质量更佳" } }, "x-apifox-orders": [ "model", "prompt", "image_list", "video_list", "seconds", "size", "mode" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/kling-video-o1" }, "KlingVideoO1CreateResponse": { "type": "object", "properties": { "id": { "type": "string", "description": "视频任务唯一 ID,用于后续查询任务状态" }, "object": { "type": "string", "enum": [ "video" ], "description": "对象类型,固定为 video" }, "model": { "type": "string", "description": "使用的模型名称,例如 kling-video-o1" }, "mode": { "type": "string", "description": "生成模式,std(标准模式)或 pro(专家模式)" }, "status": { "type": "string", "description": "任务状态,通常为 queued(排队中)" }, "created_at": { "type": "integer", "description": "创建时间(Unix 时间戳,秒)" }, "updated_at": { "type": "integer", "description": "更新时间(Unix 时间戳,秒)" }, "seconds": { "type": "string", "description": "视频时长(秒)" }, "size": { "type": "string", "description": "请求体中的视频分辨率(宽 x 高)" } }, "x-apifox-orders": [ "id", "object", "model", "mode", "status", "created_at", "updated_at", "seconds", "size" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频" }, "KlingVideoO1StatusResponse": { "type": "object", "description": "视频任务状态响应", "properties": { "id": { "type": "string", "description": "视频任务唯一 ID" }, "object": { "type": "string", "enum": [ "video" ], "description": "对象类型,固定为 video" }, "model": { "type": "string", "description": "使用的模型名称" }, "mode": { "type": "string", "description": "生成模式,std 或 pro,仅在成功时返回" }, "status": { "type": "string", "enum": [ "initializing", "queued", "in_progress", "downloading", "uploading", "completed", "failed", "cancelled" ], "description": "任务状态:initializing(初始化中)、queued(排队中)、in_progress(处理中)、downloading(下载中)、uploading(上传中)、completed(已完成)、failed(失败)、cancelled(已取消)" }, "created_at": { "type": "integer", "description": "创建时间(Unix 时间戳,秒)" }, "updated_at": { "type": "integer", "description": "更新时间(Unix 时间戳,秒)" }, "completed_at": { "type": "integer", "description": "完成时间(Unix 时间戳,秒),仅在已完成或失败时返回" }, "seconds": { "type": "string", "description": "视频时长(秒)" }, "size": { "type": "string", "description": "视频分辨率(宽 x 高)" }, "task_result": { "type": "object", "description": "任务结果,包含生成的视频列表,仅在已完成时返回", "properties": { "videos": { "type": "array", "description": "生成的视频列表", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "视频 ID,全局唯一" }, "url": { "type": "string", "description": "视频下载 URL(注意:生成的视频会在 7 天后过期,请及时转存)" }, "duration": { "type": "string", "description": "视频时长(秒)" } }, "x-apifox-orders": [ "id", "url", "duration" ], "x-apifox-ignore-properties": [] } } }, "x-apifox-orders": [ "videos" ], "x-apifox-ignore-properties": [] }, "error": { "type": "object", "description": "错误信息,仅在失败时返回", "properties": { "code": { "type": "string", "description": "错误码" }, "message": { "type": "string", "description": "错误描述" } }, "x-apifox-orders": [ "code", "message" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "id", "object", "model", "mode", "status", "created_at", "updated_at", "completed_at", "seconds", "size", "task_result", "error" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频" }, "KlingV3OmniCreateRequest": { "type": "object", "required": [ "model" ], "properties": { "model": { "type": "string", "description": "模型名称。对应可灵文档 model_name 字段。", "default": "kling-v3-omni", "enum": [ "kling-v3-omni" ], "x-apifox-enum": [ { "value": "kling-v3-omni", "name": "", "description": "" } ] }, "multi_shot": { "type": "boolean", "description": "是否生成多镜头视频。当前参数为 true 时,prompt 参数无效;当前参数为 false 时,shot_type 参数及 multi_prompt 参数无效。", "default": false }, "shot_type": { "type": "string", "description": "分镜方式。枚举值:customize。当 multi_shot 参数为 true 时,当前参数必填。", "enum": [ "customize" ] }, "prompt": { "type": "string", "description": "文本提示词,可包含正向描述和负向描述。可将提示词模板化来满足不同的视频生成需求。Omni 模型可通过 Prompt 与主体、图片、视频等内容实现多种能力:通过 <<<>>> 的格式来指定某个主体、图片、视频,如:<<>>、<<>>、<<>>。长度不能超过 2500 个字符。当 multi_shot 参数为 false 或 shot_type 参数为 intelligence 时,当前参数不得为空。不同模型版本、视频模式支持范围不同,详见能力地图。", "maxLength": 2500 }, "multi_prompt": { "type": "array", "description": "各分镜信息,如提示词、时长等。通过 index、prompt、duration 参数定义分镜序号及相应提示词和时长,其中:最多支持 6 个分镜,最少支持 1 个分镜;每个分镜相关内容的最大长度不超过 512;每个分镜的时长不大于当前任务的总时长,不小于 1;所有分镜的时长之和等于当前任务的总时长。当 multi_shot 参数为 true 且 shot_type 参数为 customize 时,当前参数不得为空。", "minItems": 1, "maxItems": 6, "items": { "type": "object", "required": [ "index", "prompt", "duration" ], "properties": { "index": { "type": "integer", "description": "分镜序号。" }, "prompt": { "type": "string", "description": "该分镜的提示词。最大长度不超过 512 个字符。", "maxLength": 512 }, "duration": { "type": "string", "description": "该分镜的时长(秒)。不大于当前任务的总时长,不小于 1。" } }, "x-apifox-orders": [ "index", "prompt", "duration" ], "x-apifox-ignore-properties": [] } }, "image_list": { "type": "array", "description": "参考图列表。包括主体、场景、风格等参考图片,也可作为首帧或尾帧生成视频。当作为首帧或尾帧生成视频时:通过 type 参数来定义图片是否为首尾帧(first_frame 为首帧,end_frame 为尾帧);暂不支持仅尾帧,即有尾帧图时必须有首帧图;首帧或首尾帧生视频时,不能使用视频编辑功能。支持传入图片 Base64 编码或图片 URL(确保可访问)。图片格式支持 .jpg/.jpeg/.png,文件大小不超过 10MB,宽高尺寸不小于 300px,宽高比在 1:2.5~2.5:1 之间。有参考视频时,参考图片数量不得超过 4;无参考视频时,参考图片数量不得超过 7。数组中超过 2 张图片时,不支持设置尾帧。image_url 参数值不得为空。", "maxItems": 7, "items": { "type": "object", "required": [ "image" ], "properties": { "image": { "type": "string", "description": "图片 URL 或 Base64 编码(对应可灵文档 image_url 字段)。支持 .jpg/.jpeg/.png 格式,文件大小不超过 10MB,宽高尺寸不小于 300px,宽高比在 1:2.5~2.5:1 之间。参数值不得为空。" }, "type": { "type": "string", "description": "定义图片是否为首尾帧。first_frame 为首帧,end_frame 为尾帧。暂不支持仅尾帧,即有尾帧图时必须有首帧图。", "enum": [ "first_frame", "end_frame" ] } }, "x-apifox-orders": [ "image", "type" ], "x-apifox-ignore-properties": [] } }, "video_list": { "type": "array", "description": "参考视频,通过 URL 方式获取。可作为特征参考视频,也可作为待编辑视频,默认为待编辑视频;可选择性保留视频原声。通过 refer_type 参数区分参考视频类型:feature 为特征参考视频,base 为待编辑视频。参考视频为待编辑视频时,不能定义视频首尾帧。通过 keep_original_sound 参数选择是否保留视频原声(yes 为保留,no 为不保留),当前参数对特征参考视频(feature)也生效。有参考视频时,sound 参数值只能为 off。视频格式仅支持 MP4/MOV;视频时长不少于 3 秒,上限与模型版本有关;视频宽高尺寸需介于 720px(含)和 2160px(含)之间;视频帧率基于 24fps~60fps,生成视频时会输出为 24fps。至多仅支持上传 1 段视频,视频大小不超过 200MB。video_url 参数值不得为空。不同模型版本、视频模式支持范围不同,详见能力地图。", "maxItems": 1, "items": { "type": "object", "required": [ "video_url" ], "properties": { "video_url": { "type": "string", "description": "参考视频 URL。视频格式仅支持 MP4/MOV,大小不超过 200MB,时长不少于 3 秒,宽高尺寸需介于 720px(含)和 2160px(含)之间。参数值不得为空。" }, "refer_type": { "type": "string", "description": "参考视频类型。feature 为特征参考视频,base 为待编辑视频。默认为待编辑视频。参考视频为待编辑视频时,不能定义视频首尾帧。", "default": "base", "enum": [ "base", "feature" ] }, "keep_original_sound": { "type": "string", "description": "是否保留视频原声。yes 为保留,no 为不保留。当前参数对特征参考视频(feature)也生效。", "enum": [ "yes", "no" ] } }, "x-apifox-orders": [ "video_url", "refer_type", "keep_original_sound" ], "x-apifox-ignore-properties": [] } }, "sound": { "type": "string", "description": "生成视频时是否同时生成声音。", "default": "off", "enum": [ "on", "off" ] }, "mode": { "type": "string", "description": "生成视频的模式。枚举值:std,pro。其中 std:标准模式(720P),基础模式,性价比高;其中 pro:专家模式(1080P),高表现模式,生成视频质量更佳。不同模型版本、视频模式支持范围不同,详见能力地图https://docs.qingque.cn/d/home/eZQAyImcbaS0fz-8ANjXvU5ed?identityId=2Cn18n4EIHT。", "default": "pro", "enum": [ "std", "pro" ] }, "size": { "type": "string", "description": "生成视频的画面纵横比(宽:高)。对应可灵的 aspect_ratio 字段,服务内部自动将 size(如 1280x720)转换为 aspect_ratio(如 16:9)。可灵文档枚举值:16:9, 9:16, 1:1。未使用首帧参考或视频编辑功能时,当前参数必填。", "example": "1280x720" }, "seconds": { "type": "string", "description": "生成视频时长,单位 s。对应可灵文档 duration 字段。枚举值:3,4,5,6,7,8,9,10,11,12,13,14,15。使用视频编辑功能(refer_type 为 base)时,输出结果与传入视频时长相同,此时当前参数无效,按输入视频时长四舍五入取整计量计费。不同模型版本、视频模式支持范围不同,详见能力地图。", "default": "5", "enum": [ "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15" ] }, "watermark_info": { "type": "object", "description": "是否同时生成含水印的结果。通过 enabled 参数定义。暂不支持自定义水印。", "properties": { "enabled": { "type": "boolean", "description": "true 为生成水印,false 为不生成水印。" } }, "x-apifox-orders": [ "enabled" ], "x-apifox-ignore-properties": [] } }, "additionalProperties": false, "x-apifox-orders": [ "model", "multi_shot", "shot_type", "prompt", "multi_prompt", "image_list", "video_list", "sound", "mode", "size", "seconds", "watermark_info" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/kling-v3-omni" }, "KlingV3CreateRequest ": { "type": "object", "required": [ "model" ], "properties": { "model": { "type": "string", "description": "模型名称。对应可灵文档 model_name 字段。枚举值:kling-v3。", "default": "kling-v3", "enum": [ "kling-v3" ] }, "multi_shot": { "type": "boolean", "description": "是否生成多镜头视频。当前参数为 true 时,prompt 参数无效;当前参数为 false 时,shot_type 参数及 multi_prompt 参数无效。", "default": false }, "shot_type": { "type": "string", "description": "分镜方式。枚举值:customize。当 multi_shot 参数为 true 时,当前参数必填。", "enum": [ "customize" ] }, "prompt": { "type": "string", "description": "文本提示词,可包含正向描述和负向描述。可将提示词模板化来满足不同的视频生成需求。Omni 模型可通过 Prompt 与主体、图片、视频等内容实现多种能力:通过 <<<>>> 的格式来指定某个主体、图片、视频,如:<<>>、<<>>、<<>>。长度不能超过 2500 个字符。当 multi_shot 参数为 false 或 shot_type 参数为 intelligence 时,当前参数不得为空。不同模型版本、视频模式支持范围不同,详见能力地图。", "maxLength": 2500 }, "multi_prompt": { "type": "array", "description": "各分镜信息,如提示词、时长等。通过 index、prompt、duration 参数定义分镜序号及相应提示词和时长,其中:最多支持 6 个分镜,最少支持 1 个分镜;每个分镜相关内容的最大长度不超过 512;每个分镜的时长不大于当前任务的总时长,不小于 1;所有分镜的时长之和等于当前任务的总时长。当 multi_shot 参数为 true 且 shot_type 参数为 customize 时,当前参数不得为空。", "minItems": 1, "maxItems": 6, "items": { "type": "object", "required": [ "index", "prompt", "duration" ], "properties": { "index": { "type": "integer", "description": "分镜序号。" }, "prompt": { "type": "string", "description": "该分镜的提示词。最大长度不超过 512 个字符。", "maxLength": 512 }, "duration": { "type": "string", "description": "该分镜的时长(秒)。不大于当前任务的总时长,不小于 1。" } }, "x-apifox-orders": [ "index", "prompt", "duration" ], "x-apifox-ignore-properties": [] } }, "input_reference": { "type": "string", "description": "参考图片。对应可灵文档 image 字段。支持图片 URL 或 Base64 编码(不带 data: 前缀)。限制:jpg/jpeg/png,最大 10MB,最小 300px,宽高比 1:2.5~2.5:1。传入此参数后自动调用图生视频接口。" }, "image_tail": { "type": "string", "description": "参考图像 - 尾帧控制(旧版图生视频接口专用)。支持图片 URL 或 Base64 编码(不带 data: 前缀)。限制:jpg/jpeg/png,最大 10MB,最小 300px。与 input_reference 至少二选一。" }, "sound": { "type": "string", "description": "生成视频时是否同时生成声音。枚举值:on,off。仅 V2.6 及后续版本模型支持当前参数。", "default": "off", "enum": [ "on", "off" ] }, "mode": { "type": "string", "description": "生成视频的模式。枚举值:std,pro。其中 std:标准模式(标准),基础模式,性价比高;其中 pro:专家模式(高品质),高表现模式,生成视频质量更佳。不同模型版本、视频模式支持范围不同,详见能力地图。", "default": "pro", "enum": [ "std", "pro" ] }, "size": { "type": "string", "description": "生成视频的画面纵横比(宽:高)。对应可灵文档 aspect_ratio 字段,代码内部自动将 size(如 1280x720)转换为 aspect_ratio(如 16:9)。可灵文档枚举值:16:9, 9:16, 1:1。未使用首帧参考或视频编辑功能时,当前参数必填。", "example": "1280x720" }, "seconds": { "type": "string", "description": "生成视频时长,单位 s。对应可灵文档 duration 字段。枚举值:3,4,5,6,7,8,9,10,11,12,13,14,15。使用视频编辑功能(refer_type 为 base)时,输出结果与传入视频时长相同,此时当前参数无效,按输入视频时长四舍五入取整计量计费。不同模型版本、视频模式支持范围不同,详见能力地图。", "default": "5", "enum": [ "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15" ] }, "watermark_info": { "type": "object", "description": "是否同时生成含水印的结果。通过 enabled 参数定义。暂不支持自定义水印。", "properties": { "enabled": { "type": "boolean", "description": "true 为生成水印,false 为不生成水印。" } }, "x-apifox-orders": [ "enabled" ], "x-apifox-ignore-properties": [] }, "negative_prompt": { "type": "string", "description": "负向文本提示词(旧版可灵接口专用,V3 Omni 建议在 prompt 中包含负向描述)。不能超过 2500 个字符。", "maxLength": 2500 }, "cfg_scale": { "type": "number", "description": "生成视频的自由度(旧版可灵接口专用,V2.x 不支持)。取值范围 [0, 1],值越大模型自由度越小,与提示词相关性越强。", "minimum": 0, "maximum": 1 }, "camera_control": { "type": "object", "description": "摄像机运动控制(旧版可灵接口专用)。如未指定,模型将根据输入智能匹配。互斥:image+image_tail、dynamic_masks/static_mask、camera_control 三选一。", "properties": { "type": { "type": "string", "description": "预定义的运镜类型。simple 需在 config 中六选一。", "enum": [ "simple", "down_back", "forward_up", "right_turn_forward", "left_turn_forward" ] }, "config": { "type": "object", "description": "摄像机运动配置。当 type=simple 时必填,其他类型不填。六个参数只能有一个不为 0。", "properties": { "horizontal": { "type": "number", "description": "水平运镜(沿 x 轴平移)。[-10, 10],负值向左,正值向右。", "minimum": -10, "maximum": 10 }, "vertical": { "type": "number", "description": "垂直运镜(沿 y 轴平移)。[-10, 10],负值向下,正值向上。", "minimum": -10, "maximum": 10 }, "pan": { "type": "number", "description": "水平摇镜(绕 y 轴旋转)。[-10, 10],负值向左,正值向右。", "minimum": -10, "maximum": 10 }, "tilt": { "type": "number", "description": "垂直摇镜(沿 x 轴旋转)。[-10, 10],负值向下,正值向上。", "minimum": -10, "maximum": 10 }, "roll": { "type": "number", "description": "旋转运镜(绕 z 轴旋转)。[-10, 10],负值逆时针,正值顺时针。", "minimum": -10, "maximum": 10 }, "zoom": { "type": "number", "description": "变焦(焦距变化)。[-10, 10],负值焦距变长视野变小,正值焦距变短视野变大。", "minimum": -10, "maximum": 10 } }, "x-apifox-orders": [ "horizontal", "vertical", "pan", "tilt", "roll", "zoom" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "type", "config" ], "x-apifox-ignore-properties": [] }, "static_mask": { "type": "string", "description": "静态笔刷涂抹区域(旧版图生视频接口专用)。指定视频中静止不动的区域。图片长宽比必须与 input_reference 相同。" }, "dynamic_masks": { "type": "array", "description": "动态笔刷配置列表(旧版图生视频接口专用)。最多 6 组,每组包含涂抹区域与运动轨迹。", "maxItems": 6, "items": { "type": "object", "properties": { "mask": { "type": "string", "description": "动态笔刷涂抹区域(mask 图片)。支持图片 URL 或 Base64 编码。图片长宽比须与 input_reference 相同。" }, "trajectories": { "type": "array", "description": "运动轨迹坐标序列。坐标个数 [2, 77]。以图片左下角为原点,传入顺序决定运动方向。", "minItems": 2, "maxItems": 77, "items": { "type": "object", "required": [ "x", "y" ], "properties": { "x": { "type": "integer", "description": "x 坐标。" }, "y": { "type": "integer", "description": "y 坐标。" } }, "x-apifox-orders": [ "x", "y" ], "x-apifox-ignore-properties": [] } } }, "x-apifox-orders": [ "mask", "trajectories" ], "x-apifox-ignore-properties": [] } } }, "additionalProperties": false, "x-apifox-orders": [ "model", "multi_shot", "shot_type", "prompt", "multi_prompt", "input_reference", "image_tail", "sound", "mode", "size", "seconds", "watermark_info", "negative_prompt", "cfg_scale", "camera_control", "static_mask", "dynamic_masks" ], "x-apifox-ignore-properties": [], "example": { "_comment": "示例 1: V3 Omni 基础文生视频(单镜头)", "model": "kling-v3-omni", "prompt": "一只猫咪在花园中奔跑", "seconds": "5", "mode": "std", "size": "1280x720", "sound": "off" }, "x-apifox-folder": "视频/kling-v3" }, "KlingV26CreateRequest": { "type": "object", "required": [ "model", "prompt" ], "properties": { "model": { "type": "string", "description": "模型名称,可灵 v2.6 系列模型", "enum": [ "kling-v2-6", "kling-v2-7", "kling-v2-8", "kling-v2-9" ], "example": "kling-v2-6" }, "prompt": { "type": "string", "description": "视频生成提示词,描述期望生成的视频内容", "maxLength": 2500, "example": "一只可爱的小猫在阳光下玩耍" }, "mode": { "type": "string", "description": "生成模式: std(标准模式,性价比高)、pro(专家模式,高品质)", "enum": [ "std", "pro" ], "default": "std", "example": "std" }, "seconds": { "type": "string", "description": "视频时长(秒),可选值: 5、10", "enum": [ "5", "10" ], "example": "5" }, "size": { "type": "string", "description": "视频分辨率(宽×高),用于判断横竖屏,宽>高为横屏,宽<高为竖屏", "example": "1280x720" }, "negative_prompt": { "type": "string", "description": "负向提示词,描述不希望出现的内容", "maxLength": 2500, "example": "模糊、低质量" }, "input_reference": { "type": "string", "description": "参考图片,支持图片URL或Base64编码(不带data:前缀)。传入此参数后自动调用图生视频接口。支持jpg/jpeg/png,最大10MB,最小300px,宽高比1:2.5~2.5:1", "example": "https://example.com/reference.jpg" }, "image_tail": { "type": "string", "description": "参考图像-尾帧控制。支持图片URL或Base64编码,用于控制视频尾帧。与input_reference至少二选一", "example": "https://example.com/tail.jpg" }, "image_list": { "type": "array", "description": "多图参考列表,最多4张图片。传入此参数后自动调用多图生视频接口", "maxItems": 4, "items": { "type": "object", "required": [ "image" ], "properties": { "image": { "type": "string", "description": "图片URL或Base64编码", "example": "https://example.com/image1.jpg" }, "type": { "type": "string", "description": "首尾帧标记(omni-video专用)", "enum": [ "first_frame", "end_frame" ], "example": "first_frame" } }, "x-apifox-orders": [ "image", "type" ], "x-apifox-ignore-properties": [] } }, "sound": { "type": "string", "description": "生成视频时是否同时生成声音。仅v2.6及后续版本模型支持", "enum": [ "on", "off" ], "example": "on" }, "voice_list": { "type": "array", "description": "生成视频时引用的音色列表,最多2个音色。当voice_list不为空且prompt中引用音色ID时,按\"有指定音色\"计量计费。仅v2.6及后续版本模型支持", "maxItems": 2, "items": { "type": "object", "required": [ "voice_id" ], "properties": { "voice_id": { "type": "string", "description": "音色ID。可使用系统预置音色(1,2,3,4)或通过音色定制接口返回的音色ID", "example": "1" } }, "x-apifox-orders": [ "voice_id" ], "x-apifox-ignore-properties": [] } }, "image_url": { "type": "string", "description": "参考图片URL(动作控制专用)。与video_url、character_orientation同时传入时启用动作控制", "example": "https://example.com/character.jpg" }, "video_url": { "type": "string", "description": "参考视频URL(动作控制专用)。与image_url、character_orientation同时传入时启用动作控制", "example": "https://example.com/reference.mp4" }, "character_orientation": { "type": "string", "description": "角色朝向(动作控制专用)。控制生成视频中角色的朝向方向", "example": "front" }, "keep_original_sound": { "type": "string", "description": "是否保留参考视频原声(动作控制专用)", "enum": [ "yes", "no" ], "example": "no" }, "cfg_scale": { "type": "number", "description": "生成视频的自由度,取值范围[0, 1]。值越大,模型自由度越小,与提示词相关性越强。注意: kling-v2.x模型不支持此参数", "minimum": 0, "maximum": 1, "example": 0.5 }, "camera_control": { "type": "object", "description": "控制摄像机运动的协议", "properties": { "type": { "type": "string", "description": "预定义的运镜类型", "enum": [ "simple", "down_back", "forward_up", "right_turn_forward", "left_turn_forward" ], "example": "simple" }, "config": { "type": "object", "description": "摄像机运动配置。当type为simple时必填,六个参数只能有一个不为0,其余为0", "properties": { "horizontal": { "type": "number", "description": "水平运镜,控制摄像机水平方向移动量(沿x轴平移)。负值: 向左平移,正值: 向右平移", "minimum": -10, "maximum": 10, "example": 0 }, "vertical": { "type": "number", "description": "垂直运镜,控制摄像机垂直方向移动量(沿y轴平移)。负值: 向下平移,正值: 向上平移", "minimum": -10, "maximum": 10, "example": 0 }, "pan": { "type": "number", "description": "水平摇镜,控制摄像机水平面旋转量(绕y轴旋转)。负值: 向左旋转,正值: 向右旋转", "minimum": -10, "maximum": 10, "example": 5 }, "tilt": { "type": "number", "description": "垂直摇镜,控制摄像机垂直面旋转量(沿x轴旋转)。负值: 向下旋转,正值: 向上旋转", "minimum": -10, "maximum": 10, "example": 0 }, "roll": { "type": "number", "description": "旋转运镜,控制摄像机滚动量(绕z轴旋转)。负值: 逆时针旋转,正值: 顺时针旋转", "minimum": -10, "maximum": 10, "example": 0 }, "zoom": { "type": "number", "description": "变焦,控制摄像机焦距变化。负值: 焦距变长、视野变小,正值: 焦距变短、视野变大", "minimum": -10, "maximum": 10, "example": 0 } }, "x-apifox-orders": [ "horizontal", "vertical", "pan", "tilt", "roll", "zoom" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "type", "config" ], "x-apifox-ignore-properties": [] }, "static_mask": { "type": "string", "description": "静态笔刷涂抹区域(仅图生视频)。用于指定视频中静止不动的区域。图片长宽比必须与input_reference相同", "example": "https://example.com/static_mask.jpg" }, "dynamic_masks": { "type": "array", "description": "动态笔刷配置列表(仅图生视频)。可配置多组(最多6组),每组包含涂抹区域与运动轨迹", "maxItems": 6, "items": { "type": "object", "properties": { "mask": { "type": "string", "description": "动态笔刷涂抹区域(mask图片)。支持图片URL或Base64编码。图片长宽比必须与input_reference相同", "example": "https://example.com/dynamic_mask.jpg" }, "trajectories": { "type": "array", "description": "运动轨迹坐标序列,坐标个数[2, 77]。以图片左下角为原点。坐标点越多轨迹越准确,传入顺序决定运动方向", "minItems": 2, "maxItems": 77, "items": { "type": "object", "required": [ "x", "y" ], "properties": { "x": { "type": "integer", "description": "x坐标", "example": 279 }, "y": { "type": "integer", "description": "y坐标", "example": 219 } }, "x-apifox-orders": [ "x", "y" ], "x-apifox-ignore-properties": [] } } }, "x-apifox-orders": [ "mask", "trajectories" ], "x-apifox-ignore-properties": [] } }, "callback_url": { "type": "string", "format": "uri", "description": "任务结果回调通知地址。服务端会在任务状态变更时主动通知", "example": "https://example.com/callback" }, "external_task_id": { "type": "string", "description": "自定义任务ID。用户自定义任务ID,支持通过该ID进行任务查询。单用户下需保证唯一性", "example": "my-custom-task-123" } }, "x-apifox-orders": [ "model", "prompt", "mode", "seconds", "size", "negative_prompt", "input_reference", "image_tail", "image_list", "sound", "voice_list", "image_url", "video_url", "character_orientation", "keep_original_sound", "cfg_scale", "camera_control", "static_mask", "dynamic_masks", "callback_url", "external_task_id" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/kling-v2-6" }, "KlingV26CreateResponse": { "type": "object", "required": [ "id", "status" ], "properties": { "id": { "type": "string", "description": "视频任务唯一ID,用于后续查询任务状态", "example": "qvideo-user123-1704123456789" }, "object": { "type": "string", "description": "对象类型,固定为 video.generation", "example": "video.generation" }, "model": { "type": "string", "description": "使用的模型名称", "example": "kling-v2-6" }, "mode": { "type": "string", "description": "视频生成模式: std(标准模式) 或 pro(专家模式)", "enum": [ "std", "pro" ], "example": "std" }, "status": { "type": "string", "description": "任务状态: queued(排队中)、in_progress(处理中)、completed(成功)、failed(失败)", "enum": [ "queued", "in_progress", "downloading", "uploading", "completed", "failed", "cancelled", "expired" ], "example": "queued" }, "created_at": { "type": "integer", "format": "int64", "description": "任务创建时间(Unix时间戳,秒)", "example": 1704123456 }, "updated_at": { "type": "integer", "format": "int64", "description": "任务更新时间(Unix时间戳,秒)", "example": 1704123456 }, "seconds": { "type": "string", "description": "视频时长(秒)", "example": "5" }, "size": { "type": "string", "description": "视频分辨率(宽×高)", "example": "1280x720" } }, "x-apifox-orders": [ "id", "object", "model", "mode", "status", "created_at", "updated_at", "seconds", "size" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/kling-v2-6" }, "KlingV26VideoStatusResponse": { "type": "object", "required": [ "id", "status" ], "properties": { "id": { "type": "string", "description": "视频任务唯一ID", "example": "qvideo-user123-1704123456789" }, "object": { "type": "string", "description": "对象类型,固定为 video.generation", "example": "video.generation" }, "model": { "type": "string", "description": "使用的模型名称", "example": "kling-v2-6" }, "mode": { "type": "string", "description": "视频生成模式: std(标准模式) 或 pro(专家模式)", "enum": [ "std", "pro" ], "example": "std" }, "status": { "type": "string", "description": "任务状态", "enum": [ "initializing", "queued", "in_progress", "downloading", "uploading", "completed", "failed", "cancelled", "expired" ], "example": "completed" }, "progress": { "type": "integer", "description": "当前进度(0~100),仅在处理中时有意义", "minimum": 0, "maximum": 100, "example": 100 }, "created_at": { "type": "integer", "format": "int64", "description": "任务创建时间(Unix时间戳,秒)", "example": 1704123456 }, "updated_at": { "type": "integer", "format": "int64", "description": "任务更新时间(Unix时间戳,秒)", "example": 1704123556 }, "completed_at": { "type": "integer", "format": "int64", "description": "任务完成时间(Unix时间戳,秒),仅在任务完成时有值", "example": 1704123556 }, "expires_at": { "type": "integer", "format": "int64", "description": "视频资源过期时间(Unix时间戳,秒),视频将在此时间后被清理", "example": 1706715556 }, "seconds": { "type": "string", "description": "视频时长(秒)", "example": "5" }, "size": { "type": "string", "description": "视频分辨率(宽×高)", "example": "1280x720" }, "remixed_from_video_id": { "type": "string", "description": "如果此视频是混剪作品,此字段为原始视频的ID", "example": "" }, "task_result": { "type": "object", "description": "任务结果,包含生成的视频列表", "properties": { "videos": { "type": "array", "description": "生成的视频列表", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "生成的视频ID,全局唯一", "example": "video_123456" }, "url": { "type": "string", "format": "uri", "description": "生成视频的URL。注意: 生成的视频会在30天后被清理,请及时转存", "example": "https://kodo.qiniu.com/videos/output-123456.mp4" }, "duration": { "type": "string", "description": "视频总时长,单位: 秒", "example": "5.0" } }, "x-apifox-orders": [ "id", "url", "duration" ], "x-apifox-ignore-properties": [] } } }, "x-apifox-orders": [ "videos" ], "x-apifox-ignore-properties": [] }, "error": { "type": "object", "description": "视频生成错误信息", "properties": { "code": { "type": "string", "description": "错误代码", "example": "generation_failed" }, "message": { "type": "string", "description": "错误详细信息", "example": "视频生成失败: 内容不符合规范" } }, "x-apifox-orders": [ "code", "message" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "id", "object", "model", "mode", "status", "progress", "created_at", "updated_at", "completed_at", "expires_at", "seconds", "size", "remixed_from_video_id", "task_result", "error" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/kling-v2-6" }, "CreateVideoGenerationRequest": { "type": "object", "description": "创建视频生成任务的请求体", "required": [ "model", "instances" ], "properties": { "model": { "type": "string", "description": "模型名称,仅支持 veo 系列模型", "enum": [ "veo-2.0-generate-001", "veo-2.0-generate-exp", "veo-2.0-generate-preview", "veo-3.0-generate-preview", "veo-3.0-fast-generate-preview", "veo-3.1-generate-preview", "veo-3.1-fast-generate-preview" ], "example": "veo-3.0-generate-preview" }, "instances": { "type": "array", "description": "生成实例列表,当前仅支持恰好 1 个元素", "minItems": 1, "maxItems": 1, "items": { "$ref": "#/definitions/Instance" } }, "parameters": { "$ref": "#/definitions/Parameters" }, "callback_url": { "type": "string", "format": "uri", "description": "任务终态回调通知 URL。任务到达终态(Completed / Failed)时,系统会向该 URL 发送 HTTP POST 请求,payload 结构与 GET 查询接口响应体一致。最多重试 3 次(指数退避 2s → 4s),4xx 客户端错误不重试。", "example": "https://your-server.com/api/veo-callback" } }, "x-apifox-orders": [ "model", "instances", "parameters", "callback_url" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/Veo" }, "Instance": { "type": "object", "description": "视频生成实例", "required": [ "prompt" ], "properties": { "prompt": { "type": "string", "description": "文本提示词,描述需要生成的视频内容", "example": "A golden retriever running on a beach at sunset, cinematic lighting" }, "image": { "$ref": "#/definitions/ImageInput" }, "lastFrame": { "$ref": "#/definitions/LastFrameInput" }, "video": { "$ref": "#/definitions/VideoInput" }, "referenceImages": { "type": "array", "description": "参考图片列表,最多 3 张素材类型或 1 张风格类型。仅 veo-2.0-generate-exp 和 veo-3.1-generate-preview 模型支持。使用参考图片时不能同时设置 image 字段,且视频时长必须为 8 秒。", "items": { "$ref": "#/definitions/ReferenceImage" } }, "compressionQuality": { "type": "string", "description": "视频压缩质量", "enum": [ "low", "medium", "high" ] } }, "x-apifox-orders": [ "prompt", "image", "lastFrame", "video", "referenceImages", "compressionQuality" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/Veo" }, "ImageInput": { "type": "object", "description": "输入图片,用于图生视频模式。图片大小不超过 10MB。提供 bytesBase64Encoded 或 uri 其中之一。", "properties": { "bytesBase64Encoded": { "type": "string", "format": "byte", "description": "图片的 Base64 编码数据" }, "uri": { "type": "string", "format": "uri", "description": "图片的 URI 地址" }, "mimeType": { "type": "string", "description": "图片的 MIME 类型", "enum": [ "image/png", "image/jpeg", "image/webp" ], "example": "image/png" } }, "required": [ "mimeType" ], "x-apifox-orders": [ "bytesBase64Encoded", "uri", "mimeType" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/Veo" }, "LastFrameInput": { "type": "object", "description": "结束帧图片,指定视频最后一帧的画面。图片大小不超过 10MB。提供 bytesBase64Encoded 或 uri 其中之一。", "properties": { "bytesBase64Encoded": { "type": "string", "format": "byte", "description": "图片的 Base64 编码数据" }, "uri": { "type": "string", "format": "uri", "description": "图片的 URI 地址" }, "mimeType": { "type": "string", "description": "图片的 MIME 类型", "enum": [ "image/png", "image/jpeg", "image/webp" ], "example": "image/png" } }, "required": [ "mimeType" ], "x-apifox-orders": [ "bytesBase64Encoded", "uri", "mimeType" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/Veo" }, "VideoInput": { "type": "object", "description": "输入视频。视频大小不超过 10MB。提供 bytesBase64Encoded 或 uri 其中之一。", "properties": { "bytesBase64Encoded": { "type": "string", "format": "byte", "description": "视频的 Base64 编码数据" }, "uri": { "type": "string", "format": "uri", "description": "视频的 URI 地址" }, "mimeType": { "type": "string", "description": "视频的 MIME 类型", "enum": [ "video/mp4" ], "example": "video/mp4" } }, "required": [ "mimeType" ], "x-apifox-orders": [ "bytesBase64Encoded", "uri", "mimeType" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/Veo" }, "ReferenceImage": { "type": "object", "description": "参考图片,用于指导视频生成的风格或素材", "properties": { "image": { "$ref": "#/definitions/ImageInput" }, "referenceType": { "type": "string", "description": "参考图片类型:asset 表示素材参考,style 表示风格参考", "enum": [ "asset", "style" ], "example": "asset" } }, "x-apifox-orders": [ "image", "referenceType" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/Veo" }, "Parameters": { "type": "object", "description": "视频生成参数", "properties": { "aspectRatio": { "type": "string", "description": "视频宽高比", "enum": [ "16:9", "9:16" ], "example": "16:9" }, "durationSeconds": { "type": "integer", "format": "int64", "description": "视频时长(秒)。Veo 2 模型支持 5-8 秒;Veo 3 模型支持 4、6 或 8 秒。使用参考图片时仅支持 8 秒。", "example": 8 }, "sampleCount": { "type": "integer", "format": "int64", "description": "生成视频的数量,范围 1-4", "minimum": 1, "maximum": 4, "example": 1 }, "seed": { "type": "integer", "format": "int64", "description": "随机种子,用于确定性输出,范围 0-4294967295", "minimum": 0, "maximum": 4294967295, "example": 42 }, "negativePrompt": { "type": "string", "description": "负向提示词,描述不希望出现在视频中的内容", "example": "blurry, low quality, distorted" }, "personGeneration": { "type": "string", "description": "人物生成策略", "enum": [ "allow_adult", "dont_allow" ], "example": "dont_allow" }, "resolution": { "type": "string", "description": "视频分辨率,仅 Veo 3 模型支持", "enum": [ "720p", "1080p" ], "example": "720p" }, "generateAudio": { "type": "boolean", "description": "是否同时生成音频", "default": false, "example": false }, "enhancePrompt": { "type": "boolean", "description": "是否启用提示词增强", "default": false, "example": false }, "fps": { "type": "integer", "format": "int32", "description": "视频帧率" }, "resizeMode": { "type": "string", "description": "图生视频时的调整大小模式,仅 Veo 3 模型支持", "enum": [ "pad", "crop" ], "default": "pad", "example": "pad" } }, "x-apifox-orders": [ "aspectRatio", "durationSeconds", "sampleCount", "seed", "negativePrompt", "personGeneration", "resolution", "generateAudio", "enhancePrompt", "fps", "resizeMode" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/Veo" }, "CreateVideoGenerationResponse": { "type": "object", "description": "创建任务成功的响应", "required": [ "id" ], "properties": { "id": { "type": "string", "description": "任务 ID,用于查询任务状态和结果", "example": "chatvideo-1709712000000000000-uid123" } }, "x-apifox-orders": [ "id" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/Veo" }, "VideoGenerationJobInfo": { "type": "object", "description": "视频生成任务详情", "required": [ "id", "model", "status", "message", "data", "created_at", "updated_at" ], "properties": { "id": { "type": "string", "description": "任务 ID", "example": "chatvideo-1709712000000000000-uid123" }, "model": { "type": "string", "description": "使用的模型名称", "example": "veo-3.0-generate-preview" }, "status": { "type": "string", "description": "任务状态", "enum": [ "Initializing", "Queued", "Running", "Completed", "Failed", "Uploading", "Unknown" ], "example": "Completed" }, "message": { "type": "string", "description": "任务状态的中文描述信息。失败时包含具体原因说明。", "example": "完成" }, "data": { "$ref": "#/definitions/VideoGenerationData" }, "created_at": { "type": "string", "format": "date-time", "description": "任务创建时间", "example": "2025-03-06T12:00:00Z" }, "updated_at": { "type": "string", "format": "date-time", "description": "任务最后更新时间", "example": "2025-03-06T12:05:30Z" } }, "x-apifox-orders": [ "id", "model", "status", "message", "data", "created_at", "updated_at" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/Veo" }, "VideoGenerationData": { "type": "object", "description": "视频生成结果数据", "properties": { "videos": { "type": "array", "description": "生成的视频列表。任务未完成时为空数组。", "items": { "$ref": "#/definitions/VideoResult" } }, "raiMediaFilteredCount": { "type": "integer", "format": "int32", "description": "因违反使用准则而被过滤的视频数量。被过滤的视频不会收费。", "example": 0 } }, "x-apifox-orders": [ "videos", "raiMediaFilteredCount" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/Veo" }, "VideoResult": { "type": "object", "description": "单个生成视频的信息", "properties": { "url": { "type": "string", "format": "uri", "description": "视频下载链接(有效期 14 天)", "example": "https://cdn.example.com/videos/sample_0.mp4?token=xxx&e=1711904000" }, "mimeType": { "type": "string", "description": "视频的 MIME 类型", "example": "video/mp4" } }, "x-apifox-orders": [ "url", "mimeType" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/Veo" }, "ErrorResponse": { "type": "object", "description": "错误响应", "required": [ "error" ], "properties": { "error": { "type": "object", "description": "错误详情", "required": [ "message", "type" ], "properties": { "message": { "type": "string", "description": "错误信息" }, "type": { "type": "string", "description": "错误类型", "enum": [ "invalid_request_error", "authentication_error", "quota_exceeded", "file_size_limit_exceeded", "output_video_duration_error", "create_vertex_job_withdb_failed", "view_vertex_video_job_failed", "invalid_response", "api_error" ] } }, "x-apifox-orders": [ "message", "type" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "error" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频/Veo" }, "VideoCreateResponse": { "type": "object", "properties": { "id": { "type": "string", "description": "视频任务唯一 ID,用于后续查询任务状态" }, "object": { "type": "string", "enum": [ "video" ], "description": "对象类型,固定为 video" }, "model": { "type": "string", "description": "使用的模型名称,例如 kling-video-o1" }, "mode": { "type": "string", "description": "生成模式,std(标准模式)或 pro(专家模式)" }, "status": { "type": "string", "description": "任务状态,通常为 queued(排队中)" }, "created_at": { "type": "integer", "description": "创建时间(Unix 时间戳,秒)" }, "updated_at": { "type": "integer", "description": "更新时间(Unix 时间戳,秒)" }, "seconds": { "type": "string", "description": "视频时长(秒)" }, "size": { "type": "string", "description": "请求体中的视频分辨率(宽 x 高)" } }, "x-apifox-orders": [ "id", "object", "model", "mode", "status", "created_at", "updated_at", "seconds", "size" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频" }, "VideoStatusResponse": { "type": "object", "description": "视频任务状态响应", "properties": { "id": { "type": "string", "description": "视频任务唯一 ID" }, "object": { "type": "string", "enum": [ "video" ], "description": "对象类型,固定为 video" }, "model": { "type": "string", "description": "使用的模型名称" }, "mode": { "type": "string", "description": "生成模式,std 或 pro,仅在成功时返回" }, "status": { "type": "string", "enum": [ "initializing", "queued", "in_progress", "downloading", "uploading", "completed", "failed", "cancelled" ], "description": "任务状态:initializing(初始化中)、queued(排队中)、in_progress(处理中)、downloading(下载中)、uploading(上传中)、completed(已完成)、failed(失败)、cancelled(已取消)" }, "created_at": { "type": "integer", "description": "创建时间(Unix 时间戳,秒)" }, "updated_at": { "type": "integer", "description": "更新时间(Unix 时间戳,秒)" }, "completed_at": { "type": "integer", "description": "完成时间(Unix 时间戳,秒),仅在已完成或失败时返回" }, "seconds": { "type": "string", "description": "视频时长(秒)" }, "size": { "type": "string", "description": "视频分辨率(宽 x 高)" }, "task_result": { "type": "object", "description": "任务结果,包含生成的视频列表,仅在已完成时返回", "properties": { "videos": { "type": "array", "description": "生成的视频列表", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "视频 ID,全局唯一" }, "url": { "type": "string", "description": "视频下载 URL(注意:生成的视频会在 7 天后过期,请及时转存)" }, "duration": { "type": "string", "description": "视频时长(秒)" } }, "x-apifox-orders": [ "id", "url", "duration" ], "x-apifox-ignore-properties": [] } } }, "x-apifox-orders": [ "videos" ], "x-apifox-ignore-properties": [] }, "error": { "type": "object", "description": "错误信息,仅在失败时返回", "properties": { "code": { "type": "string", "description": "错误码" }, "message": { "type": "string", "description": "错误描述" } }, "x-apifox-orders": [ "code", "message" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "id", "object", "model", "mode", "status", "created_at", "updated_at", "completed_at", "seconds", "size", "task_result", "error" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频" }, "Veo31FastImageToVideoInput": { "x-fal-order-properties": [ "prompt", "aspect_ratio", "duration", "negative_prompt", "resolution", "generate_audio", "seed", "auto_fix", "safety_tolerance", "image_url" ], "type": "object", "properties": { "prompt": { "description": "The text prompt describing the video you want to generate", "type": "string", "maxLength": 20000, "title": "Prompt", "example": "A monkey and polar bear host a casual podcast about AI inference, bringing their unique perspectives from different environments (tropical vs. arctic) to discuss how AI systems make decisions and process information.\nSample Dialogue:\nMonkey (Banana): \"Welcome back to Bananas & Ice! I am Banana\"\nPolar Bear (Ice): \"And I'm Ice!\"" }, "duration": { "enum": [ "4s", "6s", "8s" ], "description": "The duration of the generated video.", "type": "string", "title": "Duration", "default": "8s" }, "auto_fix": { "description": "Whether to automatically attempt to fix prompts that fail content policy or other validation checks by rewriting them.", "type": "boolean", "title": "Auto Fix", "default": false }, "generate_audio": { "description": "Whether to generate audio for the video.", "type": "boolean", "title": "Generate Audio", "default": true }, "aspect_ratio": { "enum": [ "auto", "16:9", "9:16" ], "description": "The aspect ratio of the generated video. Only 16:9 and 9:16 are supported.", "type": "string", "title": "Aspect Ratio", "default": "auto" }, "resolution": { "enum": [ "720p", "1080p", "4k" ], "description": "The resolution of the generated video.", "type": "string", "title": "Resolution", "default": "720p" }, "image_url": { "description": "URL of the input image to animate. Should be 720p or higher resolution in 16:9 or 9:16 aspect ratio. If the image is not in 16:9 or 9:16 aspect ratio, it will be cropped to fit.", "type": "string", "title": "Image URL", "example": "https://storage.googleapis.com/falserverless/example_inputs/veo31_i2v_input.jpg" }, "safety_tolerance": { "enum": [ "1", "2", "3", "4", "5", "6" ], "description": "The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict.", "type": "string", "title": "Safety Tolerance", "default": "4" }, "seed": { "description": "The seed for the random number generator.", "title": "Seed" }, "negative_prompt": { "description": "A negative prompt to guide the video generation.", "title": "Negative Prompt" } }, "title": "Veo31ImageToVideoInput", "required": [ "prompt", "image_url" ], "x-apifox-orders": [ "prompt", "duration", "auto_fix", "generate_audio", "aspect_ratio", "resolution", "image_url", "safety_tolerance", "seed", "negative_prompt" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频" }, "Veo31FastImageToVideoOutput": { "x-fal-order-properties": [ "video" ], "type": "object", "properties": { "video": { "description": "The generated video.", "$ref": "#/definitions/File1", "example": { "url": "https://storage.googleapis.com/falserverless/model_tests/gallery/veo3-1-i2v.mp4" } } }, "title": "Veo31ImageToVideoOutput", "required": [ "video" ], "x-apifox-orders": [ "video" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频" }, "File1": { "x-fal-order-properties": [ "url", "content_type", "file_name", "file_size" ], "type": "object", "properties": { "file_size": { "description": "The size of the file in bytes.", "title": "File Size", "example": 4404019 }, "file_name": { "description": "The name of the file. It will be auto-generated if not provided.", "title": "File Name", "example": "z9RV14K95DvU.png" }, "content_type": { "description": "The mime type of the file.", "title": "Content Type", "example": "image/png" }, "url": { "description": "The URL where the file can be downloaded from.", "type": "string", "title": "Url" } }, "title": "File", "required": [ "url" ], "x-apifox-orders": [ "file_size", "file_name", "content_type", "url" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "视频" }, "KlingV1CreateImageRequest": { "type": "object", "required": [ "model", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "kling-v1" ], "description": "图像生成模型名称" }, "prompt": { "type": "string", "maxLength": 2500, "description": "图像生成的文本描述提示词。字符数限制:不超过 2500 个字符。建议包含风格、光线、构图、色彩等细节", "example": "一只橘色的猫,坐在窗台上,温暖的阳光,柔和的阴影,专业摄影,高清画质" }, "image": { "type": "string", "description": "参考图像(单图生图时使用)。支持传入图片 Base64 编码或图片 URL(确保可访问)。若使用 Base64 方式,请确保所有图像数据参数均采用 Base64 编码格式,不要添加任何前缀(如 data:image/png;base64,)。图片格式支持:.jpg/.jpeg/.png。图片文件大小不能超过 10MB。图片宽高尺寸不小于 300px。图片宽高比要在 1:2.5 ~ 2.5:1 之间", "example": "https://aitoken-public.qnaigc.com/example/generate-video/running-man.jpg" }, "n": { "type": "integer", "minimum": 1, "maximum": 10, "default": 1, "description": "生成图像数量,取值范围:1-10" }, "negative_prompt": { "type": "string", "maxLength": 2500, "description": "负向文本提示词,用于指定不希望在生成图像中出现的内容。字符数限制:不超过 2500 个字符。注意:图生图场景下(image 字段不为空时)不支持负向提示词", "example": "模糊,低质量,变形,噪点" }, "aspect_ratio": { "type": "string", "enum": [ "16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9" ], "default": "16:9", "description": "生成图片的画面纵横比(宽:高)" } }, "x-apifox-orders": [ "model", "prompt", "image", "n", "negative_prompt", "aspect_ratio" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/kling-v1" }, "KlingV1EditImageRequest": { "type": "object", "required": [ "model", "image", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "kling-v1" ], "description": "图像生成模型名称" }, "image": { "type": "string", "description": "输入图像 URL。注意:多图生图场景下此参数必填,但可以传空字符串,实际图像通过 subject_image_list 等参数指定。如果直接提供图像 URL,必须是公开可访问的链接", "example": "" }, "prompt": { "type": "string", "maxLength": 2500, "description": "图像编辑的文本描述提示词。清晰描述期望的编辑效果,包含风格、色彩、构图等具体细节。字符数限制:不超过 2500 个字符", "example": "综合两个图像生成一个新场景" }, "n": { "type": "integer", "minimum": 1, "maximum": 10, "default": 1, "description": "生成图像数量,取值范围:1-10" }, "subject_image_list": { "type": "array", "minItems": 2, "maxItems": 4, "description": "多图生图的参考图片列表。最多支持 4 张图片,最少支持 2 张图片。图片格式支持:.jpg/.jpeg/.png。图片文件大小不能超过 10MB。图片宽高尺寸不小于 300px。图片宽高比要在 1:2.5 ~ 2.5:1 之间", "items": { "type": "object", "required": [ "subject_image" ], "properties": { "subject_image": { "type": "string", "format": "uri", "description": "参考图片 URL", "example": "https://example.com/subject.jpg" } }, "x-apifox-orders": [ "subject_image" ], "x-apifox-ignore-properties": [] } }, "scene_image": { "type": "string", "format": "uri", "description": "场景参考图 URL。内容为可公开访问的 URL 链接。图片格式支持:.jpg/.jpeg/.png。图片文件大小不能超过 10MB。图片宽高尺寸不小于 300px。图片宽高比要在 1:2.5 ~ 2.5:1 之间", "example": "https://example.com/scene.jpg" }, "style_image": { "type": "string", "format": "uri", "description": "风格参考图 URL。内容为可公开访问的 URL 链接。图片格式支持:.jpg/.jpeg/.png。图片文件大小不能超过 10MB。图片宽高尺寸不小于 300px。图片宽高比要在 1:2.5 ~ 2.5:1 之间", "example": "https://example.com/style.jpg" }, "aspect_ratio": { "type": "string", "enum": [ "16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9" ], "default": "16:9", "description": "生成图片的画面纵横比(宽:高)" } }, "x-apifox-orders": [ "model", "image", "prompt", "n", "subject_image_list", "scene_image", "style_image", "aspect_ratio" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/kling-v1" }, "KlingV15CreateImageRequest": { "type": "object", "required": [ "model", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "kling-v1-5" ], "description": "图像生成模型名称" }, "prompt": { "type": "string", "maxLength": 2500, "description": "图像生成的文本描述提示词。字符数限制:不超过 2500 个字符。建议包含风格、光线、构图、色彩等细节", "example": "一只橘色的猫,坐在窗台上,温暖的阳光,柔和的阴影,专业摄影,高清画质" }, "n": { "type": "integer", "minimum": 1, "maximum": 10, "default": 1, "description": "生成图像数量,取值范围:1-10" }, "negative_prompt": { "type": "string", "maxLength": 2500, "description": "负向文本提示词,用于指定不希望在生成图像中出现的内容。注意:图生图场景下(image 字段不为空时)不支持负向提示词", "example": "模糊,低质量,变形,噪点" }, "image": { "type": "string", "description": "参考图像。支持传入图片 Base64 编码或图片 URL(确保可访问)。若使用 Base64 方式,请确保所有图像数据参数均采用 Base64 编码格式,不要添加任何前缀(如 data:image/png;base64,)。图片格式支持:.jpg/.jpeg/.png。图片文件大小不能超过 10MB。图片宽高尺寸不小于 300px。图片宽高比要在 1:2.5 ~ 2.5:1 之间。注意:image_reference 参数不为空时,当前参数必填", "example": "https://example.com/reference-image.jpg" }, "image_reference": { "type": "string", "enum": [ "subject", "face" ], "description": "图片参考类型。subject:角色特征参考; face:人物长相参考。使用 face 时,上传图片需仅含 1 张人脸。使用 kling-v1-5 且 image 参数不为空时,当前参数必填" }, "image_fidelity": { "type": "number", "format": "float", "minimum": 0, "maximum": 1, "default": 0.5, "description": "生成过程中对用户上传图片的参考强度。取值范围:[0, 1]。数值越大,参考强度越大" }, "human_fidelity": { "type": "number", "format": "float", "minimum": 0, "maximum": 1, "default": 0.45, "description": "面部参考强度,即参考图中人物五官相似度。仅 image_reference 参数为 subject 时生效。取值范围:[0, 1]。数值越大,参考强度越大" }, "aspect_ratio": { "type": "string", "enum": [ "16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9" ], "default": "16:9", "description": "生成图片的画面纵横比(宽:高)" } }, "x-apifox-orders": [ "model", "prompt", "n", "negative_prompt", "image", "image_reference", "image_fidelity", "human_fidelity", "aspect_ratio" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/kling-v1-5" }, "KlingV2CreateImageRequest": { "type": "object", "required": [ "model", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "kling-v2" ], "description": "图像生成模型名称" }, "prompt": { "type": "string", "maxLength": 2500, "description": "图像生成的文本描述提示词。字符数限制:不超过 2500 个字符。建议包含风格、光线、构图、色彩等细节", "example": "一只橘色的猫,坐在窗台上,温暖的阳光,柔和的阴影,专业摄影,高清画质" }, "image": { "type": "string", "description": "参考图像(单图生图时使用)。支持传入图片 Base64 编码或图片 URL(确保可访问)。若使用 Base64 方式,请确保所有图像数据参数均采用 Base64 编码格式,不要添加任何前缀(如 data:image/png;base64,)。图片格式支持:.jpg/.jpeg/.png。图片文件大小不能超过 10MB。图片宽高尺寸不小于 300px。图片宽高比要在 1:2.5 ~ 2.5:1 之间", "example": "https://aitoken-public.qnaigc.com/example/generate-video/running-man.jpg" }, "n": { "type": "integer", "minimum": 1, "maximum": 10, "default": 1, "description": "生成图像数量,取值范围:1-10" }, "negative_prompt": { "type": "string", "maxLength": 2500, "description": "负向文本提示词,用于指定不希望在生成图像中出现的内容。字符数限制:不超过 2500 个字符", "example": "模糊,低质量,变形,噪点" }, "aspect_ratio": { "type": "string", "enum": [ "16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9" ], "default": "16:9", "description": "生成图片的画面纵横比(宽:高)" } }, "x-apifox-orders": [ "model", "prompt", "image", "n", "negative_prompt", "aspect_ratio" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/kling-v2" }, "KlingV2EditImageRequest": { "type": "object", "required": [ "model", "image", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "kling-v2" ], "description": "图像生成模型名称,当前仅支持 kling-v2" }, "image": { "type": "string", "description": "输入图像 URL。注意:图生图场景下此参数必填,但可以传空字符串,实际图像通过其他参数指定。如果直接提供图像 URL,必须是公开可访问的链接", "example": "" }, "prompt": { "type": "string", "maxLength": 2500, "description": "图像编辑的文本描述提示词。清晰描述期望的编辑效果,包含风格、色彩、构图等具体细节。字符数限制:不超过 2500 个字符", "example": "综合两个图像画一个漫画图" }, "n": { "type": "integer", "minimum": 1, "maximum": 10, "default": 1, "description": "生成图像数量,取值范围:1-10" }, "subject_image_list": { "type": "array", "minItems": 2, "maxItems": 4, "description": "多图生图的参考图片列表。最多支持 4 张图片,最少支持 2 张图片。图片格式支持:.jpg/.jpeg/.png。图片文件大小不能超过 10MB。图片宽高尺寸不小于 300px。图片宽高比要在 1:2.5 ~ 2.5:1 之间", "items": { "type": "object", "properties": { "subject_image": { "type": "string", "format": "uri", "description": "参考图片 URL", "example": "https://example.com/subject.jpg" } }, "x-apifox-refs": {}, "x-apifox-orders": [ "subject_image" ], "required": [ "subject_image" ], "x-apifox-ignore-properties": [] } }, "scene_image": { "type": "string", "format": "uri", "description": "场景参考图 URL。内容为可公开访问的 URL 链接。图片格式支持:.jpg/.jpeg/.png。图片文件大小不能超过 10MB。图片宽高尺寸不小于 300px。图片宽高比要在 1:2.5 ~ 2.5:1 之间", "example": "https://example.com/scene.jpg" }, "style_image": { "type": "string", "format": "uri", "description": "风格参考图 URL。内容为可公开访问的 URL 链接。图片格式支持:.jpg/.jpeg/.png。图片文件大小不能超过 10MB。图片宽高尺寸不小于 300px。图片宽高比要在 1:2.5 ~ 2.5:1 之间", "example": "https://example.com/style.jpg" }, "aspect_ratio": { "type": "string", "enum": [ "16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9" ], "default": "16:9", "description": "生成图片的画面纵横比(宽:高)" } }, "x-apifox-orders": [ "model", "image", "prompt", "n", "subject_image_list", "scene_image", "style_image", "aspect_ratio" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/kling-v2" }, "KlingV2NewCreateImageRequest": { "type": "object", "required": [ "model", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "kling-v2-new" ], "description": "图像生成模型名称" }, "prompt": { "type": "string", "maxLength": 2500, "description": "图像生成的文本描述提示词。字符数限制:不超过 2500 个字符。建议包含风格、光线、构图、色彩等细节", "example": "一只橘色的猫,坐在窗台上,温暖的阳光,柔和的阴影,专业摄影,高清画质" }, "image": { "type": "string", "description": "参考图像(单图生图时使用)。支持传入图片 Base64 编码或图片 URL(确保可访问)。若使用 Base64 方式,请确保所有图像数据参数均采用 Base64 编码格式,不要添加任何前缀(如 data:image/png;base64,)。图片格式支持:.jpg/.jpeg/.png。图片文件大小不能超过 10MB。图片宽高尺寸不小于 300px。图片宽高比要在 1:2.5 ~ 2.5:1 之间", "example": "https://aitoken-public.qnaigc.com/example/generate-video/running-man.jpg" }, "n": { "type": "integer", "minimum": 1, "maximum": 10, "default": 1, "description": "生成图像数量,取值范围:1-10" }, "negative_prompt": { "type": "string", "maxLength": 2500, "description": "负向文本提示词,用于指定不希望在生成图像中出现的内容。字符数限制:不超过 2500 个字符", "example": "模糊,低质量,变形,噪点" }, "aspect_ratio": { "type": "string", "enum": [ "16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9" ], "default": "16:9", "description": "生成图片的画面纵横比(宽:高)" } }, "x-apifox-orders": [ "model", "prompt", "image", "n", "negative_prompt", "aspect_ratio" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/kling-v2-new" }, "KlingV21CreateImageRequest": { "type": "object", "required": [ "model", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "kling-v2-1" ], "description": "图像生成模型名称" }, "prompt": { "type": "string", "maxLength": 2500, "description": "图像生成的文本描述提示词。字符数限制:不超过 2500 个字符。建议包含风格、光线、构图、色彩等细节", "example": "一只橘色的猫,坐在窗台上,温暖的阳光,柔和的阴影,专业摄影,高清画质" }, "image": { "type": "string", "description": "参考图像(单图生图时使用)。支持传入图片 Base64 编码或图片 URL(确保可访问)。若使用 Base64 方式,请确保所有图像数据参数均采用 Base64 编码格式,不要添加任何前缀(如 data:image/png;base64,)。图片格式支持:.jpg/.jpeg/.png。图片文件大小不能超过 10MB。图片宽高尺寸不小于 300px。图片宽高比要在 1:2.5 ~ 2.5:1 之间", "example": "https://aitoken-public.qnaigc.com/example/generate-video/running-man.jpg" }, "n": { "type": "integer", "minimum": 1, "maximum": 10, "default": 1, "description": "生成图像数量,取值范围:1-10" }, "negative_prompt": { "type": "string", "maxLength": 2500, "description": "负向文本提示词,用于指定不希望在生成图像中出现的内容。字符数限制:不超过 2500 个字符", "example": "模糊,低质量,变形,噪点" }, "aspect_ratio": { "type": "string", "enum": [ "16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9" ], "default": "16:9", "description": "生成图片的画面纵横比(宽:高)" } }, "x-apifox-orders": [ "model", "prompt", "image", "n", "negative_prompt", "aspect_ratio" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/kling-v2-1" }, "KlingV21EditImageRequest": { "type": "object", "required": [ "model", "image", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "kling-v2-1" ], "description": "图像生成模型名称" }, "image": { "type": "string", "description": "输入图像 URL。注意:多图生图场景下此参数必填,但可以传空字符串,实际图像通过 subject_image_list 等参数指定。如果直接提供图像 URL,必须是公开可访问的链接", "example": "" }, "prompt": { "type": "string", "maxLength": 2500, "description": "图像编辑的文本描述提示词。清晰描述期望的编辑效果,包含风格、色彩、构图等具体细节。字符数限制:不超过 2500 个字符", "example": "综合两个图像生成一个新场景" }, "n": { "type": "integer", "minimum": 1, "maximum": 10, "default": 1, "description": "生成图像数量,取值范围:1-10" }, "subject_image_list": { "type": "array", "minItems": 2, "maxItems": 4, "description": "多图生图的参考图片列表。最多支持 4 张图片,最少支持 2 张图片。图片格式支持:.jpg/.jpeg/.png。图片文件大小不能超过 10MB。图片宽高尺寸不小于 300px。图片宽高比要在 1:2.5 ~ 2.5:1 之间", "items": { "type": "object", "required": [ "subject_image" ], "properties": { "subject_image": { "type": "string", "format": "uri", "description": "参考图片 URL", "example": "https://example.com/subject.jpg" } }, "x-apifox-orders": [ "subject_image" ], "x-apifox-ignore-properties": [] } }, "scene_image": { "type": "string", "format": "uri", "description": "场景参考图 URL。内容为可公开访问的 URL 链接。图片格式支持:.jpg/.jpeg/.png。图片文件大小不能超过 10MB。图片宽高尺寸不小于 300px。图片宽高比要在 1:2.5 ~ 2.5:1 之间", "example": "https://example.com/scene.jpg" }, "style_image": { "type": "string", "format": "uri", "description": "风格参考图 URL。内容为可公开访问的 URL 链接。图片格式支持:.jpg/.jpeg/.png。图片文件大小不能超过 10MB。图片宽高尺寸不小于 300px。图片宽高比要在 1:2.5 ~ 2.5:1 之间", "example": "https://example.com/style.jpg" }, "aspect_ratio": { "type": "string", "enum": [ "16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9" ], "default": "16:9", "description": "生成图片的画面纵横比(宽:高)" } }, "x-apifox-orders": [ "model", "image", "prompt", "n", "subject_image_list", "scene_image", "style_image", "aspect_ratio" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/kling-v2-1" }, "Gemini25FlashImageChatCompletionRequest": { "type": "object", "required": [ "model", "messages" ], "properties": { "model": { "type": "string", "enum": [ "gemini-2.5-flash-image" ], "description": "模型名称" }, "messages": { "type": "array", "description": "对话消息数组", "items": { "$ref": "#/definitions/ChatMessage" } }, "stream": { "type": "boolean", "default": false, "description": "是否启用流式输出\n- true:流式返回,可实时接收生成进度\n- false:等待生成完成后返回完整结果" }, "image_config": { "$ref": "#/definitions/Gemini25FlashImageConfig" }, "temperature": { "type": "number", "format": "float", "minimum": 0, "maximum": 2, "description": "生成温度,取值范围:0.0-2.0" }, "top_p": { "type": "number", "format": "float", "minimum": 0, "maximum": 1, "description": "核采样参数,取值范围:0.0-1.0" }, "top_k": { "type": "integer", "minimum": 1, "description": "Top-K 采样参数,最小值:1" } }, "x-apifox-orders": [ "model", "messages", "stream", "image_config", "temperature", "top_p", "top_k" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/gemini-2.5-flash-image" }, "Gemini25FlashImageGenerationRequest": { "type": "object", "required": [ "model", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "gemini-2.5-flash-image" ], "description": "图像生成模型名称" }, "prompt": { "type": "string", "description": "图像生成的文本描述提示词\n\n建议:\n- 提示词越详细、具体,生成的图像质量越好\n- 建议包含:风格、光线、构图、色彩等细节\n- 使用逗号分隔不同的描述要素" }, "image_config": { "$ref": "#/definitions/Gemini25FlashImageConfig" }, "temperature": { "type": "number", "format": "float", "minimum": 0, "maximum": 2, "description": "生成温度,取值范围:0.0-2.0" }, "top_p": { "type": "number", "format": "float", "minimum": 0, "maximum": 1, "description": "核采样参数,取值范围:0.0-1.0" }, "top_k": { "type": "integer", "minimum": 1, "description": "Top-K 采样参数,最小值:1" } }, "x-apifox-orders": [ "model", "prompt", "image_config", "temperature", "top_p", "top_k" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/gemini-2.5-flash-image" }, "Gemini25FlashImageEditRequest": { "type": "object", "required": [ "model", "image", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "gemini-2.5-flash-image" ], "description": "图像生成模型名称" }, "image": { "description": "输入图像,支持以下格式:\n- **Base64 data URI**:使用 `data:image/png;base64,` 前缀 + Base64 编码的图像数据\n- **图片 URL**:可访问的公网图片链接,如 `https://example.com/image.jpg`\n- **数组形式**:支持传入多张图片,格式为 [\"url1\", \"url2\"] 或混合 data URI 和 URL" }, "prompt": { "type": "string", "description": "图像编辑的文本描述提示词" }, "image_config": { "$ref": "#/definitions/Gemini25FlashImageConfig" }, "temperature": { "type": "number", "format": "float", "minimum": 0, "maximum": 2, "description": "生成温度,取值范围:0.0-2.0" }, "top_p": { "type": "number", "format": "float", "minimum": 0, "maximum": 1, "description": "核采样参数,取值范围:0.0-1.0" }, "top_k": { "type": "integer", "minimum": 1, "description": "Top-K 采样参数,最小值:1" } }, "x-apifox-orders": [ "model", "image", "prompt", "image_config", "temperature", "top_p", "top_k" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/gemini-2.5-flash-image" }, "Gemini25FlashImageConfig": { "type": "object", "description": "图像配置对象,用于控制图像比例(gemini-2.5-flash-image 模型专用,仅支持1K分辨率)", "properties": { "aspect_ratio": { "type": "string", "enum": [ "1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9" ], "description": "图像宽高比" } }, "x-apifox-orders": [ "aspect_ratio" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/gemini-2.5-flash-image" }, "Gemini30ProImageChatCompletionRequest": { "type": "object", "required": [ "model", "messages" ], "properties": { "model": { "type": "string", "enum": [ "gemini-3.0-pro-image-preview" ], "description": "模型名称" }, "messages": { "type": "array", "description": "对话消息数组", "items": { "$ref": "#/definitions/ChatMessage" } }, "stream": { "type": "boolean", "default": false, "description": "是否启用流式输出\n- true:流式返回,可实时接收生成进度\n- false:等待生成完成后返回完整结果" }, "image_config": { "$ref": "#/definitions/Gemini30ProImageConfig" }, "temperature": { "type": "number", "format": "float", "minimum": 0, "maximum": 2, "description": "生成温度,取值范围:0.0-2.0" }, "top_p": { "type": "number", "format": "float", "minimum": 0, "maximum": 1, "description": "核采样参数,取值范围:0.0-1.0" }, "top_k": { "type": "integer", "minimum": 1, "description": "Top-K 采样参数,最小值:1" } }, "x-apifox-orders": [ "model", "messages", "stream", "image_config", "temperature", "top_p", "top_k" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/gemini-3.0-pro-image-preview" }, "Gemini30ProImageGenerationRequest": { "type": "object", "required": [ "model", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "gemini-3.0-pro-image-preview" ], "description": "图像生成模型名称" }, "prompt": { "type": "string", "description": "图像生成的文本描述提示词\n\n建议:\n- 提示词越详细、具体,生成的图像质量越好\n- 建议包含:风格、光线、构图、色彩等细节\n- 使用逗号分隔不同的描述要素\n\n示例:\"一只橘色的猫,坐在窗台上,温暖的阳光,柔和的阴影,专业摄影,高清画质,4K 分辨率\"" }, "image_config": { "$ref": "#/definitions/Gemini30ProImageConfig" }, "temperature": { "type": "number", "format": "float", "minimum": 0, "maximum": 2, "description": "生成温度,取值范围:0.0-2.0\n\n控制生成的随机性和创意性:\n- 较低的值(如 0.2)使输出更确定和一致\n- 较高的值(如 1.0)使输出更随机和创意" }, "top_p": { "type": "number", "format": "float", "minimum": 0, "maximum": 1, "description": "核采样参数,取值范围:0.0-1.0\n\n用于控制生成的多样性:\n- 较低的值会使生成更集中于高概率选项\n- 注意:不建议同时修改 temperature 和 top_p" }, "top_k": { "type": "integer", "minimum": 1, "description": "Top-K 采样参数,最小值:1\n\n限制每步采样时考虑的候选项数量" } }, "x-apifox-orders": [ "model", "prompt", "image_config", "temperature", "top_p", "top_k" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/gemini-3.0-pro-image-preview" }, "Gemini30ProImageEditRequest": { "type": "object", "required": [ "model", "image", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "gemini-3.0-pro-image-preview" ], "description": "图像生成模型名称" }, "image": { "description": "输入图像,支持以下格式:\n- **Base64 data URI**:使用 `data:image/png;base64,` 前缀 + Base64 编码的图像数据\n- **图片 URL**:可访问的公网图片链接,如 `https://example.com/image.jpg`\n- **数组形式**:支持传入多张图片,格式为 [\"url1\", \"url2\"] 或混合 data URI 和 URL\n\n建议使用高质量的输入图像以获得更好的编辑效果" }, "prompt": { "type": "string", "description": "图像编辑的文本描述提示词\n\n建议:\n- 清晰描述期望的编辑效果\n- 包含风格、色彩、构图等具体细节\n- 使用逗号分隔不同的描述要素\n\n示例:\n- \"将图片中的天空改为日落时分的橙红色,增加温暖的氛围\"\n- \"将照片转换为油画风格,保持主体不变,增强色彩饱和度\"\n- \"移除背景中的杂物,让背景变得简洁干净\"" }, "image_config": { "$ref": "#/definitions/Gemini30ProImageConfig" }, "temperature": { "type": "number", "format": "float", "minimum": 0, "maximum": 2, "description": "生成温度,取值范围:0.0-2.0" }, "top_p": { "type": "number", "format": "float", "minimum": 0, "maximum": 1, "description": "核采样参数,取值范围:0.0-1.0" }, "top_k": { "type": "integer", "minimum": 1, "description": "Top-K 采样参数,最小值:1" } }, "x-apifox-orders": [ "model", "image", "prompt", "image_config", "temperature", "top_p", "top_k" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/gemini-3.0-pro-image-preview" }, "Gemini30ProImageConfig": { "type": "object", "description": "图像配置对象,用于控制图像比例和分辨率(gemini-3.0-pro-image-preview 模型专用)", "properties": { "aspect_ratio": { "type": "string", "enum": [ "1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9" ], "description": "图像宽高比" }, "image_size": { "type": "string", "enum": [ "1K", "2K", "4K" ], "description": "图像分辨率,支持 1K、2K、4K" } }, "x-apifox-orders": [ "aspect_ratio", "image_size" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成/gemini-3.0-pro-image-preview" }, "KlingImageTaskResponse": { "type": "object", "required": [ "task_id" ], "properties": { "task_id": { "type": "string", "description": "图像生成任务唯一 ID,用于后续查询任务状态" } }, "x-apifox-orders": [ "task_id" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成" }, "KlingImageTaskStatusResponse": { "type": "object", "required": [ "task_id", "created", "status", "status_message" ], "properties": { "task_id": { "type": "string", "description": "图像生成任务的唯一标识符" }, "created": { "type": "integer", "description": "任务创建时间(Unix 时间戳,秒)" }, "status": { "type": "string", "enum": [ "submitted", "processing", "succeed", "failed" ], "description": "任务的当前状态。submitted:已接收等待处理; processing:正在处理中; succeed:成功完成; failed:处理失败" }, "status_message": { "type": "string", "description": "描述当前状态的消息" }, "data": { "type": "array", "description": "包含生成图像信息的数组,仅在已完成时返回", "items": { "type": "object", "required": [ "index", "url" ], "properties": { "index": { "type": "integer", "description": "图像在生成序列中的索引" }, "url": { "type": "string", "format": "uri", "description": "访问生成图像文件的可直接访问 URL。注意:生成的图像会在 7 天后过期,请及时转存" } }, "x-apifox-orders": [ "index", "url" ], "x-apifox-ignore-properties": [] } }, "quantity": { "type": "integer", "description": "此任务中生成的图像数量,同时该数量会用于计量计算" } }, "x-apifox-orders": [ "task_id", "created", "status", "status_message", "data", "quantity" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成" }, "ChatMessage": { "type": "object", "description": "对话消息对象", "required": [ "role", "content" ], "properties": { "role": { "type": "string", "enum": [ "user", "assistant" ], "description": "消息角色" }, "content": {} }, "x-apifox-orders": [ "role", "content" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "" }, "ChatCompletionResponse": { "type": "object", "description": "对话完成响应", "properties": { "id": { "type": "string", "description": "对话完成 ID" }, "object": { "type": "string", "enum": [ "chat.completion" ], "description": "对象类型" }, "created": { "type": "integer", "format": "int64", "description": "响应创建时间戳(Unix 时间戳,秒)" }, "model": { "type": "string", "description": "使用的模型名称" }, "choices": { "type": "array", "description": "生成结果数组", "items": { "type": "object", "properties": { "index": { "type": "integer", "description": "结果索引" }, "message": { "type": "object", "properties": { "role": { "type": "string", "enum": [ "assistant" ], "description": "角色" }, "content": { "type": "string", "description": "文本内容(如果只是聊天)" }, "reasoning_content": { "type": "string", "description": "模型的思考过程和推理内容" }, "images": { "type": "array", "description": "生成的图像数组(如果有图像生成)", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image_url" ], "description": "图像类型" }, "image_url": { "type": "object", "properties": { "url": { "type": "string", "description": "Base64 data URI 格式的图像数据" } }, "x-apifox-orders": [ "url" ], "x-apifox-ignore-properties": [] }, "index": { "type": "integer", "description": "图像索引,从 0 开始" } }, "x-apifox-orders": [ "type", "image_url", "index" ], "x-apifox-ignore-properties": [] } } }, "x-apifox-orders": [ "role", "content", "reasoning_content", "images" ], "x-apifox-ignore-properties": [] }, "finish_reason": { "type": "string", "description": "完成原因,通常为 stop" } }, "x-apifox-orders": [ "index", "message", "finish_reason" ], "x-apifox-ignore-properties": [] } }, "usage": { "type": "object", "description": "Token 使用统计信息", "properties": { "prompt_tokens": { "type": "integer", "description": "输入 token 数" }, "completion_tokens": { "type": "integer", "description": "输出 token 数" }, "total_tokens": { "type": "integer", "description": "总 token 数" }, "prompt_tokens_details": { "type": "object", "properties": { "text_tokens": { "type": "integer", "description": "文本 token 数" } }, "x-apifox-orders": [ "text_tokens" ], "x-apifox-ignore-properties": [] }, "completion_tokens_details": { "type": "object", "properties": { "reasoning_tokens": { "type": "integer", "description": "推理 token 数" }, "image_tokens": { "type": "integer", "description": "图像 token 数" } }, "x-apifox-orders": [ "reasoning_tokens", "image_tokens" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "prompt_tokens", "completion_tokens", "total_tokens", "prompt_tokens_details", "completion_tokens_details" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "id", "object", "created", "model", "choices", "usage" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "" }, "ImageGenerationResponse": { "type": "object", "description": "图像生成响应", "properties": { "created": { "type": "integer", "format": "int64", "description": "响应创建时间戳(Unix 时间戳,秒)" }, "data": { "type": "array", "description": "生成的图像数据数组", "items": { "type": "object", "properties": { "b64_json": { "type": "string", "description": "Base64 编码的图像数据" } }, "x-apifox-orders": [ "b64_json" ], "x-apifox-ignore-properties": [] } }, "output_format": { "type": "string", "default": "png", "description": "输出格式" }, "usage": { "type": "object", "description": "Token 使用统计信息", "properties": { "total_tokens": { "type": "integer", "description": "总 token 数" }, "input_tokens": { "type": "integer", "description": "输入 token 数" }, "output_tokens": { "type": "integer", "description": "输出 token 数(图像生成消耗)" }, "input_tokens_details": { "type": "object", "properties": { "text_tokens": { "type": "integer", "description": "文本 token 数" }, "image_tokens": { "type": "integer", "description": "图像 token 数" } }, "x-apifox-orders": [ "text_tokens", "image_tokens" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "total_tokens", "input_tokens", "output_tokens", "input_tokens_details" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "created", "data", "output_format", "usage" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "" }, "CreateOmniImageRequest": { "title": "FalOmniImageRequest", "type": "object", "properties": { "prompt": { "type": "string", "description": "文本提示词,使用 <<>> 引用参考图,最大 2500 字符", "maxLength": 2500 }, "image_urls": { "type": "array", "description": "参考图 URL 列表,在 prompt 中用 <<>> 引用(1-indexed),最多 10 张", "items": { "type": "string", "format": "uri" }, "maxItems": 10 }, "elements": { "type": "array", "description": "主体元素列表,在 prompt 中用 @Element1, @Element2 引用(第一版暂不支持)", "items": { "type": "object", "description": "FalOmniImageElement 占位定义,具体结构待后续版本补充", "properties": {}, "x-apifox-orders": [], "x-apifox-ignore-properties": [] } }, "resolution": { "type": "string", "description": "分辨率:1K 或 2K,默认 1K(兼容小写 1k/2k)", "enum": [ "1K", "2K", "1k", "2k" ] }, "num_images": { "type": "integer", "description": "生成数量 1-9,默认 1", "minimum": 1, "maximum": 9 }, "aspect_ratio": { "type": "string", "description": "纵横比,默认 auto", "enum": [ "auto", "16:9", "9:16", "1:1", "4:3", "3:4", "3:2", "2:3", "21:9" ] }, "output_format": { "type": "string", "description": "输出格式,默认 png", "enum": [ "jpeg", "png", "webp" ] }, "sync_mode": { "type": "boolean", "description": "同步模式,当前实现忽略此字段" } }, "required": [ "prompt" ], "additionalProperties": false, "x-apifox-orders": [ "prompt", "image_urls", "elements", "resolution", "num_images", "aspect_ratio", "output_format", "sync_mode" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成" }, "Gemini31FlashImageChatCompletionRequest": { "type": "object", "required": [ "model", "messages" ], "properties": { "model": { "type": "string", "enum": [ "gemini-3.1-flash-image-preview" ], "description": "模型名称" }, "messages": { "type": "array", "description": "对话消息数组", "items": { "$ref": "#/definitions/ChatMessage2" } }, "stream": { "type": "boolean", "default": false, "description": "是否启用流式输出\n- true:流式返回,可实时接收生成进度\n- false:等待生成完成后返回完整结果" }, "image_config": { "$ref": "#/definitions/Gemini31FlashImageConfig" }, "temperature": { "type": "number", "format": "float", "minimum": 0, "maximum": 2, "description": "生成温度,取值范围:0.0-2.0" }, "top_p": { "type": "number", "format": "float", "minimum": 0, "maximum": 1, "description": "核采样参数,取值范围:0.0-1.0" }, "top_k": { "type": "integer", "minimum": 1, "description": "Top-K 采样参数,最小值:1" } }, "x-apifox-orders": [ "model", "messages", "stream", "image_config", "temperature", "top_p", "top_k" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成" }, "CreateOmniImageResponse": { "type": "object", "properties": { "task_id": { "type": "string", "description": "任务 ID,用于后续查询任务状态和结果", "example": "chatimage-1704067200000000000-user123" } }, "x-apifox-orders": [ "task_id" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成" }, "Gemini31FlashImageGenerationRequest": { "type": "object", "required": [ "model", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "gemini-3.1-flash-image-preview" ], "description": "图像生成模型名称" }, "prompt": { "type": "string", "description": "图像生成的文本描述提示词\n\n建议:\n- 提示词越详细、具体,生成的图像质量越好\n- 建议包含:风格、光线、构图、色彩等细节\n- 使用逗号分隔不同的描述要素\n\n示例:\"一只橘色的猫,坐在窗台上,温暖的阳光,柔和的阴影,专业摄影,高清画质,4K 分辨率\"" }, "image_config": { "$ref": "#/definitions/Gemini31FlashImageConfig" }, "temperature": { "type": "number", "format": "float", "minimum": 0, "maximum": 2, "description": "生成温度,取值范围:0.0-2.0\n\n控制生成的随机性和创意性:\n- 较低的值(如 0.2)使输出更确定和一致\n- 较高的值(如 1.0)使输出更随机和创意" }, "top_p": { "type": "number", "format": "float", "minimum": 0, "maximum": 1, "description": "核采样参数,取值范围:0.0-1.0\n\n用于控制生成的多样性:\n- 较低的值会使生成更集中于高概率选项\n- 注意:不建议同时修改 temperature 和 top_p" }, "top_k": { "type": "integer", "minimum": 1, "description": "Top-K 采样参数,最小值:1\n\n限制每步采样时考虑的候选项数量" } }, "x-apifox-orders": [ "model", "prompt", "image_config", "temperature", "top_p", "top_k" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成" }, "ImageTaskInfoResponse": { "type": "object", "properties": { "task_id": { "type": "string", "description": "任务 ID", "example": "chatimage-1704067200000000000-user123" }, "created": { "type": "integer", "format": "int64", "description": "任务创建时间(Unix 时间戳)", "example": 1704067200 }, "status": { "type": "string", "description": "任务状态", "enum": [ "submitted", "processing", "succeed", "failed" ], "example": "succeed" }, "status_message": { "type": "string", "description": "状态附加信息,通常在失败时包含错误原因", "example": "content moderation failed" }, "data": { "type": "array", "description": "生成的图片列表,任务成功时返回", "items": { "type": "object", "properties": { "index": { "type": "integer", "description": "图片序号(从 0 开始)", "example": 0 }, "url": { "type": "string", "description": "图片 URL", "example": "https://cdn.example.com/generated-image.png" } }, "x-apifox-orders": [ "index", "url" ], "x-apifox-ignore-properties": [] } }, "quantity": { "type": "integer", "description": "生成的图片数量", "example": 2 } }, "x-apifox-orders": [ "task_id", "created", "status", "status_message", "data", "quantity" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成" }, "Gemini31FlashImageEditRequest": { "type": "object", "required": [ "model", "image", "prompt" ], "properties": { "model": { "type": "string", "enum": [ "gemini-3.1-flash-image-preview" ], "description": "图像生成模型名称" }, "image": { "description": "输入图像,支持以下格式:\n- **Base64 data URI**:使用 `data:image/png;base64,` 前缀 + Base64 编码的图像数据\n- **图片 URL**:可访问的公网图片链接,如 `https://example.com/image.jpg`\n- **数组形式**:支持传入多张图片,格式为 [\"url1\", \"url2\"] 或混合 data URI 和 URL\n\n建议使用高质量的输入图像以获得更好的编辑效果" }, "prompt": { "type": "string", "description": "图像编辑的文本描述提示词\n\n建议:\n- 清晰描述期望的编辑效果\n- 包含风格、色彩、构图等具体细节\n- 使用逗号分隔不同的描述要素\n\n示例:\n- \"将图片中的天空改为日落时分的橙红色,增加温暖的氛围\"\n- \"将照片转换为油画风格,保持主体不变,增强色彩饱和度\"\n- \"移除背景中的杂物,让背景变得简洁干净\"" }, "image_config": { "$ref": "#/definitions/Gemini31FlashImageConfig" }, "temperature": { "type": "number", "format": "float", "minimum": 0, "maximum": 2, "description": "生成温度,取值范围:0.0-2.0" }, "top_p": { "type": "number", "format": "float", "minimum": 0, "maximum": 1, "description": "核采样参数,取值范围:0.0-1.0" }, "top_k": { "type": "integer", "minimum": 1, "description": "Top-K 采样参数,最小值:1" } }, "x-apifox-orders": [ "model", "image", "prompt", "image_config", "temperature", "top_p", "top_k" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成" }, "Gemini31FlashImageConfig": { "type": "object", "description": "图像配置对象,用于控制图像比例和分辨率(gemini-3.1-flash-image-preview 模型专用)", "properties": { "aspect_ratio": { "type": "string", "enum": [ "1:1", "2:3", "3:2", "3:4", "4:1", "4:3", "4:5", "5:4", "8:1", "9:16", "16:9", "21:9" ], "description": "图像宽高比,支持:1:1、3:2、2:3、3:4、4:1、4:3、4:5、5:4、8:1、9:16、16:9 和 21:9" }, "image_size": { "type": "string", "enum": [ "512", "1K", "2K", "4K" ], "description": "图像分辨率,支持 512、1K、2K、4K" } }, "x-apifox-orders": [ "aspect_ratio", "image_size" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "图像生成" }, "CreateFileRequest": { "type": "object", "description": "创建文件导入任务的请求体", "required": [ "model" ], "properties": { "model": { "type": "string", "description": "目标模型 ID,如 gemini-2.0-flash等。\n文件将被同步到该模型所需的云存储服务。\n同系列模型创建的file_id可以共用。例如 gemini-2.0-flash 模型创建的file_id,gemini-3.0-pro-preview 也调用。", "example": "gemini-2.0-flash" }, "source_url": { "type": "string", "format": "uri", "description": "公开可访问的文件 URL(HTTP/HTTPS)。", "example": "https://example.com/documents/sample.pdf" }, "kodo": { "$ref": "#/definitions/KodoSource", "description": "用户 Kodo 私有存储资源信息。与 source_url 参数互斥,必须二选一" }, "expires_in": { "type": "integer", "description": "过期时间(秒)。范围:3600(1小时)~ 604800(7天),默认 172800(48小时)", "minimum": 3600, "maximum": 604800, "default": 172800, "example": 172800 } }, "x-apifox-orders": [ "model", "source_url", "kodo", "expires_in" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "" }, "QueueStatus": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "IN_QUEUE", "IN_PROGRESS", "COMPLETED" ] }, "request_id": { "type": "string", "description": "The request id." }, "response_url": { "type": "string", "description": "The response url." }, "status_url": { "type": "string", "description": "The status url." }, "cancel_url": { "type": "string", "description": "The cancel url." }, "logs": { "type": "object", "description": "The logs.", "additionalProperties": true, "x-apifox-orders": [], "properties": {}, "x-apifox-ignore-properties": [] }, "metrics": { "type": "object", "description": "The metrics.", "additionalProperties": true, "x-apifox-orders": [], "properties": {}, "x-apifox-ignore-properties": [] }, "queue_position": { "type": "integer", "description": "The queue position." } }, "required": [ "status", "request_id" ], "x-apifox-orders": [ "status", "request_id", "response_url", "status_url", "cancel_url", "logs", "metrics", "queue_position" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "" }, "FileResponse": { "type": "object", "description": "文件详情响应", "required": [ "id", "object", "status", "created_at", "expires_at" ], "properties": { "id": { "type": "string", "description": "文件唯一标识,格式:qfile-xxxx", "example": "qfile-12345-1705382400-abc123" }, "object": { "type": "string", "description": "对象类型,固定为 \"file\"", "enum": [ "file" ], "example": "file" }, "status": { "type": "string", "description": "当前状态:pending(等待处理)、uploading(正在上传)、ready(就绪可用)、failed(失败)、expired(已过期)", "enum": [ "pending", "uploading", "ready", "failed", "expired" ], "example": "ready" }, "model": { "type": "string", "description": "目标模型 ID", "example": "gemini-2.0-flash" }, "created_at": { "type": "integer", "format": "int64", "description": "创建时间(Unix 时间戳,秒)", "example": 1705382400 }, "synced_at": { "type": "integer", "format": "int64", "description": "同步完成时间(Unix 时间戳,秒)。仅当 status 为 ready 时有值", "example": 1705382450 }, "expires_at": { "type": "integer", "format": "int64", "description": "过期时间(Unix 时间戳,秒)", "example": 1705555200 }, "file_name": { "type": "string", "description": "原始文件名", "example": "sample.pdf" }, "file_size": { "type": "integer", "format": "int64", "description": "文件大小(字节)。仅当文件同步完成后有值", "example": 1048576 }, "content_type": { "type": "string", "description": "MIME 类型。仅当文件同步完成后有值", "example": "application/pdf" }, "error": { "$ref": "#/definitions/FileError", "description": "错误信息。仅当 status 为 failed 时有值" } }, "x-apifox-orders": [ "id", "object", "status", "model", "created_at", "synced_at", "expires_at", "file_name", "file_size", "content_type", "error" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "" }, "FileListResponse": { "type": "object", "description": "文件列表响应", "required": [ "object", "data", "has_more" ], "properties": { "object": { "type": "string", "description": "对象类型,固定为 \"list\"", "enum": [ "list" ], "example": "list" }, "data": { "type": "array", "description": "文件列表", "items": { "$ref": "#/definitions/FileResponse" } }, "has_more": { "type": "boolean", "description": "是否还有更多数据。如果为 true,可使用 last_id 作为 after 参数获取下一页", "example": true }, "first_id": { "type": "string", "description": "本页第一条记录的 ID", "example": "qfile-12345-1705382400-abc123" }, "last_id": { "type": "string", "description": "本页最后一条记录的 ID,可用作下一页请求的 after 参数", "example": "qfile-12345-1705296000-def456" } }, "x-apifox-orders": [ "object", "data", "has_more", "first_id", "last_id" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "" }, "FileDeleteResponse": { "type": "object", "description": "文件删除响应", "required": [ "id", "object", "deleted" ], "properties": { "id": { "type": "string", "description": "已删除文件的唯一标识", "example": "qfile-12345-1705382400-abc123" }, "object": { "type": "string", "description": "对象类型,固定为 \"file\"", "enum": [ "file" ], "example": "file" }, "deleted": { "type": "boolean", "description": "是否已成功删除", "example": true } }, "x-apifox-orders": [ "id", "object", "deleted" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "" }, "ChatMessage2": { "type": "object", "description": "对话消息对象", "required": [ "role", "content" ], "properties": { "role": { "type": "string", "enum": [ "user", "assistant" ], "description": "消息角色" }, "content": {} }, "x-apifox-orders": [ "role", "content" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "" }, "KodoSource": { "type": "object", "description": "用户 Kodo 私有资源信息", "required": [ "bucket", "object_key", "region" ], "properties": { "bucket": { "type": "string", "description": "Kodo bucket 名称", "example": "my-bucket" }, "object_key": { "type": "string", "description": "文件的 object key(完整路径)", "example": "documents/sample.pdf" }, "region": { "type": "string", "description": "存储区域代码", "enum": [ "z0", "z1", "z2", "na0", "as0", "ap-southeast-2" ], "example": "z0" } }, "x-apifox-orders": [ "bucket", "object_key", "region" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "" }, "ChatCompletionResponse3": { "type": "object", "description": "对话完成响应", "properties": { "id": { "type": "string", "description": "对话完成 ID" }, "object": { "type": "string", "enum": [ "chat.completion" ], "description": "对象类型" }, "created": { "type": "integer", "format": "int64", "description": "响应创建时间戳(Unix 时间戳,秒)" }, "model": { "type": "string", "description": "使用的模型名称" }, "choices": { "type": "array", "description": "生成结果数组", "items": { "type": "object", "properties": { "index": { "type": "integer", "description": "结果索引" }, "message": { "type": "object", "properties": { "role": { "type": "string", "enum": [ "assistant" ], "description": "角色" }, "content": { "type": "string", "description": "文本内容(如果只是聊天)" }, "reasoning_content": { "type": "string", "description": "模型的思考过程和推理内容" }, "images": { "type": "array", "description": "生成的图像数组(如果有图像生成)", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "image_url" ], "description": "图像类型" }, "image_url": { "type": "object", "properties": { "url": { "type": "string", "description": "Base64 data URI 格式的图像数据" } }, "x-apifox-orders": [ "url" ], "x-apifox-ignore-properties": [] }, "index": { "type": "integer", "description": "图像索引,从 0 开始" } }, "x-apifox-orders": [ "type", "image_url", "index" ], "x-apifox-ignore-properties": [] } } }, "x-apifox-orders": [ "role", "content", "reasoning_content", "images" ], "x-apifox-ignore-properties": [] }, "finish_reason": { "type": "string", "description": "完成原因,通常为 stop" } }, "x-apifox-orders": [ "index", "message", "finish_reason" ], "x-apifox-ignore-properties": [] } }, "usage": { "type": "object", "description": "Token 使用统计信息", "properties": { "prompt_tokens": { "type": "integer", "description": "输入 token 数" }, "completion_tokens": { "type": "integer", "description": "输出 token 数" }, "total_tokens": { "type": "integer", "description": "总 token 数" }, "prompt_tokens_details": { "type": "object", "properties": { "text_tokens": { "type": "integer", "description": "文本 token 数" } }, "x-apifox-orders": [ "text_tokens" ], "x-apifox-ignore-properties": [] }, "completion_tokens_details": { "type": "object", "properties": { "reasoning_tokens": { "type": "integer", "description": "推理 token 数" }, "image_tokens": { "type": "integer", "description": "图像 token 数" } }, "x-apifox-orders": [ "reasoning_tokens", "image_tokens" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "prompt_tokens", "completion_tokens", "total_tokens", "prompt_tokens_details", "completion_tokens_details" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "id", "object", "created", "model", "choices", "usage" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "" }, "FileError": { "type": "object", "description": "文件处理错误信息", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "错误码", "example": "file_adapter_sync_failed" }, "message": { "type": "string", "description": "错误描述", "example": "Failed to download file from source URL" }, "type": { "type": "string", "description": "错误类型", "example": "invalid_request_error" }, "param": { "type": "string", "description": "相关参数名", "example": "source_url" } }, "x-apifox-orders": [ "code", "message", "type", "param" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "" }, "ImageGenerationResponse4": { "type": "object", "description": "图像生成响应", "properties": { "created": { "type": "integer", "format": "int64", "description": "响应创建时间戳(Unix 时间戳,秒)" }, "data": { "type": "array", "description": "生成的图像数据数组", "items": { "type": "object", "properties": { "b64_json": { "type": "string", "description": "Base64 编码的图像数据" } }, "x-apifox-orders": [ "b64_json" ], "x-apifox-ignore-properties": [] } }, "output_format": { "type": "string", "default": "png", "description": "输出格式" }, "usage": { "type": "object", "description": "Token 使用统计信息", "properties": { "total_tokens": { "type": "integer", "description": "总 token 数" }, "input_tokens": { "type": "integer", "description": "输入 token 数" }, "output_tokens": { "type": "integer", "description": "输出 token 数(图像生成消耗)" }, "input_tokens_details": { "type": "object", "properties": { "text_tokens": { "type": "integer", "description": "文本 token 数" }, "image_tokens": { "type": "integer", "description": "图像 token 数" } }, "x-apifox-orders": [ "text_tokens", "image_tokens" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "total_tokens", "input_tokens", "output_tokens", "input_tokens_details" ], "x-apifox-ignore-properties": [] } }, "x-apifox-orders": [ "created", "data", "output_format", "usage" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "" }, "ErrorResponse5": { "type": "object", "required": [ "status", "message" ], "properties": { "status": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "error message" } }, "x-apifox-orders": [ "status", "message" ], "x-apifox-ignore-properties": [], "x-apifox-folder": "" } }, "securityDefinitions": {}, "x-components": { "responses": {} } }