创建生成任务
校验参数、扣减积分、创建任务并返回 taskId。
请求参数
- 必填。sora-2-text-to-video、sora-2-image-to-video、sora-2-pro-text-to-video、sora-2-pro-image-to-video、sora-2-pro-storyboard 之一。
- 条件必填。除 sora-2-pro-storyboard 外必须提供。
- 条件必填。Base64 Data URL,如 data:image/png;base64,...。无 imageUrl 时图生必填。
- 条件必填。公开图片 URL,仅在未提供 imageData 时使用。
- 可选。portrait 或 landscape,默认 landscape。
- 可选。10/15/25(仅分镜)。不同模型默认值不同。
- 可选。standard 或 high,仅 Pro 文生/图生有效。
- 可选。非分镜模型可去水印,默认 true。
- 条件必填。sora-2-pro-storyboard 需要,数组元素为 '{ Scene, duration }'。
说明
- 同时提供时 imageData 优先于 imageUrl。
- 分镜模式 prompt 可选,不会传给上游;请用 shots 描述内容。
- nFrames 会归一化到各模型允许值。
- 非分镜模型 removeWatermark 默认 true。
- shots 需包含 Scene(大写 S)与 duration > 0。
请求示例
curl -X POST https://freesoragenerator.com/api/v1/video/sora-pro \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2-pro-text-to-video",
"prompt": "A cinematic shot of a futuristic city at sunset.",
"aspectRatio": "landscape",
"nFrames": "10",
"size": "high",
"removeWatermark": true
}'curl -X POST https://freesoragenerator.com/api/v1/video/sora-pro \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2-image-to-video",
"prompt": "Turn this image into a dynamic 10s clip.",
"imageUrl": "https://example.com/reference.png",
"aspectRatio": "portrait",
"nFrames": "10"
}'curl -X POST https://freesoragenerator.com/api/v1/video/sora-pro \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2-pro-storyboard",
"shots": [
{ "Scene": "Establishing shot of a city skyline at dusk", "duration": 5 },
{ "Scene": "Close-up of a runner splashing through puddles", "duration": 5 }
],
"aspectRatio": "landscape",
"nFrames": "10"
}'响应示例
{
"code": 0,
"message": "ok",
"data": {
"taskId": "281e5b0*********************f39b9"
}
}