Skip to content
中文

POST /v1/videos

Method: POSTEndpoint: /v1/videos

https://platform.openai.com/docs/api-reference/videos/create

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.

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
Authorization
string
Optional
Default Value:
Bearer {{YOUR_API_KEY}}

Body Parameters multipart/form-data

text
model
enum<string>
Required
Enum Values:
sora-2
sora-2-pro
Example:
sora-2
prompt
string
Required
Example:
  // provider-specific example normalized for English documentation
size
enum<string>
Optional
Output resolution formatted as width x height. Defaults to 720x1280.
Enum Values:
1280x720
  // provider-specific example normalized for English documentation
720x1280
  // provider-specific example normalized for English documentation
1792x1024
  // provider-specific example normalized for English documentation
  // provider-specific example normalized for English documentation
1024x1792
  // provider-specific example normalized for English documentation
  // provider-specific example normalized for English documentation
Example:
720x1280
input_reference
file
Optional
Example:
https://example.com/reference.jpg
seconds
string
Optional
Clip duration in seconds. Defaults to 4 seconds.
  // provider-specific example normalized for English documentation
  // provider-specific example normalized for English documentation
Example:
4
watermark
boolean
Optional
Example:
false

Example Request

Shell

bash
curl --location --request POST '/v1/videos' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--form 'model="sora-2"' \
  // provider-specific example normalized for English documentation
--form 'size="720x1280"' \
--form 'input_reference=@"https://example.com/reference.jpg"' \
--form 'seconds="4"' \
--form 'watermark="false"'

Response

🟢 200 Success

Content Type: application/json

Response Schema

text
object

Example

json
{}