Skip to main content

Create Video

Create a video generation task.

Try It

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

Authentication

Uses Bearer Token authentication.

  • Header: Authorization: Bearer <token>
  • Example: Authorization: Bearer sk-xxxxxx

Request body (application/json)

FieldTypeRequiredDescription
modelstringYesModel/style ID
promptstringYesText description prompt
secondsnumberNoVideo duration (seconds), only supports 4, 8, 12 seconds
sizestringNoOutput resolution, format widthxheight

Request examples

The domain below is an example: https://api-platform.ope.ai. Content references createvideo.

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": "Generate a short video showcasing AI video generation capabilities, tech-inspired, high-definition.",
"seconds": 4,
"size": "720x1280"
}'

Response example (200)

{
"id": "string",
"object": "string",
"model": "string",
"status": "string",
"progress": 0,
"created_at": 0,
"seconds": "string",
"completed_at": 0,
"expires_at": 0,
"size": "string",
"error": {
"message": "string",
"code": "string"
},
"metadata": {}
}