Skip to main content
POST
cURL
Gebruik dit endpoint om één bronafbeelding te animeren naar een Kling-video.

Voordat je het aanroept

  • Geef één openbare afbeeldings-URL of één base64-afbeeldingsstring op
  • Gebruik een afbeelding die voldoet aan de pixelvereisten van Kling; piepkleine thumbnails worden door de generatietaak afgewezen
  • Begin met het standaardvoorbeeld kling-v2-6 en kies daarna een andere model_name uit de OpenAPI-enum wanneer je een ander modelspoor nodig hebt
  • Houd het eerste verzoek eenvoudig: één invoerafbeelding, één prompt, geen eindframe, geen bewegingsmaskers
  • Gebruik dynamic_masks als een array van mask-and-trajectory-objecten wanneer je gecontroleerde lokale beweging nodig hebt
  • Gebruik sound: off voor een deterministisch eerste verzoek zonder audio op modelsporen die gegenereerd geluid ondersteunen

Modelnaamgeving

Gebruik gewone Kling-video-model ID’s op dit endpoint. Bewaar Omni-model ID’s voor Omni Video.

Taakverloop

1

Dien het image-to-video-verzoek in

Maak de taak aan en sla het geretourneerde Kling task_id op.
2

Poll de taak

Ga verder met Een Kling-taak ophalen om de taakstatus te volgen totdat de uitvoer gereed is.
3

Sla het resultaat op

Bewaar het voltooide asset als je retentie nodig hebt die langer is dan de aflever-URL van de provider.
Zie voor de volledige parameterreferentie het officiële Kling-document.

Autorisaties

Authorization
string
header
vereist

Bearer token authentication. Use your CometAPI key.

Body

application/json
image
string
vereist

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>
standaard:std

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

Beschikbare opties:
std,
pro
model_name
enum<string>
standaard: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.

Beschikbare opties:
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
standaard: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.

Beschikbare opties:
on,
off

Respons

200 - application/json

Task accepted.

code
integer
vereist

Error code; specifically define the error code

message
string
vereist

error message

data
object
vereist