跳转到主要内容
POST
/
kyyReactApiServer
/
v1
/
sora
/
videos
curl --request POST \
  --url https://zcbservice.aizfw.cn/kyyReactApiServer/v1/sora/videos \
  --header 'Authorization: Bearer {{key}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "openAiSora2Plus",
    "prompt": "A cat dancing in the rain, cinematic style",
    "aspect_ratio": "16:9",
    "seconds": 8,
    "input_reference": [
      "https://example.com/reference1.jpg"
    ]
  }'
{
  "id": "sora_abc123def456",
  "object": "video.generation",
  "created": 1761635478,
  "model": "openAiSora2Plus",
  "status": "queued"
}

Documentation Index

Fetch the complete documentation index at: https://docs.globalaiopc.com/llms.txt

Use this file to discover all available pages before exploring further.

Sora 创建视频任务

使用 Sora 的先进 AI 模型创建高质量视频生成任务,当前支持 4812 秒时长选项。

认证

所有请求都需要在请求头中包含 Bearer token:
Authorization: Bearer {{key}}

基础 URL

https://zcbservice.aizfw.cn/kyyReactApiServer
baseUrl 为所有对外 API 的公共前缀。当前页面 frontmatter 中的 api 字段展示的是完整请求地址,请在接入时以这里的 baseUrl 为统一前缀理解和拼接接口路径。

请求参数

model
string
必填
模型名称,可选值:
  • openAiSora2Plus - 支持 4、8、12 秒
  • openAiSora2Pro - 支持 4、8、12 秒
prompt
string
必填
视频生成提示词,描述所需的视频内容示例:"A cat dancing in the rain, cinematic style"
size
string
视频尺寸,默认为 720x1280可选值:
  • 720x1280 - 竖屏
  • 1280x720 - 横屏
aspect_ratio 二选一使用
aspect_ratio
string
视频宽高比可选值:
  • 16:9 - 横屏
  • 9:16 - 竖屏
size 二选一使用
duration
integer
视频时长(秒),支持 4812
seconds 二选一使用
seconds
integer
视频时长(秒),支持 4812
duration 二选一使用
input_reference
array
参考图片数组,用于指导视频生成,最多支持 1 张图片重要说明:
  • 请不要传入真实人像图,大概率会失败
  • 如果使用 openAiSora2-xxx 系列模型,图片格式需要和 ratio 保持一致
  • 仅支持 1280×720 (16:9 横屏) 和 720×1280 (9:16 竖屏)
image_urls 二选一使用
image_urls
array
参考图片URL数组,用于指导视频生成重要说明:
  • 请不要传入真实人像图,大概率会失败
  • 如果使用 openAiSora2-xxx 系列模型,图片格式需要和 ratio 保持一致
  • 仅支持 1280×720 (16:9 横屏) 和 720×1280 (9:16 竖屏)
input_reference 二选一使用

响应参数

id
string
视频生成任务的唯一标识符,用于后续查询任务状态
object
string
对象类型,固定为 video.generation
created
integer
任务创建时间戳
model
string
使用的模型名称
status
string
任务状态:
  • queued - 排队中
  • processing - 处理中
error
string
错误信息,当 status 为 failed 时返回

模型特性

openAiSora2Plus

OpenAI Sora2 Plus 版,支持 4、8、12 秒,增强版模型

openAiSora2Pro

OpenAI Sora2 Pro 版,支持 4、8、12 秒,适合更高质量生成

参数选择规则

参数互斥规则:
  • 尺寸参数sizeaspect_ratio 二选一
  • 时长参数durationseconds 二选一
  • 参考图片input_referenceimage_urls 二选一

视频时长支持

模型支持时长
openAiSora2Plus4 秒、8 秒、12 秒
openAiSora2Pro4 秒、8 秒、12 秒
最佳实践:
  1. 视频生成为异步处理,需要通过返回的 id 查询任务状态和结果
  2. 在提示词中明确描述所需的视觉效果和风格
  3. 参考图片可以指导整体风格,最多支持 1 张
  4. 选择合适的宽高比以匹配你的使用场景
提示词建议:
  • 包含具体的场景描述
  • 添加风格关键词(如 “cinematic”, “artistic”, “realistic”)
  • 描述动作和运动方式
  • 指定光照和色彩偏好
curl --request POST \
  --url https://zcbservice.aizfw.cn/kyyReactApiServer/v1/sora/videos \
  --header 'Authorization: Bearer {{key}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "openAiSora2Plus",
    "prompt": "A cat dancing in the rain, cinematic style",
    "aspect_ratio": "16:9",
    "seconds": 8,
    "input_reference": [
      "https://example.com/reference1.jpg"
    ]
  }'
{
  "id": "sora_abc123def456",
  "object": "video.generation",
  "created": 1761635478,
  "model": "openAiSora2Plus",
  "status": "queued"
}