[{"data":1,"prerenderedAt":186},["ShallowReactive",2],{"reference-detail-zh-get_ai_video_api_v1_ai_video_get":3,"developer-code-197cslv":184,"developer-code-okk4aa":185},{"tag":4,"sourceTag":5,"tagSlug":6,"method":7,"path":8,"slug":9,"summary":10,"description":11,"operationId":12,"groupOrder":13,"descriptionHtml":14,"parameters":15,"responses":33,"security":171,"codeSamples":174},"AI Video","AI Videos","ai-videos","GET","\u002Fapi\u002Fv1\u002Fai_video","get-ai-video","获取 AI 视频状态","通过 `video_id` 查询单个任务，或通过 `video_ids`（逗号分隔）一次查询最多 20 个任务。状态为 `queued`、`creating`、`created` 或 `failed`，建议每 5–10 秒轮询一次。失败任务包含 `error` 对象，且 `cost_credit=0`（点数自动退还）。\n\nBeta：所有有效付费订阅账户均可使用，适用标准的单 API Key 请求频率限制。","get_ai_video_api_v1_ai_video_get",60,"\u003Cp>通过 \u003Ccode>video_id\u003C\u002Fcode> 查询单个任务，或通过 \u003Ccode>video_ids\u003C\u002Fcode>（逗号分隔）一次查询最多 20 个任务。状态为 \u003Ccode>queued\u003C\u002Fcode>、\u003Ccode>creating\u003C\u002Fcode>、\u003Ccode>created\u003C\u002Fcode> 或 \u003Ccode>failed\u003C\u002Fcode>，建议每 5–10 秒轮询一次。失败任务包含 \u003Ccode>error\u003C\u002Fcode> 对象，且 \u003Ccode>cost_credit=0\u003C\u002Fcode>（点数自动退还）。\u003C\u002Fp>\u003Cp>Beta：所有有效付费订阅账户均可使用，适用标准的单 API Key 请求频率限制。\u003C\u002Fp>",[16,23,30],{"name":17,"in":18,"required":19,"description":20,"type":21,"example":22},"X-API-Key","header",true,"你的 VisionStory API Key（`sk-vs-...`），请仅保存在服务端。可在 [API Key 管理](\u002Fapi-keys) 中创建或管理，需要 Pro 或更高方案。","string","sk-vs-your-api-key",{"name":24,"in":25,"required":26,"description":27,"type":28,"example":29},"video_id","query",false,"要查询的单个任务 ID，来自 POST \u002Fapi\u002Fv1\u002Fai_video。`video_id` 与 `video_ids` 二选一。","string | null","video_123456",{"name":31,"in":25,"required":26,"description":32,"type":28,"example":29},"video_ids","批量查询的任务 ID，以逗号分隔，最多 20 个，例如 `101,102,103`。`video_ids` 与 `video_id` 二选一。",[34,144],{"status":35,"description":36,"contentType":37,"schema":38,"example":111,"examples":125,"headers":143},"200","请求成功","application\u002Fjson",{"type":39,"description":40,"nullable":26,"properties":41},"BaseSuccessResponse_Union_GetAiVideoResponse__GetAiVideosBatchResponse__","",[42,102,106],{"name":43,"required":19,"type":44,"description":45,"nullable":19,"properties":46},"data","GetAiVideoResponse | GetAiVideosBatchResponse | null","当前接口的响应数据，字段定义见该接口的响应结构。仅当操作不返回数据时为 null。",[47,51,57,61,65,70,83,87,91,95,98],{"name":48,"required":26,"type":21,"description":49,"nullable":26,"default":40,"properties":50},"aspect_ratio","生成视频的输出宽高比（例如 `16:9`、`9:16`）；尚未确定时为空。",[],{"name":52,"required":26,"type":53,"description":54,"nullable":26,"default":55,"properties":56},"cost_credit","integer","此任务扣除的点数；失败时为 0，已扣点数会自动退还。",0,[],{"name":58,"required":26,"type":28,"description":59,"nullable":19,"properties":60},"cover_url","视频封面或缩略图的 URL，有可用封面时返回。",[],{"name":62,"required":26,"type":53,"description":63,"nullable":26,"default":55,"properties":64},"created_at","任务创建时的 Unix 时间戳，单位为秒。",[],{"name":66,"required":26,"type":67,"description":68,"nullable":26,"default":55,"properties":69},"duration_sec","number","生成视频的时长，单位为秒；尚未确定时为 0。",[],{"name":71,"required":26,"type":72,"description":73,"nullable":19,"properties":74},"error","AiVideoErrorDto | null","失败详情，仅在状态为 `failed` 时返回。",[75,79],{"name":76,"required":19,"type":53,"description":77,"nullable":26,"properties":78},"code","表示生成失败原因的数字错误码。",[],{"name":80,"required":19,"type":21,"description":81,"nullable":26,"properties":82},"message","便于阅读的失败原因说明。",[],{"name":84,"required":19,"type":21,"description":85,"nullable":26,"properties":86},"model_id","生成此视频所用的模型，请查询 GET \u002Fapi\u002Fv1\u002Fai_video\u002Fmodels。",[],{"name":88,"required":26,"type":21,"description":89,"nullable":26,"default":40,"properties":90},"resolution","生成视频的输出分辨率（例如 `720p`、`1080p`）；尚未确定时为空。",[],{"name":92,"required":19,"type":21,"description":93,"nullable":26,"properties":94},"status","当前任务状态：`queued`（等待中）、`creating`（渲染中）、`created`（已完成）或 `failed`（失败）。",[],{"name":24,"required":19,"type":21,"description":96,"nullable":26,"properties":97},"视频任务的唯一标识符。",[],{"name":99,"required":26,"type":28,"description":100,"nullable":19,"properties":101},"video_url","生成视频的下载 URL，状态为 `created` 时返回。",[],{"name":80,"required":26,"type":21,"description":103,"nullable":26,"default":104,"properties":105},"便于阅读的状态消息；调用成功时为 `\"success\"`。","success",[],{"name":107,"required":19,"type":108,"description":109,"nullable":26,"properties":110},"server_time","string · date-time","服务端生成响应时的时间戳，使用 ISO 8601 格式（UTC）。",[],{"data":112,"message":104,"server_time":124},{"aspect_ratio":113,"cost_credit":114,"cover_url":115,"created_at":116,"duration_sec":117,"error":118,"model_id":119,"resolution":120,"status":121,"video_id":122,"video_url":123},"16:9",16,"https:\u002F\u002Fexample.com\u002Fcover.jpg",1788480000,8,null,"wan-3.0","720p","created","example_ai_video_id","https:\u002F\u002Fexample.com\u002Fvideo.mp4","2026-09-04T00:00:00Z",[126,130],{"name":104,"description":127,"summary":36,"value":128},"示例仅用于说明响应结构，不代表实时账户数据或实际报价。ID 和 URL 均为占位内容。请调用模型查询及费用估算接口，获取当前可用模型和价格。",{"data":129,"message":104,"server_time":124},{"aspect_ratio":113,"cost_credit":114,"cover_url":115,"created_at":116,"duration_sec":117,"error":118,"model_id":119,"resolution":120,"status":121,"video_id":122,"video_url":123},{"name":131,"description":127,"summary":132,"value":133},"batch","使用 video_ids 批量查询",{"data":134,"message":104,"server_time":124},{"videos":135},[136,137],{"aspect_ratio":113,"cost_credit":114,"cover_url":115,"created_at":116,"duration_sec":117,"error":118,"model_id":119,"resolution":120,"status":121,"video_id":122,"video_url":123},{"aspect_ratio":113,"cost_credit":55,"cover_url":118,"created_at":116,"duration_sec":55,"error":138,"model_id":119,"resolution":120,"status":141,"video_id":142,"video_url":118},{"code":139,"message":140},37100,"The content could not be processed.","failed","example_failed_video_id",[],{"status":145,"description":146,"contentType":37,"schema":147,"example":167,"headers":170},"default","错误响应。所有失败均使用统一结构：`error` 对象包含数字错误码 `code`、便于阅读的 `message`、可选的 `details` 字符串，以及提供后续处理建议的可选 `hint`（便于 AI Agent 使用）。",{"type":148,"description":40,"nullable":26,"properties":149},"ErrorResponse",[150],{"name":71,"required":19,"type":151,"description":40,"nullable":26,"properties":152},"ErrorDetail",[153,156,160,164],{"name":76,"required":19,"type":53,"description":154,"nullable":26,"properties":155},"机器可读的错误码。传输层失败时对应 HTTP 状态码（例如 401、404、422、500），其他情况可能使用业务专用错误码。",[],{"name":157,"required":26,"type":28,"description":158,"nullable":19,"properties":159},"details","可选的结构化错误详情，例如 422 响应中逐字段校验错误的 JSON 字符串。无补充信息时不返回。",[],{"name":161,"required":26,"type":28,"description":162,"nullable":19,"properties":163},"hint","供用户和 AI Agent 参考的错误处理建议，例如如何修正请求或在哪里获取 API Key。可能不返回此字段。",[],{"name":80,"required":19,"type":21,"description":165,"nullable":26,"properties":166},"便于阅读的错误原因说明，可安全记录到日志或展示给最终用户；此返回值未本地化。",[],{"error":168},{"code":169,"message":21,"details":21,"hint":21},1,[],[172],{"APIKeyHeader":173},[],[175,178,181],{"lang":176,"source":177},"SDK","from visionstory import VisionStoryClient\n\nclient = VisionStoryClient.from_env()\nvideo = client.get_ai_video(\"video_123456\")\nprint(video)",{"lang":179,"source":180},"REST","import os\nimport requests\n\nresponse = requests.get(\n    \"https:\u002F\u002Fopenapi.visionstory.ai\u002Fapi\u002Fv1\u002Fai_video\",\n    headers={\"X-API-Key\": os.environ[\"VISIONSTORY_API_KEY\"]},\n    params={\n      \"video_id\": \"video_123456\"\n    },\n)\nresponse.raise_for_status()\nprint(response.json())",{"lang":182,"source":183},"cURL","curl --request GET 'https:\u002F\u002Fopenapi.visionstory.ai\u002Fapi\u002Fv1\u002Fai_video?video_id=video_123456' \\\n  --header 'X-API-Key: $VISIONSTORY_API_KEY'","\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#FF7B72\">from\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> visionstory \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">import\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> VisionStoryClient\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">client \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> VisionStoryClient.from_env()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">video \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> client.get_ai_video(\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"video_123456\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79C0FF\">print\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(video)\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>","\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">  \"data\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">    \"aspect_ratio\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"16:9\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">    \"cost_credit\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">16\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">    \"cover_url\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"https:\u002F\u002Fexample.com\u002Fcover.jpg\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">    \"created_at\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">1788480000\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">    \"duration_sec\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">8\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">    \"error\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">null\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">    \"model_id\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"wan-3.0\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">    \"resolution\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"720p\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">    \"status\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"created\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">    \"video_id\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"example_ai_video_id\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">    \"video_url\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"https:\u002F\u002Fexample.com\u002Fvideo.mp4\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">  },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">  \"message\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"success\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">  \"server_time\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"2026-09-04T00:00:00Z\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>",1788547144509]