API Reference
Sora Pro API
POST
sora-pro-api
ID 19
Sora Pro text-to-video and image-to-video. Capabilities follow this page.
POST
https://xiaoapis.com/api/video/sora
Overview
- 文生/图生视频
- 异步任务
Use cases
- 创意视频
- 图像转动效
Conventions
- Gateway ·
https://xiaoapis.com - Auth · send
key(query or JSON body, as this API specifies) - Response · JSON. Check the business code and the HTTP status, not only HTTP 200
Authentication
Send the platform API key (query parameter key or JSON field key, as this page specifies). Create one in API key management.
POST https://xiaoapis.com/api/video/sora
Content-Type: application/json
{
"key": "YOUR_API_KEY"
}
Request example
https://xiaoapis.com/api/video/sora?key=你的密钥
Details
请求HEADER:
| 名称 | 值 |
|---|---|
| Content-Type | application/json |
请求参数说明:
| 名称 | 必填 | 类型 | 示例值 | 说明 |
|---|---|---|---|---|
| key | 是 | string | 35kj5jnlj53453kl5j43nj5 | 接口密钥,在控制台->密钥管理查看 |
| prompt | 是 | string | 提示词 | 图片base64编码数据或网络图片URL |
| image_urls | 否 | array | ["https://file.1x.com/s/17594315607644506ltpf.jpg"] | 参考图 |
| aspect_ratio | 否 | string | landscape | 分辨率 |
duration | 否 | string | 10 | 时长 |
notify | 是 | string | https://xx.com | 回调地址 |
返回参数说明:
| 名称 | 类型 | 说明 |
|---|---|---|
| code | int | 状态码 |
| msg | string | 状态信息 |
| data | string | 请求结果数据集 |
| -task_id | string | 任务ID |
| exec_time | float | 执行耗时 |
| user_ip | string | 客户端IP |
Response example
Error codes
200: Success - Request has been processed successfully
401: Unauthorized - Authentication credentials are missing or invalid
402: Insufficient Credits - Account does not have enough credits to perform the operation
404: Not Found - The requested resource or endpoint does not exist
422: Validation Error - The request parameters failed validation checks
429: Rate Limited - Request limit has been exceeded for this resource
433: Request Limit - Sub-key Usage Exceeds Limit
455: Service Unavailable - System is currently undergoing maintenance
500: Server Error - An unexpected error occurred while processing the request
501: Generation Failed - Content generation task failed
505: Feature Disabled - The requested feature is currently disabled
FAQ
索拉 Pro 怎么用?
按文档提交 prompt、可选 image_urls 等参数创建任务。
时长如何选?
使用 duration 等枚举字段,可选值见文档。
如何取成片?
查询任务或接收回调中的视频地址。
和威尔/Seedance 区别?
不同模型厂商与风格,按效果对比选型。
注意事项?
参考图须公网可访问;遵守内容安全政策。
Related APIs
Full console doc (with the debugger):/doc/19