v1

latestOpenAPI 3.1.02026-07-267724480.0 KB

Create a Kling image-to-video task

Submit one source image and receive a task id for later polling.

post/kling/v1/videos/image2video

Request body

promptstring

Text prompt describing the desired motion. Maximum 500 characters.

negative_promptstring

Elements to exclude from the video. Maximum 200 characters.

imagestring required

Source image URL or base64 image string. Use an image that meets Kling pixel requirements; very small thumbnails are rejected. For base64 input, send the encoded image string as the field value.

callback_urlstring

Webhook URL to receive task status updates when the task completes.

mode'std' | 'pro'

Generation mode. std for standard (faster), pro for professional (higher quality).

model_name'kling-v1' | 'kling-v1-5' | 'kling-v1-6' | 'kling-v2-master' | 'kling-v2-1' | 'kling-v2-1-master' | 'kling-v2-5-turbo' | 'kling-v2-6' | 'kling-v3'

Model ID for this image-to-video request. Use kling-v3 for new requests. Use Omni model IDs only with the Omni Video endpoint.

image_tailstring

Tail-frame reference image as a Base64 string or public URL. Same format requirements as image. Controls the last frame of the generated video.

cfg_scalenumber

Prompt adherence strength. Higher values follow the prompt more closely. Range: 0–1.

durationstring

Output video length in seconds. Use 5 or 10; omit to use 5.

static_maskstring

Static brush mask image as a Base64 string or public URL. White areas are frozen in place during video generation. Must match the aspect ratio and resolution of the input image.

external_task_idstring

Custom task id for your own tracking. Does not replace the system-generated task id but can be used to query tasks. Must be unique per user.

sound'on' | 'off'

Optional generated-audio switch for models that support video sound. Use on or off, or omit the field for the model default.

Response

Task accepted.

codeinteger required

Error code; specifically define the error code

messagestring required

error message

Example response

{
  "code": 0,
  "message": "success",
  "data": {
    "task_id": "2032273942220931072",
    "task_status": "submitted",
    "task_info": {},
    "created_at": 1773366840306,
    "updated_at": 1773366840306
  }
}