Skip to main content
POST
/
v1
/
videos
/
generations
Sora-2-Preview API
curl --request POST \
  --url https://api.evolink.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "sora-2-preview",
  "prompt": "A cat playing piano"
}
'
{
  "created": 1757169743,
  "id": "task-unified-1757169743-7cvnl5zw",
  "model": "sora-2-preview",
  "object": "video.generation.task",
  "progress": 0,
  "status": "pending",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 300,
    "video_duration": 9
  },
  "type": "video",
  "usage": {
    "billing_rule": "per_call",
    "credits_reserved": 7,
    "user_group": "default"
  }
}

Authorizations

Authorization
string
header
required

##All APIs require Bearer Token authentication##

Get API Key:

Visit API Key Management Page to get your API Key

Add to request header:

Authorization: Bearer YOUR_API_KEY

Body

application/json
model
string
default:sora-2-preview
required

Video generation model name

Example:

"sora-2-preview"

prompt
string
required

Prompt describing the video to generate, max 5000 tokens

Maximum string length: 5000
Example:

"A cat playing piano"

aspect_ratio
enum<string>

Video aspect ratio. 1280x720 generates landscape video, 720x1280 generates portrait video

Available options:
1280x720,
720x1280,
16:9,
9:16
Example:

"16:9"

duration
integer

Video duration (seconds), default 4

Note:

  • Only supports 4, 8, 12 seconds
  • Longer duration costs more
Example:

4

image_urls
string<uri>[]

Reference image URLs for image-to-video

Note:

  • Real person images not supported
  • Max 1 image per request
  • Max size: 10MB
  • Formats: .jpg, .jpeg, .png, .webp
  • Image pixel dimensions must exactly match the selected aspect_ratio (e.g., if aspect_ratio is 1280x720, the uploaded image must be exactly 1280x720 pixels)
  • Image URL must be directly accessible by server, or trigger download when accessed (typically URLs ending with image extensions like .png, .jpg)
Maximum array length: 1
Example:
["http://example.com/image1.jpg"]
callback_url
string<uri>

HTTPS callback URL for task completion

Callback Timing:

  • Triggered when task is completed, failed, or cancelled
  • Sent after billing confirmation

Security Restrictions:

  • HTTPS protocol only
  • Private IP addresses not allowed (127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x, etc.)
  • URL length max 2048 characters

Callback Mechanism:

  • Timeout: 10 seconds
  • Max 3 retries on failure (at 1s/2s/4s intervals)
  • Response format matches task query API
  • 2xx status code = success, other codes trigger retry
Example:

"https://your-domain.com/webhooks/video-task-completed"

Response

Video generation task created successfully

created
integer

Task creation timestamp

Example:

1757169743

id
string

Task ID

Example:

"task-unified-1757169743-7cvnl5zw"

model
string

Model name used

Example:

"sora-2-preview"

object
enum<string>

Task type

Available options:
video.generation.task
progress
integer

Task progress (0-100)

Required range: 0 <= x <= 100
Example:

0

status
enum<string>

Task status

Available options:
pending,
processing,
completed,
failed
Example:

"pending"

task_info
object
type
enum<string>

Output type

Available options:
text,
image,
audio,
video
Example:

"video"

usage
object