Videos
Create Video
POST
Create Video
Create a new video generation job from a prompt and optional reference assets.
Method Signature
Parameters
string
required
Text prompt that describes the video to generate.
string
The video generation model to use. Allowed values:
sora-2(default)sora-2-pro
integer
Clip duration in seconds. Allowed values:
4(default)812
string
Output resolution formatted as width x height. Allowed values:
720x1280(default) - vertical/portrait1280x720- horizontal/landscape1024x1792- vertical high-res1792x1024- horizontal high-res
file
Optional image reference that guides generation.
Returns
Returns aVideo object representing the video generation job.
string
Unique identifier for the video job.
string
Current lifecycle status of the video job:
queued- waiting to startin_progress- currently generatingcompleted- successfully finishedfailed- generation failed
integer
Unix timestamp (seconds) for when the job was created.
integer
Unix timestamp (seconds) for when the job completed, if finished.
integer
Unix timestamp (seconds) for when the downloadable assets expire, if set.
string
The video generation model that produced the job.
string
The prompt that was used to generate the video.
integer
Duration of the generated clip in seconds.
string
The resolution of the generated video.
integer
Approximate completion percentage for the generation task (0-100).
object
Error payload that explains why generation failed, if applicable.
string
Identifier of the source video if this video is a remix.
Helper Methods
create_and_poll
Create a video and wait for it to be processed.poll
Wait for a video job to finish processing.Examples
Basic video generation
Generate and wait for completion
Generate with image reference
Monitor progress with polling
Vertical video for social media
Create Video