Skip to content
中文

Sora2Image-to-Video

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.

For moderation, the official review covers at least three stages or directions:

  1. Whether the submitted image contains a real person, or something too close to a real person.
  2. Whether the prompt violates policy, such as violence, sexual content, copyright issues, or living celebrities.
  3. 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.
images
array
[string]
Required
  // 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
4
8
12
notify_hook
string
Optional
watermark
boolean
Optional
private
boolean
Optional
Example
{
"prompt"
:
"string"
,
"model"
:
"sora-2"
,
"images"
:
[
"string"
]
,
"aspect_ratio"
:
"16:9"
,
"hd"
:
true
,
"duration"
:
"10"
,
"notify_hook"
:
"string"
,
"watermark"
:
true
,
"private"
:
true
}

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
}'

Response

🟢 200 Success

Content Type: application/json

Response Schema

text
object

Example

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