Skip to main content
POST
/
kling
/
v1
/
videos
/
image2video
cURL
curl https://api.cometapi.com/kling/v1/videos/image2video \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "image": "https://your-image-host/source.jpg",
      "prompt": "A cinematic slow push-in on the subject",
      "model_name": "kling-v3",
      "mode": "pro",
      "duration": "5",
      "sound": "off"
    }'
{
  "code": 0,
  "message": "success",
  "data": {
    "task_id": "2032273942220931072",
    "task_status": "submitted",
    "task_info": {},
    "created_at": 1773366840306,
    "updated_at": 1773366840306
  }
}
Use this endpoint to animate one source image into a Kling video.

Before you call it

  • Provide one public image URL or one base64 image string
  • Use an image that meets Kling pixel requirements; tiny thumbnails are rejected by the generation task
  • Start with the default kling-v2-6 example, then choose another model_name from the OpenAPI enum when you need a different model track
  • Keep the first request simple: one input image, one prompt, no tail frame, no motion masks
  • Use dynamic_masks as an array of mask-and-trajectory objects when you need controlled local motion
  • Use sound: off for a deterministic no-audio first request on model tracks that support generated sound

Model naming

Use ordinary Kling video model IDs on this endpoint. Keep Omni model IDs for Omni Video.

Task flow

1

Submit the image-to-video request

Create the task and store the returned Kling task_id.
2

Poll the task

Continue with Get a Kling task to follow task status until output is ready.
3

Store the result

Persist the finished asset if you need retention beyond the provider delivery URL.
For the full parameter reference, see the official Kling document.

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your CometAPI key.

Body

application/json
image
string
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.

prompt
string

Text prompt describing the desired motion. Maximum 500 characters.

negative_prompt
string

Elements to exclude from the video. Maximum 200 characters.

callback_url
string

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

mode
enum<string>
default:std

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

Available options:
std,
pro
model_name
enum<string>
default:kling-v1

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

Available options:
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
image_tail
string

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_scale
number

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

duration
string
default:5

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

static_mask
string

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.

dynamic_masks
object[]

Optional motion masks. Each entry contains a mask image and an ordered trajectory list.

external_task_id
string

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
enum<string>

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

Available options:
on,
off

Response

200 - application/json

Task accepted.

code
integer
required

Error code; specifically define the error code

message
string
required

error message

data
object
required