使用 OpenAI Sora 模型通过文本提示和可选图像参考创建视频生成任务
videos 是 OpenAI Sora 的视频生成接口,通过文本提示或可选的参考图像输入创建视频生成任务。
创建后,您需要使用 查询接口 获取生成状态。任务完成后,可以进行后续操作如 混剪 和 下载。
有关 Sora 生成接口的更多信息,请参阅 OpenAI 官方文档。
sora-2(默认)sora-2-proopenapi.json 提取。向下滚动查看交互式 API 参考。720x1280(默认):竖屏格式,适合手机/社交媒体1280x720:横屏格式,标准宽屏1024x1792:高分辨率竖屏1792x1024:高分辨率横屏Shot N: 开始(N 是镜头编号)duration: Xsec 指定镜头时长Scene: 描述镜头内容720x1280。支持的分辨率:
720x1280(默认)- 竖屏1280x720 - 横屏1024x1792 - 高分辨率竖屏1792x1024 - 高分辨率横屏sora-2:支持 4、8 和 12 秒sora-2-pro:支持 4、8 和 12 秒id 查询状态:
completed 后,使用内容端点:
Bearer token authentication. Include your API key in the Authorization header as 'Bearer YOUR_API_KEY'
Request body for video generation using OpenAI Sora models. Uses multipart/form-data format.
Text prompt that describes the video to generate. For Storyboard mode, use the specific format with Shot N:, duration: Xsec, and Scene: descriptions.
"A cat walking on the street"
The video generation model to use. Defaults to sora-2.
sora-2, sora-2-pro "sora-2"
Clip duration in seconds. Defaults to 15 seconds.
4, 8, 12 "15"
Output resolution formatted as width x height. Defaults to 720x1280.
720x1280, 1280x720, 1024x1792, 1792x1024 "720x1280"
Optional image reference that guides generation. Upload as a file in multipart/form-data format.
Video generation request accepted
Response from video generation request. Returns immediately with task ID for asynchronous processing.
Unique identifier for the video generation request. Use this ID to query status and retrieve the video.
"video_68e688d4950481918ec389280c2f78140fcb904657674466"
Object type, always 'video'
"video"
Unix timestamp (in seconds) when the request was created
1759938772
Current status of the video generation. Use the query interface to check status updates.
queued, processing, completed, failed "queued"
Unix timestamp (in seconds) when the video generation completed. Null if not yet completed.
null
Error information if generation failed. Null if no error.
null
Unix timestamp (in seconds) when the video will expire. Download promptly to avoid expiration.
null
Model used for generation
"sora-2"
Generation progress percentage (0-100)
0 <= x <= 1000
ID of the video this was remixed from, if applicable
null
Video duration in seconds
"4"
Video resolution (width x height)
"720x1280"