Legacy Guide (v2.5-turbo)

This page is for existing users who integrated before September 2026 and only use kling-video-v2.5-turbo; it keeps only the fields that model actually uses. For new projects or other Kling models, see the new Submit Task.

Endpoints

  • Text-to-video: POST /kling/v1/videos/text2video
  • Image-to-video: POST /kling/v1/videos/image2video
  • Query: GET /kling/v1/videos/{text2video|image2video}/{task_id}

Request Body

FieldTypeRequiredDescription
modelstringYesFixed kling-video-v2.5-turbo (model_name also works)
promptstringYesVideo description
imagestringNoFirst-frame image for image-to-video (URL or Base64); presence switches to image-to-video. jpg / jpeg / png, ≤ 50MB, both dimensions ≥ 300px
modestringNoResolution tier: std (720p) / pro (1080p); defaults to std
durationstringNoDuration in seconds: "5" / "10"; defaults to "5"
sizestringNoAspect ratio, text-to-video only: 1920x1080 / 1280x720 → 16:9, 720x1280 / 1080x1920 → 9:16, anything else → 1:1. Image-to-video follows the image
metadataobjectNoExtra parameters: metadata.image_tail (last frame, requires image, auto-forces 1080p) and metadata.negative_prompt (negative prompt)
NOTE

v2.5-turbo does not support audio (audio), 4k resolution (ultra), element / voice references (el- / vo-), or multi-shot; such legacy fields are ignored. For those, switch to the new fields with the corresponding models.

Request Example

cURL
Python
Node.js
# Text-to-video
curl -X POST https://api-model.shuntianchuang.cn/kling/v1/videos/text2video \
  -H "Authorization: Bearer sk-你的令牌" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-video-v2.5-turbo",
    "prompt": "一只橘猫在草地上追蝴蝶,电影感镜头,缓慢推近",
    "duration": "5",
    "size": "1280x720",
    "mode": "std"
  }'
# Image-to-video with last frame
curl -X POST https://api-model.shuntianchuang.cn/kling/v1/videos/image2video \
  -H "Authorization: Bearer sk-你的令牌" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-video-v2.5-turbo",
    "image": "https://example.com/first-frame.jpg",
    "prompt": "让画面中的猫跑起来,镜头缓慢推近",
    "metadata": {"image_tail": "https://example.com/last-frame.jpg"}
  }'

Query & Download

Poll with the task ID returned by the submit call (replace text2video with image2video for image-to-video):

curl https://api-model.shuntianchuang.cn/kling/v1/videos/text2video/task_xxxxxxxx \
  -H "Authorization: Bearer sk-你的令牌"
data fieldDescription
task_idTask ID; the submit response also returns a top-level copy of task_id
task_statusLifecycle: submitted → processing → succeed (success) or failed (failure)
task_status_msgFailure reason, non-empty only on failure
task_result.videos[]Video list on success; each item has id, url (time-limited download link, re-host promptly), duration (seconds)
final_unit_deductionActual consumption on success (string, in TokenHub token), returned only on success
created_at / updated_atTask creation / last-update timestamps (ms), returned only on success
{
  "code": 0,
  "message": "SUCCEED",
  "data": {
    "task_id": "task_9AUeg9lOftqbEG1kgmcYngreXu0aJe20",
    "task_status": "succeed",
    "task_status_msg": "",
    "task_result": {
      "videos": [
        { "id": "937575610917490712", "url": "https://xxxx/video.mp4", "duration": "5.083" }
      ]
    },
    "create_time": 1791563923000,
    "update_time": 1791564087821,
    "created_at": 1791563923000,
    "updated_at": 1791564087821,
    "final_unit_deduction": "250000"
  }
}
NOTE

An integer code of 0 means the request was accepted / the query succeeded (message is "SUCCEED"); the business status is data.task_status.

NOTE

Model names and prices follow the model marketplace; billing settles on actual usage when the task completes (failed tasks are refunded). For new models or the new field style see the new Submit Task.