跳到正文
平台 / 文档 / 索拉 Pro API

API Reference

索拉 Pro API

POST sora-pro-api ID 19

索拉 Pro 视频生成接口,支持文本/图像转视频等模式,具体能力以文档为准。

POST https://apis.xiaobao.ink/api/video/sora

概述

  • 文生/图生视频
  • 异步任务

适用场景

  • 创意视频
  • 图像转动效
调用约定
  • 网关 · https://apis.xiaobao.ink
  • 鉴权 · 请求携带 key(Query 或 JSON Body,以本接口为准)
  • 回包 · JSON;请同时校验业务码与 HTTP 状态,不要只看 200

鉴权

请求需携带平台 API Key(查询参数 key 或 JSON 字段 key,以本接口说明为准)。在控制台 API Key 管理 创建密钥。

POST https://apis.xiaobao.ink/api/video/sora
Content-Type: application/json

{
  "key": "YOUR_API_KEY"
}

请求示例

https://apis.xiaobao.ink/api/video/sora?key=你的密钥

详细说明

请求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

返回示例

 

错误码

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

常见问题

索拉 Pro 怎么用?

按文档提交 prompt、可选 image_urls 等参数创建任务。

时长如何选?

使用 duration 等枚举字段,可选值见文档。

如何取成片?

查询任务或接收回调中的视频地址。

和威尔/Seedance 区别?

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

注意事项?

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

完整控制台文档(含调试台):/doc/19