Skip to content
中文

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. 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. Example: @{character1Username} dances hand in hand with @{character2Username} on a stage 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
  // provider-specific example normalized for English documentation
Example: @{character1Username} dances hand in hand with @{character2Username} on a stage
model
enum<string>
Required
Enum Values:
sora-2
sora-2-pro
Supports hd and 15s.
images
array
[string]
Optional
  // provider-specific example normalized for English documentation
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
  // provider-specific example normalized for English documentation
notify_hook
string
Optional
watermark
boolean
Optional
private
boolean
Optional
Whether to hide the video. If true, the video is not published and cannot be remixed. Defaults to false.
character_url
string
Optional
  // provider-specific example normalized for English documentation
character_timestamps
string
Optional
  // provider-specific example normalized for English documentation
{start},{end}
  // provider-specific example normalized for English documentation
Example
{
"prompt"
:
"string"
,
"model"
:
"sora-2"
,
"images"
:
[
"string"
]
,
"aspect_ratio"
:
"16:9"
,
"hd"
:
true
,
"duration"
:
"10"
,
"notify_hook"
:
"string"
,
"watermark"
:
true
,
"private"
:
true
,
"character_url"
:
"string"
,
"character_timestamps"
:
"string"
}

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": "string",
    "model": "sora-2",
    "images": [
        "string"
    ],
    "aspect_ratio": "16:9",
    "hd": true,
    "duration": "10",
    "notify_hook": "string",
    "watermark": true,
    "private": true,
    "character_url": "string",
    "character_timestamps": "string"
}'

Response

🟢 200 Success

Content Type: application/json

Response Schema

text
object

Example

json
{
    "task_id": "f0aa213c-c09e-4e19-a0e5-c698fe48acf1"
}