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. 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.
For moderation, the official review covers at least three stages or directions:
- Whether the submitted image contains a real person, or something too close to a real person.
- Whether the prompt violates policy, such as violence, sexual content, copyright issues, or living celebrities.
- Whether the generated result passes review. This is also why generation can fail after reaching more than 90% progress.
Common errors: Inpaint image must match the requested width and height When using the official transfer group, the image resolution must match the official parameters, for example 720x1280.
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"
:
"make animate"
,
"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": "make animate",
"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"
}