Skip to main content
POST
/
v1
/
tasks
curl -X POST https://qingbo.dev/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-v2-master",
    "action": "generate",
    "prompt": "一条锦鲤在清澈的池塘中游动,水面波光粼粼",
    "aspect_ratio": "16:9",
    "duration": 5,
    "extra": {
      "mode": "pro"
    }
  }'
{
  "task_id": "task-wave1775285160b950328499",
  "model": "kling-v2-master",
  "action": "generate",
  "status": "queued",
  "created_at": 1775285160040,
  "progress": 0
}
Async processing mode — submit a request and receive a task ID. Use the Query Task Status endpoint to retrieve generation results. Video links are valid for 24 hours.
curl -X POST https://qingbo.dev/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-v2-master",
    "action": "generate",
    "prompt": "一条锦鲤在清澈的池塘中游动,水面波光粼粼",
    "aspect_ratio": "16:9",
    "duration": 5,
    "extra": {
      "mode": "pro"
    }
  }'
{
  "task_id": "task-wave1775285160b950328499",
  "model": "kling-v2-master",
  "action": "generate",
  "status": "queued",
  "created_at": 1775285160040,
  "progress": 0
}

Available Models

Model IDDescription
kling-v3Kling V3, supports 3-15 seconds, multi-shot, native audio
kling-v2-masterKling V2 Master
kling-v1-6Kling V1.6, supports camera control
kling-v1Kling V1

Common Parameters

model
string
required
Model ID
action
string
default:"generate"
Operation type
prompt
string
required
Video description text, maximum 2500 characters
aspect_ratio
string
default:"16:9"
Aspect ratio: 16:9, 9:16, 1:1Ignored for image-to-video; aspect ratio is determined by the input image
duration
integer
default:"5"
Video duration (seconds): 5, 10
negative_prompt
string
Content you do not want to appear, maximum 2500 characters. V1 / V1.6 only
image_urls
string[]
Reference image URL (first frame) for image-to-video. JPEG/PNG/WebP, up to 10MB
last_frame
string
Last frame image URL, requires image_urls
callback_url
string
Webhook callback URL
extra
object
Additional parameters passed through to Kling (see model tabs)

Model-Specific Parameters

duration range: 3-15 seconds
extra.mode
string
default:"std"
Generation mode: std (720P) or pro (1080P)
extra.enable_audio
boolean
default:"true"
Native audio generation, enabled by default
Multi-shot mode:Supports 2-6 shot segment generation using shot_N_prompt + shot_N_duration instead of prompt + duration:
"extra": {
  "shot_1_prompt": "特写:一杯咖啡在桌上冒着热气",
  "shot_1_duration": 5,
  "shot_2_prompt": "镜头拉远,展示整个咖啡馆的场景",
  "shot_2_duration": 5
}
Total duration across all shots must be within the 3-15 second range.

Generation Modes

ModeParametersDescription
Text-to-videopromptPure text generation
Image-to-videoprompt + image_urls (1 image)First frame image + text description
First/Last frameimage_urls (1 image) + last_frameTransition between start and end frames
For image-to-video, aspect_ratio is determined by the input image and does not need to be specified.

Response

task_id
string
Task ID
model
string
Model ID used
action
string
Operation type
status
string
Task status: queued
created_at
integer
Creation time (Unix millisecond timestamp)
progress
integer
Progress, initially 0