Skip to main content
POST
OpenAI Sora 2 Text-to-Video API
This is an async API that only returns the task_id of the async task. Use the task_id to call the Get Async Task Result API to retrieve the video generation result.
This is an async API that only returns the task_id of the async task. Use the task_id to call the Get Async Task Result API to retrieve the generated result.

Request Headers

string
required
Enum: application/json
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

string
default:"720*1280"
Pixel dimensions of the generated video (widthheight). When professional is true (Pro version), supported values: 7201280, 1280720, 10241792, 17921024. When professional is false, supported values: 7201280, 1280*720.Possible values: 720*1280, 1280*720, 1024*1792, 1792*1024
string
required
Positive text prompt for video generation.Length limit: 1 - 2000
integer
default:4
Duration of the generated video (in seconds).Possible values: 4, 8, 12
boolean
default:false
Whether to use the Pro version. If not provided, defaults to false.

Response

string
required
Use the task_id to call the Get Async Task Result API to retrieve the generated output.