Create Task (OpenAI-Compatible / Sora Format)

This format is OpenAI's Videos API (the same endpoints used by the Sora model family); any on-sale video model can be called this way, and text-to-video / image-to-video share the same endpoint. The examples below use kling-video-v2.5-turbo:

Endpoint

POST /v1/videos

Request Body

FieldTypeRequiredNotes
modelstringYesModel name, per the Model Plaza
promptstringYesVideo description
secondsnumberNoDuration (seconds)
sizestringNoCanvas size, width x height (e.g. 1280x720); determines the aspect ratio; defaults to 1:1
modestringNoThree resolution tiers: std → 720p, pro → 1080p, ultra → 4k (4k supported by v3-series models only; tier validity is validated upstream). Defaults to std (720p) when omitted
imagestringNoFirst-frame image for image-to-video (URL or Base64); presence switches to image-to-video
metadataobjectNoVendor parameter pass-through object (image-to-video first/last frame first_frame_url / last_frame_url, seed, etc.; fields vary by model)

Request Examples

cURL
Python
Node.js
# Text-to-video
curl https://api-model.shuntianchuang.cn/v1/videos \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-your-token" \
  -d '{
    "model": "kling-video-v2.5-turbo",
    "prompt": "An orange cat chasing butterflies on a lawn, cinematic shot, slow zoom in"
  }'
# Image-to-video: image takes the first-frame image URL or Base64
curl https://api-model.shuntianchuang.cn/v1/videos \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-your-token" \
  -d '{
    "model": "kling-video-v2.5-turbo",
    "prompt": "Make the cat in the frame run, camera slowly zooming in",
    "image": "https://example.com/first-frame.jpg"
  }'

Response Body

A successful submission returns a task object — note its id (status starts as lowercase queued):

Response Example

{
  "id": "video_xxxxxxxx",
  "object": "video",
  "status": "queued",
  "model": "kling-video-v2.5-turbo"
}

For polling and video download, see Query & Download.