Skip to main content

Create Video

Create a video generation task using the OpenAI/Sora-compatible request format. This endpoint is for models configured as video-generation channels, such as sora-2 and bytedance-seedance-1.5; actual availability depends on the model list and account channel configuration.

For the Alibaba Cloud Model Studio / DashScope native input / parameters format, see Aliyun Video Generation.

Try It

POST/v1/videoshttps://api-platform.ope.ai

Endpoints

EndpointAuthPurpose
POST /v1/videosAuthorization: Bearer <api-key>Create a video task with an API key
POST /api/videostoken: <jwt>Frontend-token proxy endpoint; request body is the same

Use the token header for a normal frontend JWT. Admin JWTs may use Authorization: Bearer <jwt>.

Authentication

Use Bearer token authentication.

  • Header: Authorization: Bearer <api-key>
  • Example: Authorization: Bearer sk-xxxxxx

Request Body(application/json)

FieldTypeRequiredDescription
modelstringYesVideo model ID, for example sora-2 or bytedance-seedance-1.5
promptstringYesText prompt
sizestringYesOutput size, preferably widthxheight, for example 720x1280
secondsstringYesVideo duration as a string, for example "4"; valid values depend on the model
generate_audiobooleanNoWhether to generate audio, for models that support it
enhance_promptbooleanNoWhether to enhance the prompt, for models that support it
negative_promptstringNoNegative prompt
person_generationstringNoPerson-generation policy; supported values depend on the model
seedintegerNoRandom seed
remix_video_idstringNoExisting video task ID for video remix/edit flows
input_reference.contentarrayNoMultimodal reference content; each item supports only image_url, video_url, or audio_url

input_reference.content[] shape:

FieldTypeRequiredDescription
typestringYesimage_url, video_url, or audio_url
rolestringNoReference role, for example reference_image
image_url.urlstringConditionalRequired when type=image_url; image URL or Data URL
video_url.urlstringConditionalRequired when type=video_url; video URL
audio_url.urlstringConditionalRequired when type=audio_url; audio URL

Field Restrictions

The platform rejects these incompatible fields: aspect_ratio, resolution, duration_seconds, top-level content, img_url in JSON requests, and legacy input_reference.file_id / input_reference.image_url. Put text in prompt; do not send input_reference.content[].text.

multipart/form-data is only for uploading a reference image file through the input_reference field. The file must be at most 10 MB and use image/jpeg, image/png, or image/webp. Do not send an input_reference file and remix_video_id in the same request.

Request Examples

curl -X POST "https://api-platform.ope.ai/v1/videos" \
-H "Authorization: Bearer $OPEAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2",
"prompt": "Create a short high-definition tech-style video showing AI video generation capabilities.",
"size": "720x1280",
"seconds": "4"
}'

Reference Content Example

{
"model": "bytedance-seedance-1.5",
"prompt": "Make the subject in the reference image turn naturally toward the camera with cinematic lighting.",
"size": "1280x720",
"seconds": "5",
"input_reference": {
"content": [
{
"type": "image_url",
"role": "reference_image",
"image_url": {
"url": "https://example.com/reference.png"
}
}
]
}
}

Response Example

The create endpoint returns a task ID. Poll Get Video Task Status, then download the result with Get Video Content after the task succeeds.

{
"id": "video_690d9b52e2b081908a05ded32cbfc629",
"object": "video",
"status": "queued",
"created_at": 1762499410,
"model": "sora-2",
"prompt": "Create a short high-definition tech-style video showing AI video generation capabilities.",
"size": "720x1280",
"seconds": "4"
}