gptai账号下单全集合
全球最强AI--官方独享--会员--网页完整版--使用教程(支持所有官方会员最新模型)
API接口调用注意事项,key的使用跟设置教程
收藏本站,域名(网站地址)不定期更新!chatgpt免翻墙使用平台:人工微信咨询:chuyun8858
全球最强AI--官方独享--会员--网页完整版--使用教程(支持所有官方会员最新模型)
全球最强AI--官方独享--会员--网页完整版--使用教程(支持所有官方会员最新模型)
chatgpt账号价格介绍-智云团队旗下 所有网站,收藏本站!以免被墙!如需人工请加微信chuyun8878
智云ai聊天系统,注册使用教程
智云聊天使用
智云ai绘画系统介绍
全球最强AI--官方独享--会员--网页完整版--使用教程(支持所有官方会员最新模型)
全球最强AI--官方独享--会员--网页完整版--使用教程(支持所有最新模型)
claude pro 登录使用教程-有问题处理不了的联系微信chuyun8878给1V1处理哦
super grok超级会员登录使用教程(支持grok 4 think模式,deepsearc高级模型,文件分析,联网搜索,高级语音模型)
智云兑换码使用教程
Claude Code跟openai codex 帮助文档
openai codex登录安装教程
sora2邀请码,有问题联系人工chuyun8878处理的
gemini登录使用教程
MANUS使用教程
MANUS用邮箱的注册教程
sora 2 api接口调用教程
本文档使用 MrDoc 发布
-
+
首页
sora 2 api接口调用教程
Sora2API 接⼝⽂档 基础路径 https://share 域名 /sora 所有的请求头 Authorization 携带的都是你在后台设置的 apikey 1. 视频⽣成接⼝ (OpenAI 格式 ) POST /v1/chat/completions 或 /chat/completions OpenAI 兼容格式的 Sora 视频⽣成接⼝。 请求体 { } "model": "sora_video2", "messages": [ { "role": "user", "content": " ⼀只猫在草地上奔跑 " } ], "stream": false, "file_url": "https://example.com/image.png", "data_url": "data:image/png;base64,...", "file_name": "my_image.png", "isNowm": true 参数 model 类型 必填 string 说明 模型名称,默认 sora_video2 ,格式 : 否 sora_video2-orientation-size-duration 参数 类型 必填 messages array 说明 是 消息数组, content ⽀持⽂本或图⽚数组 stream f ile_url data_url isNowm 模型参数说明 boolean string string boolean 否 是否流式返回,默认 true 否 图⽚⽂件 URL ( 图⽣视频 ) 否 Base64 格式图⽚数据 否 是否去⽔印,默认 true 格式 : sora_video2-{orientation}-{size}-{duration} 示例 : sora_video2-landscape-hd-15s orientation: portrait ( 竖屏,默认 ) | landscape ( 横屏 ) size: small ( 默认 ) | large/hd ( ⾼清 ) duration: 10s ( 默认 ) | 15s | 25s ⾮流式响应 ( stream: false ) 成功响应 { "id": "soracmp-task123", "object": "chat.completion", "created": 1734567890, "model": "sora_video2", "choices": [ { "index": 0, "message": { "role": "assistant", "content": { "task_id": "task123", "video_url": "https://...", "generation_id": "gen123", "download_url": "https://...", "status": "completed" } }, "finish_reason": "stop" } ] } 错误响应 { "error": { "type": "request_error", "message": " 错误详情 " } } 流式响应 ( stream: true ) 使⽤ SSE (Server-Sent Events) 格式返回, Content-Type 为 text/event-stream 。 响应头 Content-Type: text/event-stream Cache-Control: no-cache Connection: keep-alive 进度事件 ( 过程中多次推送 ) data: {"id":"soracmp-task123","object":"chat.completion.chunk","created":1734567890,"mod data: {"id":"soracmp-task123","object":"chat.completion.chunk","created":1734567890,"mod data: {"id":"soracmp-task123","object":"chat.completion.chunk","created":1734567890,"mod data: {"id":"soracmp-task123","object":"chat.completion.chunk","created":1734567890,"mod data: {"id":"soracmp-task123","object":"chat.completion.chunk","created":1734567890,"mod data: {"id":"soracmp-task123","object":"chat.completion.chunk","created":1734567890,"mod data: {"id":"soracmp-task123","object":"chat.completion.chunk","created":1734567890,"mod data: {"id":"soracmp-task123","object":"chat.completion.chunk","created":1734567890,"mod data: {"id":"soracmp-task123","object":"chat.completion.chunk","created":1734567890,"mod 错误事件 data: {"id":"soracmp-task123","object":"chat.completion.chunk","created":1734567890,"mod 2. 创建视频任务 POST /v1/createVideos 上传⽂件并创建视频⽣成任务。 请求参数 (Form-Data 或 Query) 参数 prompt f ile f ile_url data_url f ile_name model isNowm 成功响应 { "code": 200, 类型 string f ile string string string string boolean "message": " 视频任务创建成功 ", "data": { "task_id": "task123" } } 失败响应 { } "code": 500, "message": " 错误信息 " 3. 查询任务状态 必填 是 否 否 否 否 否 否 GET/POST /v1/getTaskStatus 查询视频⽣成任务的状态。 说明 视频⽣成提示词 上传的图⽚⽂件 图⽚⽂件 URL Base64 格式图⽚数据 ⾃定义⽂件名 模型名称,默认 sora_video2 是否去⽔印,默认 false 请求参数 (Query 或者请求体 ) 参数类型必填说明 taskId string 是任务 ID 成功响应 { "code": 200, "message": " 查询成功 ", "data": { "task_id": "task123", "status": "completed", "prompt": " ⼀只猫在草地上奔跑 ", "model": "sora_video2", "gen_id": "gen123", "post_id": "post123", "original_url": "https://...", "no_watermark_url": "https://..." } } 状态值说明 状态说明 pending ⽣成中 completed 已完成 failed 失败 失败响应 { "code": 400, "message": " 查询任务状态失败 : 错误信息 " } 4. 统计信息 GET /stats 获取会话池的统计信息。 响应示例 { "failed": 0, "healthy": 2, "rate_limited": 0, "round_robin_count": 1, "sessions": [ { "account_type": "", "consecutive_errs": 0, "email": "irs2410@outlook.com", "error_count": 2, "last_used": "2025-12-19 10:57:13", "request_count": 3, "status": "healthy", "success_count": 1 }, { "account_type": "", "consecutive_errs": 0, "email": "asdzxc@q3p.net", "error_count": 0, "last_used": "2025-12-19 10:00:30", "request_count": 0, "status": "healthy", "success_count": 0 } ], "success_rate": 33.33333333333333, "total_errors": 2, "total_requests": 3, "total_sessions": 2, "total_success": 1, "warning": 0 } 会话状态说明 状态说明 healthy 健康 warning 警告 ( 连续错误 ) failed 失败 rate_limited 被限流 5. 健康检查 GET /health 服务健康检查端点。 响应示例 { "status": "ok" } 错误码说明 HTTP 状态码说明 200 成功 400 请求参数错误 401 未授权 / Token ⽆效 429 请求频率超限 500 服务器内部错误
admin
2025年12月20日 14:32
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
分享
链接
类型
密码
更新密码