# Kling AI API on Wizzx - Model ID: `kling-ai` (Kuaishou Kling AI) - Submit: `POST https://api.wizzx.ai/api/v1/task/submit/kling-ai` - Status: `GET https://api.wizzx.ai/api/v1/task/{task_id}` - Idempotency: optional `Idempotency-Key: ` header on submit - Auth: header `Authorization: Bearer $WIZZX_API_KEY` (server-side only) - Price: from $0.036/second, billed in credits; failed tasks are refunded - Page: https://wizzx.ai/model/kling-ai - JSON Schema: https://wizzx.ai/api/models/kling-ai/schema - API reference: https://docs.wizzx.ai/api-reference/endpoint/submit-kling-ai ## Flow 1. POST the JSON body to the submit URL. The response contains `data.task_id`. 2. Poll `GET /api/v1/task/{task_id}` until `data.status` is `SUCCEEDED`, then read the output URLs from `data.result_urls`. 3. Stop on `FAILED` or `REVIEW_REQUIRED`. Do not resubmit automatically. ## Parameters | Field | Type | Required | Default | Allowed | Description | |---|---|---|---|---|---| | `prompt` | string | yes | | ≤ 2,500 | Describe the video you want to generate | | `type` | string | yes | text-to-video | text-to-video · image-to-video | | | `image_urls` | url[] ≤ 1 | no | | | Required in Image to video mode. Add exactly 1 image. | | `image_tail` | url | no | | | Image for the last frame (mutually exclusive with masks/camera) | | `negative_prompt` | string | no | | ≤ 2,500 | What you don't want in the video | | `duration` | integer | yes | 5 | 5 · 10 | Video duration in seconds | | `aspect_ratio` | string | no | 16:9 | 16:9 · 9:16 · 1:1 | | | `sound` | string | no | off | off · on | Adding synchronized audio changes the per-second rate. | ## Example body ```json { "type": "text-to-video", "quality_mode": "pro", "duration": 5, "model_name": "kling-v2-6", "aspect_ratio": "16:9", "sound": "off", "prompt": "A slow aerial push-in over a coastal cliff road at golden hour, cinematic motion" } ```