Kling AI — video
Text-to-video and image-to-video via Kling AI. Models: kling-v1-6 / kling-2.6 / kling-v3 / kling-v2-1-master / kling-v2-5-turbo. Async, typical time 2–5 minutes.
The integration gotcha
Fields mode, resolution and duration_seconds are REQUIRED. Skip any of them or pass a value off the list and you'll get 422 "Pricing is not configured for this bundle". The bundle key is hashed from (provider, model, method, mode, resolution, duration) — without an exact match against a seeded combo, the bundle is created with no price.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| prompt | string | ✓ | Scene description, non-empty. |
| mode | enum | ✓ | standard | pro — standard = 720p (cheaper), pro = 1080p (pricier, better). |
| resolution | enum | ✓ | 720p | 1080p — Locked to mode: standard ↔ 720p, pro ↔ 1080p. |
| duration_seconds | integer | ✓ | 5 | 10 — Clip length in seconds. PER_SECOND pricing — cost scales linearly. |
| input_images | string[] | ✓ for i2v | 1–2 public URLs for image_to_video. https:// only. |
| aspect_ratio | enum | — | 16:9 | 9:16 | 1:1 |
Valid mode × resolution × duration combinations
Anything off this matrix triggers price_not_configured. Prices are seeded ONLY for these combos.
| mode | resolution | duration_seconds |
|---|---|---|
| standard | 720p | 5, 10 |
| pro | 1080p | 5, 10 |
docs.klingMatrixNote
Text-to-video
docs.klingT2vBody
curl -X POST https://api.aigenway.com/v1/generations \
-H "Authorization: Bearer sk_live_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"provider": "kling_ai",
"model": "kling-v3",
"method": "text_to_video",
"params": {
"prompt": "A red sports car drifting around a mountain curve at sunset, cinematic",
"mode": "pro",
"resolution": "1080p",
"duration_seconds": 5,
"aspect_ratio": "16:9"
}
}'Image-to-video
Attach 1–2 public image URLs in input_images. The first-frame must be a publicly reachable https URL.
curl -X POST https://api.aigenway.com/v1/generations \
-H "Authorization: Bearer sk_live_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"provider": "kling_ai",
"model": "kling-v3",
"method": "image_to_video",
"params": {
"prompt": "Subject turns their head slightly, light wind in their hair",
"input_images": ["https://your-cdn.example.com/portrait.jpg"],
"mode": "pro",
"resolution": "1080p",
"duration_seconds": 5
}
}'Polling for status and result
docs.klingPollingBody
# After POST returns { "task_id": "task_..." }, poll the task endpoint:
curl https://api.aigenway.com/v1/tasks/<task_id> \
-H "Authorization: Bearer sk_live_..."
# Or the alias (equivalent, returns the same shape):
curl https://api.aigenway.com/v1/generations/<task_id> \
-H "Authorization: Bearer sk_live_..."
# When status == "SUCCEEDED", fetch the result files:
curl https://api.aigenway.com/v1/tasks/<task_id>/result \
-H "Authorization: Bearer sk_live_..."Available models
All models support text_to_video + image_to_video. See the catalog for exact prices and supported mode/resolution combos.
kling-v1-6— Legacy, cheapest (~$0.14 / $0.49 std/pro for 5s)kling-2.6— Balanced quality and price (~$0.56 / $1.12)kling-v3— Latest generation, native audio in pro (~$0.42 / $0.56)kling-v2-1-master— Cinematic, pro only (~$0.70)kling-v2-5-turbo— Fast high quality, pro only (~$0.45)