Skip to main content
Use this endpoint to submit a new video generation task with OpenAI’s Sora model. You supply a prompt, choose your model variant, set the duration and aspect ratio, and optionally attach a reference image to guide the visual style. The API responds immediately with a task id — you then poll the Query Video Task endpoint until the video is ready.
Video generation is asynchronous. The create endpoint returns a task id with status: "queued". Use the Query Video Task endpoint to check progress and retrieve the final video_url.

Base URL & Endpoint

All requests must include your API key as a Bearer token:

Supported Models

Request Parameters

string
required
The Sora model to use. Accepted values:
  • openAiSora2Plus — enhanced model, supports 4, 8, 12-second videos
  • openAiSora2Pro — higher-quality model, supports 4, 8, 12-second videos
string
required
A text description of the video you want to generate. Be specific about the scene, style, motion, and lighting.Example: "A cat dancing in the rain, cinematic style"
string
Video resolution. Use this or aspect_ratio — not both.
  • 720x1280 — portrait (default)
  • 1280x720 — landscape
Only these two resolutions are supported. The image orientation of any reference image must match the chosen size.
string
Video aspect ratio. Use this or size — not both.
  • 16:9 — landscape
  • 9:16 — portrait
integer
Video duration in seconds. Accepted values: 4, 8, 12.Use this or seconds — not both.
integer
Video duration in seconds. Accepted values: 4, 8, 12.Use this or duration — not both.
array
An array of reference image URLs to guide video style and content. Maximum 1 image.Use this or image_urls — not both.Constraints:
  • Do not use real portrait photographs — these will likely cause generation failures.
  • Image dimensions must match the chosen ratio: 1280×720 for 16:9, or 720×1280 for 9:16.
array
An array of reference image URLs to guide video style and content. Maximum 1 image.Use this or input_reference — not both.Constraints:
  • Do not use real portrait photographs — these will likely cause generation failures.
  • Image dimensions must match the chosen ratio: 1280×720 for 16:9, or 720×1280 for 9:16.

Response Fields

string
Unique identifier for the video generation task. Save this value — you will use it to poll the Query Video Task endpoint.
string
Object type. Always "video.generation".
integer
Unix timestamp (seconds) of when the task was created.
string
The model name you specified in the request.
string
Initial task status. On successful creation this is always "queued".
string
Error message. Only present when status is "failed".

Code Examples

Example success response:

Parameter Mutual Exclusivity

Tips

Write better prompts — include a specific scene description, style keywords (e.g. "cinematic", "artistic", "realistic"), motion descriptions, and lighting preferences for best results.
Avoid real portrait photos as reference images. The Sora model does not support realistic human faces and such requests will almost always fail. Use stylised or illustrated imagery instead.
After creating a task, poll the Query Video Task endpoint every 30–60 seconds. A typical 8-second video takes 2–5 minutes to generate.