Naar hoofdinhoud gaan
POST
/
kling
/
v1
/
videos
/
effects
Create a Kling video-effects task
curl --request POST \
  --url https://api.cometapi.com/kling/v1/videos/effects \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "effect_scene": "hug",
  "input": {
    "model_name": "kling-v1-6",
    "mode": "std",
    "images": [
      "https://p2-kling.klingai.com/bs2/upload-ylab-stunt/c54e463c95816d959602f1f2541c62b2.png?x-kcdn-pid=112452",
      "https://p2-kling.klingai.com/bs2/upload-ylab-stunt/5eef15e03a70e1fa80732808a2f50f3f.png?x-kcdn-pid=112452"
    ],
    "duration": "10"
  }
}
'
{
  "code": 0,
  "message": "success",
  "data": {
    "task_id": "2032273960331935744",
    "task_status": "submitted",
    "task_info": {},
    "created_at": 1773366844624,
    "updated_at": 1773366844624
  }
}
Gebruik deze endpoint om een van Kling’s vooraf ingestelde effectscènes toe te passen en de invoerassets om te zetten in een nieuwe korte video.

Kies een effectscène

  • hug en kiss zijn presets voor interactie tussen twee personen
  • fuzzyfuzzy, squish, expansion en heart_gesture zijn gestileerde vooraf ingestelde effecten
  • De exacte vorm van de assets hangt af van het effect, maar de request verpakt providerspecifieke instellingen altijd binnen input

Taakverloop

1

Dien de effectrequest in

Verstuur effect_scene plus het bijpassende input-object en sla de geretourneerde taak-id op.
2

Poll de taak

Ga verder met Individuele query’s totdat de effecttaak is voltooid.
3

Bewaar het uiteindelijke asset

Download of mirror de voltooide effectvideo als je stabiele retentie nodig hebt.
Live-validatie op 2026-03-13 bevestigde dat een hug-request werd geaccepteerd zonder callback_url of external_task_id en task_status: submitted retourneerde.
Zie voor de volledige parameterreferentie de officiële Kling-documentatie.

Autorisaties

Authorization
string
header
vereist

Bearer token authentication. Use your CometAPI key.

Body

application/json
effect_scene
enum<string>
standaard:hug
vereist

Preset effect to apply. Each effect defines a specific animation or interaction style.

Beschikbare opties:
fuzzyfuzzy,
squish,
expansion,
hug,
kiss,
heart_gesture
input
object
vereist

Effect-specific input payload. Most interaction effects use one or more image URLs plus model settings.

callback_url
string
standaard:https://example.com/webhook

Webhook URL for task status notifications. The server sends a callback when the task status changes.

external_task_id
string
standaard:my-kling-effect-task-001

Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.

Respons

200 - application/json

Task accepted.

code
integer
vereist

Error code; specific error code definition

message
string
vereist

Error message

data
object
vereist