Skip to main content
POST
OpenAI video generations
Use this endpoint to create an asynchronous video-generation task.
  • Authenticate with Authorization: Bearer {API_KEY}
  • The typical flow is create task, poll /v1/videos/{video_id}, then download /v1/videos/{video_id}/content
  • The first response usually returns a task object instead of the final asset
  • Polling is better handled on the server side

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
model
string
required

Video model name, for example sora-2.

Example:

"sora-2"

prompt
string
required

Text prompt for the video.

Example:

"一只可爱的小猫在花园里玩耍"

size
enum<string>
default:720x1280

Video resolution.

Available options:
720x1280,
1280x720
seconds
enum<string>

Video duration in seconds.

Available options:
4,
8,
12
input_reference
file

Optional reference image file used as the first frame.

Response

Successful video task creation response

id
string
required

Video task ID.

Example:

"video_123456789"

object
enum<string>
required

Object type.

Available options:
video
status
enum<string>
required

Current task status.

Available options:
pending,
in_progress,
completed,
failed
created_at
integer<int64>

Creation timestamp.

completed_at
integer<int64>

Completion timestamp.

model
string

Model used for generation.

progress
integer

Task progress percentage.

Required range: 0 <= x <= 100
expires_at
integer<int64>

Expiration timestamp for the generated asset.

seconds
string

Video duration in seconds.

size
enum<string>

Video resolution.

Available options:
720x1280,
1280x720
remixed_from_video_id
string

Source video ID when the task comes from remix.

error
object