Skip to content
Platform / Docs / Sora Pro API

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-Typeapplication/json

请求参数说明:

名称必填类型示例值说明
key是string35kj5jnlj53453kl5j43nj5接口密钥,在控制台->密钥管理查看
prompt是string 提示词 图片base64编码数据或网络图片URL
image_urls否array["https://file.1x.com/s/17594315607644506ltpf.jpg"]参考图
aspect_ratio否stringlandscape分辨率

duration

否string10时长

notify

是stringhttps://xx.com回调地址

返回参数说明:

名称类型说明
codeint状态码
msgstring状态信息
datastring请求结果数据集
-task_id string任务ID
exec_timefloat执行耗时
user_ipstring客户端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 区别?

不同模型厂商与风格,按效果对比选型。

注意事项?

参考图须公网可访问;遵守内容安全政策。

Full console doc (with the debugger):/doc/19