功能与模型

根据提示词生成 Sora 视频,适用模型为 sora-2、sora-2-pro。图片输入和模型限制见输入与参数。

第一步:鉴权

每次请求使用 Authorization: Bearer YOUR_API_KEY,将占位符替换为青云TOP API Key,保留 Bearer 后的空格。无需先调用登录接口。

第二步:调用模型

POST https://top.qingyuntop.ai/v1/responses

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

代码示例

cURL 使用 Bash 语法;Python 需要 requests;Node.js 使用 22+,含 import 的示例保存为 .mjs。

curl --fail-with-body "https://top.qingyuntop.ai/v1/responses" -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model":"sora-2","input":"雨后的老街,镜头沿石板路缓慢推进。","seconds":8,"size":"1280x720","stream":false,"background":false}'

返回的 Response ID 不是视频任务 ID,请继续看查询和下载。