POST /v2/videos/generations
Method: POSTEndpoint: /v2/videos/generations
This section contains endpoint-specific behavior, parameters, or usage notes for this API. This section contains endpoint-specific behavior, parameters, or usage notes for this API.
Request Parameters
Header Parameters
text
Content-Type
string
Required
Example:
application/json
Authorization
string
Optional
Default Value:
Bearer {{YOUR_API_KEY}}Body Parameters application/json
text
prompt
string
Required
model
enum<string>
Required
Enum Values:
sora-2
sora-2-pro
Supports hd and 15s.
aspect_ratio
enum<string>
Output ratio
Optional
Enum Values:
16:9
Landscape
9:16
Portrait
hd
boolean
Optional
Whether to generate HD output. Defaults to false. HD generation is slower and is supported only by sora-2-pro.
duration
enum<string>
Optional
Video duration. Only sora-2-pro supports 25 seconds.
Enum Values:
10
15
25
Only sora-2-pro supports 25 seconds; when set to 25, HD has no effect.
notify_hook
string
Optional
https://xxxx.com/callback
watermark
boolean
Default: false
Optional
private
boolean
Optional
Whether to hide the video. If true, the video is not published and cannot be remixed. Defaults to false.
Example
{
"prompt"
:
// provider-specific example normalized for English documentation
,
"model"
:
"sora-2"
,
"aspect_ratio"
:
"16:9"
,
"hd"
:
false
,
"duration"
:
"10"
}Example Request
Shell
bash
curl --location --request POST '/v2/videos/generations' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "Example prompt from provider documentation.",
"model": "sora-2",
"aspect_ratio": "16:9",
"hd": false,
"duration": "10"
}'Response
🟢 200 Success
Content Type: application/json
Response Schema
text
objectExample
json
{
"task_id": "f0aa213c-c09e-4e19-a0e5-c698fe48acf1"
}