=== useapi.net — universal note === Generated: 2026-09-11 20:33 UTC Authentication (applies to every useapi.net API). Header: Authorization: Bearer user:- Use the COMPLETE token, including the `user:` prefix and the alphanumeric suffix. Do not truncate. Do not URL-encode. A single token authorizes every API under the user's subscription. Service-specific patterns. Identifier names (jobid / taskId / musicId / etc.), job lifecycle, response shapes, webhook semantics, and synchronous-vs-async behavior vary PER API. Use ONLY the service-specific documentation below to determine the correct request body, response shape, polling endpoint, and status values for THIS API. Do not assume conventions from another useapi.net API carry over. For cross-service context (e.g. which APIs expose the same underlying model, billing tiers, model availability matrix), see https://useapi.net/llms.txt === END universal note === === URL: https://useapi.net/docs/start-here/setup-kling === Document URL: https://useapi.net/docs/start-here/setup-kling --- layout: default title: Setup Kling description: "How to connect a Kling account to the useapi.net API with your email and password — plus a browser connect tool for accounts that hit the Kling login slider captcha." parent: Start Here nav_order: 210 --- # Setup Kling April 18, 2025 (July 20, 2026) ## Table of contents Approximately 2 minutes to complete setup steps. --- > This is the setup guide for [Kling API](/docs/api-kling-v1). An active [Kling AI](https://kling.ai/app/) subscription and a [useapi.net subscription](/docs/subscription) are required for the API to work. ## Create Kling AI account Navigate to [https://kling.ai/app/](https://kling.ai/app) and sign up with an email account. Our API does not support Gmail or Apple accounts. We strongly recommend creating a separate Kling AI account designated for API work. ![](/assets/images/kling_setup_1.png) ![](/assets/images/kling_setup_2.png) ![](/assets/images/kling_setup_3.png) ![](/assets/images/kling_setup_4.png) ## Add your account Most Kling accounts connect with just an email and password. Enter them below and choose **Add Account** (or **Verify** to test the credentials first). A `200` response means success. You can also call [POST /accounts](/docs/api-kling-v1/post-kling-accounts) directly.
## Seeing a login slider captcha? Some Kling accounts are asked to solve a security slider at login. Kling decides this from the account's own risk history, so a brand-new or heavily-used account may get it while others never do. Our server cannot solve that slider, so for those accounts the **Add Account** step above returns: ```json { "error": "Unable to login (400002)" } ``` If you never see the slider when you sign in to Kling yourself, you do not need any of this — email and password is all it takes. When you *do* hit it, connect the account from your own browser instead, where the slider appears and you solve it once. Our connect tool guides you through it: you sign in to Kling a single time, it captures your signed-in session — a durable `passToken` plus your `did` and `userId` — and adds the account with those values. From then on the API refreshes the session with the `passToken` (valid about 21 days and rotated on each use), so no slider and no password login are needed. [Open the Kling connect tool](/assets/setup-browser/kling-connect.html) The tool shows the exact steps — copy a short code, paste it into Kling's browser Console, sign in and solve the slider, then paste your useapi.net API token and click **Add account**. ### Prefer to grab the values by hand? You can also read the three values yourself and pass them to [POST /accounts](/docs/api-kling-v1/post-kling-accounts). After you have signed in to Kling and solved the slider, open Developer Tools on [kling.ai/app](https://kling.ai/app) `1`, switch to the `Application` tab `2`, then under `Cookies` select `https://kling.ai` `3`. Copy the value of these three cookies: * `did` — a device id * `passToken` — the durable session token (about 21 days, rotated on each use) * `userId` — your numeric account id ![](/assets/images/kling_connect_1.jpg) Send all three together on [POST /accounts](/docs/api-kling-v1/post-kling-accounts), alongside your `email`, `password`, and `maxJobs`. Provide them only for an account that hits the slider — leave them out and the normal email and password login is used. Paste them into the form below with your email and password, then choose **Add Account** (or **Verify** to test first). A `200` response means success.
> `passToken`, `did`, and `userId` are your live Kling session — keep them private and treat them like a password. The connect tool holds them in your browser and only sends them to useapi.net when you click **Add account**. === URL: https://useapi.net/docs/api-kling-v1 === Document URL: https://useapi.net/docs/api-kling-v1 --- layout: default title: Kling API v1 description: "useapi.net Kling API v1 — REST API for Kling AI by Kuaishou: video generation across Kling v3, v3 Turbo, O3, 2.6, 2.5, 2.1 and 1.6, plus avatars, motion control, reusable elements, lip-sync TTS and custom voice cloning." nav_order: 4000 has_children: true permalink: /docs/api-kling-v1 --- # Kling API v1 April 18, 2025 (August 13, 2026) This is an [experimental](/docs/legal) API for [Kling AI](https://kling.ai/app), a generative artificial intelligence service developed by Chinese short video giant [Kuaishou Technology](https://www.kuaishou.com/en). Kling AI is considered by many to be the [best AI model](https://artificialanalysis.ai/text-to-video/arena?tab=leaderboard&input=image), leading the pack with prompt adherence, video quality and unmatched consistency. Our API support Kling models `v3`, `v3 Turbo`, `O1`, `2.6`, `2.5`, `2.1`, `2.0`, `1.6` and `1.5` with optional audio generation for enhanced video experiences. Model `v3` brings enhanced video quality with 3-15s duration, multi-shot storytelling, VIDEO elements, improved image generation with 4k resolution, and custom voice support. Model `v3 Turbo` (`kling-v3-0-turbo`) offers faster generation at v3.0 quality. Model `2.6` supports Native Audio generation. [Motion Control](/blog/260106) (apply motion from video to image) supports v3.0 and v2.6 models. [Avatars 2.0](/docs/api-kling-v1/get-kling-avatars) with AI-powered lip-sync video generation and TTS support. [Elements](/docs/api-kling-v1/get-kling-elements) for creating reusable character/object references across v3 and O1 generations. In contrast to the [official](https://klingai.com/global/dev/pricing) Kling API, which starts at $4,200/month Video Generation ($2,100/month Image Generation) and requires a 3-month subscription commitment, you can start using the API with a Free or [$10/month](https://kling.ai/app/membership/membership-plan) Standard plan and upgrade or [top up](https://kling.ai/app/membership/spirit-unit) your account as needed. As a bonus, you can execute unlimited generations of: * Speech generation (up to **5 minutes** long) via [POST tts/create](/docs/api-kling-v1/post-kling-tts-create) * Face detection via [POST images/recognize-faces](/docs/api-kling-v1/post-kling-images-recognize-faces) These features are available for all Kling subscription plans, including the **free** one.
💲 Cost calculator Current Kling prices and offers
Name Cost $ Credits Single credit cost
Pro monthly (3000 credits per month) $33 3000 $0.01100

Generation Pricing

Kling Model Credits Single generation cost
2.6 Pro Native Audio 1080p 10sec 70 $0.77
2.6 Pro Native Audio 1080p 5sec 35 $0.39
2.6 Pro 1080p 10sec 50 $0.55
2.6 Pro 1080p 5sec 25 $0.28
2.6 Std 720p 10sec 30 $0.33
2.6 Std 720p 5sec 15 $0.17
2.5 Pro 1080p 10sec 50 $0.68
2.5 Pro 1080p 5sec 25 $0.34
2.1 Pro 1080p 10sec 70 $0.53
2.1 Pro 1080p 5sec 35 $0.27
2.1 Std 720p 10sec 40 $0.30
2.1 Std 720p 5sec 20 $0.15
2.x Master 1080p 10sec 200 $1.52
2.x Master 1080p 5sec 100 $0.76
1.6 Pro 1080p 10sec 70 $0.53
1.6 Pro 1080p 5sec 35 $0.27
1.6 Std 720p 10sec 40 $0.30
1.6 Std 720p 5sec 20 $0.15
v3 Motion Pro (per sec) 12 $0.13
v3 Motion Std (per sec) 9 $0.10
2.6 Motion Std 720p 10sec 70 $0.53
2.6 Motion Std 720p 5sec 35 $0.27
2.6 Motion Pro 1080p 10sec 100 $0.76
2.6 Motion Pro 1080p 5sec 50 $0.38
Video Extend 20 $0.22
Video Add Sound 2.5 $0.025
Effects Std 20 $0.22
Effects Pro 35 $0.39
LipSync 5sec 5 $0.06
LipSync 10sec 10 $0.11
Avatar 2.0 Pro (per sec) 8 $0.09
Avatar 2.0 Std (per sec) 4 $0.04
Virtual Try-On 5 $0.06
KOLORS 1.5/2.0/2.1 Image 1 $0.01
O1 Image 1k 1 $0.01
O1 Image 2k 1 $0.01
O1 Video Pro 10sec 70 $0.77
O1 Video Pro 5sec 35 $0.39
O1 Video Std 10sec 35 $0.39
O1 Video Std 5sec 18 $0.20
v3 Video 4k (per sec) 30 $0.33
v3 Video Pro (per sec) 12 $0.13
v3 Video Std (per sec) 9 $0.10
v3 Video Pro audio-off (per sec) 8 $0.09
v3 Video Std audio-off (per sec) 6 $0.07
v3 Turbo Video Pro (per sec) 10 $0.11
v3 Turbo Video Std (per sec) 8 $0.09
v3 Image 1k 1 $0.01
v3 Image 2k 2 $0.02
v3 Image 4k (VIP) 4 $0.04
KOLORS v3.0 Image 1 $0.01
[Setup Kling](/docs/start-here/setup-kling) [Postman collection](https://www.postman.com/useapinet/useapi-net/collection) (August 13, 2026) [LLM-friendly API spec](https://useapi.net/assets/aibot/api-kling-v1.txt) Feed this to your LLM to build integrations Articles: * [How to Generate AI Video with Kling v3 via the Kling API](/docs/articles/kling-bash) * [How to Generate Multi-Reference & Multi-Shot Video with Kling Omni via the Kling API](/docs/articles/kling-omni-bash) * [Kling Lip-Sync Avatars, Motion Control & Image Generation via the Kling API](/docs/articles/kling-features-bash) Blogs: * [Kling 3.0 Turbo](/blog/260617) * [17 AI Image Models: The Showdown](/blog/260309i) * [Kling Motion Control v3.0](/blog/260306) * [Kling Multi-Shot](/blog/260216) * [Kling API v3](/blog/260209) * [Kling API Elements & Avatars 2.0](/blog/260112) * [Kling API Video O1 (Omni)](/blog/260112) * [Kling API Motion Control v2.6](/blog/260106) * [Kling API Image O1 (Omni)](/blog/251210) * [Kling API v2.6 with Native Audio](/blog/251204) * [Kling API Create Video using First and Last Frames](/blog/251127) * [Kling API Motion Control Samples](/blog/251007) * [Kling API Text/Image-to-Video v2.5 Samples](/blog/250923) * [Kling API Text/Image-to-Video v1.5, v1.6 and v2.0 Samples](/blog/250418) * [Kling API Text-to-Image KOLORS Samples](/blog/250424) * [Kling API KOLORS Elements Sample](/blog/250718) * [Kling API Video To Sound](/blog/250808) Developer Community: * Discord Server * Telegram Channel === URL: https://useapi.net/docs/api-kling-v1/del-kling-accounts-email === Document URL: https://useapi.net/docs/api-kling-v1/del-kling-accounts-email --- layout: default title: DELETE accounts/`email` description: "Remove a specific Kling account from your useapi.net configuration by email via DELETE accounts/email in the Kling API v1." parent: Kling API v1 nav_order: 130 --- ## Delete Kling API account configuration for `email` April 18, 2025 --- This endpoint removes a specific Kling account from your configuration. > **https://api.useapi.net/v1/kling/accounts/`email`** The `email` value should correspond to an account configured previously via a [POST /accounts](/docs/api-kling-v1/post-kling-accounts) request. ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Responses **204** **204 No Content** Account successfully deleted. **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Account configuration not found. ##### Examples **Curl** ``` bash curl -X DELETE https://api.useapi.net/v1/kling/accounts/ \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = `https://api.useapi.net/v1/kling/accounts/${email}`; const response = await fetch(apiUrl, { method: "DELETE", headers: { "Authorization": `Bearer ${token}`, }, }); console.log("response", {status: response.status, statusText: response.statusText}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = f"https://api.useapi.net/v1/kling/accounts/{email}" headers = { "Authorization" : f"Bearer {token}" } response = requests.delete(apiUrl, headers=headers) print(response.status_code, response.reason) ``` === URL: https://useapi.net/docs/api-kling-v1/del-kling-assets-uploaded === Document URL: https://useapi.net/docs/api-kling-v1/del-kling-assets-uploaded --- layout: default title: DELETE assets/uploaded description: "Delete one or more uploaded assets from your Kling account via DELETE assets/uploaded in the useapi.net Kling API v1 — deleted assets cannot be recovered." parent: Kling API v1 nav_order: 202 --- ## Delete uploaded Kling assets May 6, 2026 --- This endpoint deletes one or more assets that you previously uploaded to your Kling account via [POST /assets](/docs/api-kling-v1/post-kling-assets). Deleted assets cannot be recovered. To delete generated assets (outputs), use [DELETE /tasks/`task_id`](/docs/api-kling-v1/del-kling-tasks-task_id) instead. > **https://api.useapi.net/v1/kling/assets/uploaded/?email=`email`&id=`id`** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `email` is **required** — the previously configured account email (see [POST /accounts](/docs/api-kling-v1/post-kling-accounts)). - `id` is **required** — the uploaded asset ID, or a comma-separated list of up to 10 numeric IDs. Asset IDs are returned by [GET /assets/uploaded](/docs/api-kling-v1/get-kling-assets-uploaded) in the `id` field of each item in `uploadAssetsList`. ##### Responses **200** **200 OK** ```json { "deleted": 1, "ids": ["869218167527833688"] } ``` The response indicates how many assets were deleted and their IDs. **400** **400 Bad Request** ```json { "error": "Parameter id (...) must be a numeric string or a comma-separated list of up to 10 numeric strings" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript, all fields are optional deleted: number // Number of uploaded assets deleted ids: string[] // Array of deleted asset IDs } ``` ##### Examples **Curl** ``` bash curl -X DELETE "https://api.useapi.net/v1/kling/assets/uploaded/?email=user@example.com&id=869218167527833688" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const id = "869218167527833688"; // single id, or "id1,id2,id3" up to 10 const apiUrl = `https://api.useapi.net/v1/kling/assets/uploaded/?email=${email}&id=${id}`; const response = await fetch(apiUrl, { method: "DELETE", headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" id = "869218167527833688" # single id, or "id1,id2,id3" up to 10 apiUrl = f"https://api.useapi.net/v1/kling/assets/uploaded/?email={email}&id={id}" headers = { "Authorization" : f"Bearer {token}" } response = requests.delete(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/del-kling-avatars-avatarId === Document URL: https://useapi.net/docs/api-kling-v1/del-kling-avatars-avatarId --- layout: default title: DELETE avatars/avatarId description: "Delete a personal Kling avatar by ID via DELETE avatars/avatarId in the useapi.net Kling API v1 — system template avatars cannot be deleted." parent: Kling API v1 nav_order: 465 --- ## Delete avatar January 12, 2026 --- This endpoint deletes a specific avatar by its ID. Use [GET /avatars](/docs/api-kling-v1/get-kling-avatars) to list your avatars and get their IDs. Note: You can only delete personal avatars created via [POST /avatars](/docs/api-kling-v1/post-kling-avatars). System template avatars cannot be deleted. > **https://api.useapi.net/v1/kling/avatars/`avatarId`?...** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Path Parameters - `avatarId` is **required**, the avatar ID to delete. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. ##### Responses **200** **200 OK** ```json { "deleted": null } ``` A `null` value indicates successful deletion. **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** ```json { "error": "" } ``` ##### Model ```typescript { // TypeScript deleted: null // null indicates success } ``` ##### Examples **Curl** ``` bash curl -X DELETE "https://api.useapi.net/v1/kling/avatars/123456789012?email=user@example.com" \ -H "Authorization: Bearer ..." ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const avatarId = "123456789012"; const apiUrl = `https://api.useapi.net/v1/kling/avatars/${avatarId}?email=${email}`; const response = await fetch(apiUrl, { method: "DELETE", headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" avatarId = "123456789012" apiUrl = f"https://api.useapi.net/v1/kling/avatars/{avatarId}?email={email}" headers = { "Authorization" : f"Bearer {token}" } response = requests.delete(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/del-kling-elements-elementId === Document URL: https://useapi.net/docs/api-kling-v1/del-kling-elements-elementId --- layout: default title: DELETE elements/elementId description: "Delete a saved character or object element by ID via DELETE elements/elementId in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 428 --- ## Delete element January 12, 2026 --- This endpoint deletes a specific element by its ID. Use [GET /elements](/docs/api-kling-v1/get-kling-elements) to list your elements and get their IDs. > **https://api.useapi.net/v1/kling/elements/`elementId`?...** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Path Parameters - `elementId` is **required**, the element ID to delete. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. ##### Responses **200** **200 OK** ```json { "deleted": 1 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** ```json { "error": "" } ``` ##### Model ```typescript { // TypeScript deleted: number } ``` ##### Examples **Curl** ``` bash curl -X DELETE "https://api.useapi.net/v1/kling/elements/u_123456789012345?email=user@example.com" \ -H "Authorization: Bearer ..." ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const elementId = "u_123456789012345"; const apiUrl = `https://api.useapi.net/v1/kling/elements/${elementId}?email=${email}`; const response = await fetch(apiUrl, { method: "DELETE", headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" elementId = "u_123456789012345" apiUrl = f"https://api.useapi.net/v1/kling/elements/{elementId}?email={email}" headers = { "Authorization" : f"Bearer {token}" } response = requests.delete(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/del-kling-scheduler-task_id === Document URL: https://useapi.net/docs/api-kling-v1/del-kling-scheduler-task_id --- layout: default title: DELETE scheduler/`task_id` description: "Cancel API tracking for a running task via DELETE scheduler/task_id in the useapi.net Kling API v1 — Kling still executes it, but the API stops monitoring progress." parent: Kling API v1 nav_order: 520 --- ## Cancel a running task April 18, 2025 --- This endpoint cancels a running API task from being tracked by the scheduler. The task will still be executed by Kling, but the API will no longer track its progress. > **https://api.useapi.net/v1/kling/scheduler/`task_id`** The `task_id` value should be a numeric identifier of the task you want to cancel. You can get task IDs from [GET /scheduler](/docs/api-kling-v1/get-kling-scheduler). ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Responses **204** **204 No Content** Task was successfully canceled. **400** **400 Bad Request** ```json { "error": "Error ..." } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** ```json { "error": "Unable to locate running task_id 123456789" } ``` ##### Examples **Curl** ``` bash curl -X DELETE "https://api.useapi.net/v1/kling/scheduler/123456789" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const taskId = "123456789"; const apiUrl = `https://api.useapi.net/v1/kling/scheduler/${taskId}`; const response = await fetch(apiUrl, { method: "DELETE", headers: { "Authorization": `Bearer ${token}`, }, }); console.log("response", {status: response.status, statusText: response.statusText}); ``` **Python** ``` python import requests token = "API token" task_id = "123456789" apiUrl = f"https://api.useapi.net/v1/kling/scheduler/{task_id}" headers = { "Authorization" : f"Bearer {token}" } response = requests.delete(apiUrl, headers=headers) print(response.status_code, response.reason) ``` === URL: https://useapi.net/docs/api-kling-v1/del-kling-tasks-task_id === Document URL: https://useapi.net/docs/api-kling-v1/del-kling-tasks-task_id --- layout: default title: DELETE tasks/`task_id` description: "Permanently delete a Kling task and all its associated output works by task ID via DELETE tasks/task_id in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 307 --- ## Delete Kling Task October 7, 2025 --- This endpoint deletes a specific task and all its associated works (outputs) by task ID. Deleted tasks and works cannot be recovered. If the task has multiple works (e.g., multiple variations), all of them will be deleted. > **https://api.useapi.net/v1/kling/tasks/`task_id`?…** The `task_id` value should be a numeric identifier of the task you want to delete. ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. ##### Responses **200** **200 OK** ```json { "deleted": 1, "workIds": [987654321] } ``` The response indicates how many works were deleted and their IDs. **400** **400 Bad Request** ```json { "error": "Invalid task_id parameter" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Task was not found or has no associated works. ```json { "error": "No works found for task 123456789" } ``` ##### Model ```typescript { // TypeScript, all fields are optional deleted: number // Number of works deleted workIds: number[] // Array of deleted work IDs } ``` ##### Examples **Curl** ``` bash curl -X DELETE "https://api.useapi.net/v1/kling/tasks/123456789?email=user@example.com" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const taskId = "123456789"; const apiUrl = `https://api.useapi.net/v1/kling/tasks/${taskId}?email=${email}`; const response = await fetch(apiUrl, { method: "DELETE", headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" task_id = "123456789" apiUrl = f"https://api.useapi.net/v1/kling/tasks/{task_id}?email={email}" headers = { "Authorization" : f"Bearer {token}" } response = requests.delete(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-accounts-email === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-accounts-email --- layout: default title: GET accounts/`email` description: "Retrieve configuration and credit balance for a specific Kling account by email via GET accounts/email in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 120 --- ## Retrieve Kling API account configuration and balance for `email` April 18, 2025 (July 20, 2026) --- This endpoint retrieves the configuration and balance information for a specific Kling account. > **https://api.useapi.net/v1/kling/accounts/`email`** The `email` value should correspond to an account configured previously via a [POST /accounts](/docs/api-kling-v1/post-kling-accounts) request. ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Responses **200** **200 OK** ```json { "email": "user@example.com", "authMode": "password", "session": { "userId": "user12345", "ExpireTime": 123456789, "ExpireTimeUTC": "2025-01-01T12:13:14.000Z" }, "maxJobs": 5, "password": "…secured…", "balance": { "points": [ { "orderId": "123456789", "type": "plan", "amount": 66000, "balance": 56000, "startTime": 123456789, "endTime": 123456789 } ], "tickets": [], "nextApplyTime": 123456789, "total": 56000 } } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Account configuration not found. To create configuration use [POST /accounts](/docs/api-kling-v1/post-kling-accounts). ##### Model ```typescript { // TypeScript, all fields are optional email: string authMode: "password" | "passToken" session: { userId: string ExpireTime: number ExpireTimeUTC: string } maxJobs: number password: string balance: { points: Array<{ orderId: string type: string amount: number balance: number startTime: number endTime: number }> tickets: Array nextApplyTime: number total: number } } ``` ##### Examples **Curl** ``` bash curl https://api.useapi.net/v1/kling/accounts/ \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = `https://api.useapi.net/v1/kling/accounts/${email}`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = f"https://api.useapi.net/v1/kling/accounts/{email}" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-accounts === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-accounts --- layout: default title: GET accounts description: "List all Kling accounts in your useapi.net configuration, with automatic load balancing across multiple accounts, via GET accounts in the Kling API v1." parent: Kling API v1 nav_order: 100 --- ## Retrieve Kling API accounts configuration April 18, 2025 (July 20, 2026) --- For your convenience, you can specify your Kling configuration values under your Kling account. If you specify multiple Kling accounts, the API will automatically perform load balancing by randomly selecting an account with available capacity before making calls to Kling. This endpoint retrieves the complete list of configured API accounts for Kling. > **https://api.useapi.net/v1/kling/accounts** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Responses **200** **200 OK** ```json { "": { "email": "", "authMode": "password", "session": { "userId": "user12345", "ExpireTime": 123456789, "ExpireTimeUTC": "2025-01-01T12:13:14.000Z" }, "maxJobs": 8, "password": "…secured…" }, "": { "email": "", "authMode": "passToken", "session": { "userId": "user67890", "ExpireTime": 123456789, "ExpireTimeUTC": "2025-01-01T12:13:14.000Z" }, "maxJobs": 3, "password": "…secured…" } } ``` `authMode` is `password` for accounts added with email + password, or `passToken` for accounts connected from the browser (see [Setup Kling](/docs/start-here/setup-kling)). The `passToken`, `did`, and password values are never returned. **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Configuration not found. To create configuration use [POST /accounts](/docs/api-kling-v1/post-kling-accounts). ##### Model ```typescript { // TypeScript, all fields are optional [email: string]: { email: string authMode: "password" | "passToken" session: { userId: string ExpireTime: number ExpireTimeUTC: string } maxJobs: number password: string } } ``` ##### Examples **Curl** ``` bash curl https://api.useapi.net/v1/kling/accounts \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const apiUrl = "https://api.useapi.net/v1/kling/accounts"; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" apiUrl = "https://api.useapi.net/v1/kling/accounts" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-assets-download === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-assets-download --- layout: default title: GET assets/download description: "Download watermark-free assets from a paid Kling account by work ID via GET assets/download in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 205 --- ## Download Kling assets without watermarks April 18, 2025 (June 27, 2025) --- This endpoint allows you to download assets from your *paid* Kling account without watermarks by providing the work IDs. > **https://api.useapi.net/v1/kling/assets/download?…** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `workIds` is **required**, specify the IDs of works to download. Can be a single numeric string or a comma-separated list of numeric strings (e.g., "123456789" or "123456789,987654321"). These IDs can be obtained from the `workId` field in the `works` array returned by the [GET /assets](/docs/api-kling-v1/get-kling-assets), [GET /tasks](/docs/api-kling-v1/get-kling-tasks) or [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id) endpoint. - `fileTypes` is optional, specify comma-separated file types you want to download (e.g., "MP4" or "MP4,WAV"). If not provided, all available files for the given workIds will be downloaded as a singe .zip file. Supported file types: `MP4`, `MP3`, `WAV`, `PNG`. **Note:** If a single `workId` is provided with a single `fileTypes` value, the cdnUrl will point to an actual asset file. If multiple `workIds` are provided or `fileTypes` is omitted or has multiple values, the cdnUrl will point to a .zip file containing all requested assets/files. ##### Responses **200** **200 OK** ```json { "cdnUrl": "https://kling.klingai.com/.../download_result.zip", "status": "success" } ``` **400** **400 Bad Request** ```json { "error": "Invalid parameters" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript cdnUrl: string // URL to download the asset(s), .zip for multiple workIds status: string // "success" when successful } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/assets/download?email=user@example.com&workIds=123456789,987654321" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const workIds = "123456789,987654321"; const apiUrl = `https://api.useapi.net/v1/kling/assets/download?email=${email}&workIds=${workIds}`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" workIds = "123456789,987654321" apiUrl = f"https://api.useapi.net/v1/kling/assets/download?email={email}&workIds={workIds}" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-assets-uploaded === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-assets-uploaded --- layout: default title: GET assets/uploaded description: "List assets you uploaded to your Kling account (distinct from generated outputs) via GET assets/uploaded in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 201 --- ## Retrieve uploaded Kling assets August 8, 2025 (May 6, 2026) --- This endpoint retrieves assets that you have uploaded to your Kling account, as opposed to generated assets. > **https://api.useapi.net/v1/kling/assets/uploaded/?…** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `pageNum` is optional, specify the page number to retrieve. Default `1`. - `pageSize` is optional, specify the number of items per page. Default `20`. - `contentType` is optional, type of content to retrieve. Supported values: `video`, `image`, or `audio`. - `fileName` is optional, filter by file name (keyword search). - `sort` is optional, sort direction by upload time. Supported values: `asc`, `desc`. Default `desc`. ##### Responses **200** **200 OK** ```json { "uploadAssetsList": [ { "id": "1234567890", "name": "abcdef12345.mp4", "userId": 12345, "contentType": "video", "resource": { "resource": "https://v15-kling.klingai.com/….mp4", "height": 1080, "width": 720, "duration": 9040, "resourceKey": "" }, "cover": { "resource": "https://v15-kling.klingai.com/…", "height": 1080, "width": 720, "duration": 0, "resourceKey": "" }, "createTime": 1754630473303, "updateTime": 1754630473303, "favored": false, "extraInfo": "{}", "entrance": "" }, { "id": "1234567890", "name": "abcdef12345.mp4", "userId": 12345, "contentType": "image", "resource": { "resource": "https://v15-kling.klingai.com/…", "height": 1080, "width": 720, "duration": 0, "resourceKey": "" }, "cover": { "resource": "", "height": 1, "width": 1, "duration": 0, "resourceKey": "" }, "createTime": 1754627757354, "updateTime": 1754627757354, "favored": false, "extraInfo": "{}", "entrance": "" } ] } ``` **400** **400 Bad Request** ```json { "error": "Invalid parameters" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript, all fields are optional uploadAssetsList: { id: string // Unique asset identifier name: string // Generated unique filename userId: number // User ID who uploaded the asset contentType: string // "video", "image", or "audio" resource: { resource: string // URL of the uploaded asset height: number // Height in pixels width: number // Width in pixels duration: number // Duration in milliseconds (0 for images) resourceKey: string // Resource key (usually empty) } cover: { resource: string // URL of cover image (empty for images) height: number // Cover height (1 for images without cover) width: number // Cover width (1 for images without cover) duration: number // Cover duration (always 0) resourceKey: string // Cover resource key (usually empty) } createTime: number // Upload timestamp updateTime: number // Last update timestamp favored: boolean // Whether asset is favorited extraInfo: string // Extra information as JSON string entrance: string // Entry point (usually empty) }[] } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/assets/uploaded/?contentType=image" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const apiUrl = `https://api.useapi.net/v1/kling/assets/uploaded/?contentType=image`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" apiUrl = f"https://api.useapi.net/v1/kling/assets/uploaded/?contentType=image" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-assets === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-assets --- layout: default title: GET assets description: "List generated assets (videos, images) from your Kling account via GET assets in the useapi.net Kling API v1 — pagination and filtering supported." parent: Kling API v1 nav_order: 200 --- ## Retrieve Kling assets April 18, 2025 (May 6, 2026) --- This endpoint retrieves generated assets from your Kling account. > **https://api.useapi.net/v1/kling/assets/?…** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `pageNum` is optional, specify the page number to retrieve. Default `1`. - `pageSize` is optional, specify the number of items per page. Default `40`. - `contentType` is optional, type of content to retrieve. Supported values: `video`, `image`, or `audio`. - `sort` is optional, sort direction by creation time. Supported values: `asc`, `desc`. Default `desc`. ##### Responses **200** **200 OK** ```json { "limitations": [ { "type": "mmu_txt2img_aiweb", "remaining": 10000, "limit": 10000 }, { "type": "m2v_txt2video_hq", "remaining": 10000, "limit": 10000 }, { "type": "m2v_img2video_hq", "remaining": 10000, "limit": 10000 } ], "history": [ { "works": [ { "workId": 123456789, "workItemId": 0, "taskId": 123456789, "userId": 12345, "type": "m2v_img2video_hq", "status": 99, "contentType": "video", "resource": { "resource": "https://s21-kling.klingai.com/....mp4", "height": 1268, "width": 724, "duration": 5041, "resourceKey": "" }, "cover": { "resource": "https://s21-kling.klingai.com/....jpg", "height": 1268, "width": 724, "duration": 0, "resourceKey": "" }, "starNum": 0, "cloneCount": 0, "reportNum": 0, "createTime": 1744858514515, "taskInfo": { "type": "m2v_img2video_hq", "inputs": [ { "name": "input", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://s21-kling.klingai.com/....jpg", "cover": null, "fromWorkId": null, "fromUploadId": null } ], "arguments": [ { "name": "prompt", "value": "A person dancing" }, { "name": "negative_prompt", "value": "" }, { "name": "duration", "value": "5" }, { "name": "kling_version", "value": "2.0" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "selfAttitude": "unknown", "selfComment": { "rate": 0, "tags": [], "content": "", "prompts": [] }, "favored": false, "starred": false, "publishStatus": "unpublished", "deleted": false, "publishTime": 0, "submitTime": 1744858514515, "lipSyncStatus": 99, "downloadInfo": { "fileTypes": [ { "type": "MP4", "watermark": true } ] }, "allowPublish": true } ], "task": { "id": 123456789, "userId": 12345, "type": "m2v_img2video_hq", "scene": "NORMAL_CREATION", "status": 99, "taskInfo": { "type": "m2v_img2video_hq", "inputs": [ { "name": "input", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://s21-kling.klingai.com/....jpg", "cover": null, "fromWorkId": null, "fromUploadId": null } ], "arguments": [ { "name": "prompt", "value": "A person dancing" }, { "name": "negative_prompt", "value": "" }, { "name": "duration", "value": "5" }, { "name": "kling_version", "value": "2.0" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": true, "createTime": 1744858514499, "updateTime": 1744858823172, "viewTime": 1744916388016 }, "etaTime": 0, "etaTimeOverSla": false, "queuingEtaTime": 0, "originEtaTime": 0, "originQueuingEtaTime": 0, "currentTimestamp": 1744955215247 } ], "userPoints": { "points": [ { "orderId": "123456789", "type": "plan", "amount": 300000, "balance": 190500, "startTime": 1744081611119, "endTime": 1746760011119 } ], "total": 190500 }, "userTickets": { "ticket": [ { "orderId": "123456789", "type": "priority", "packageType": "reward", "amount": 1, "balance": 1, "startTime": 1744046060883, "endTime": 1746724460883 }, { "orderId": "123456789", "type": "extend", "packageType": "reward", "amount": 2, "balance": 2, "startTime": 1744046060883, "endTime": 1746724460883 }, { "orderId": "123456789", "type": "hq_5s", "packageType": "reward", "amount": 3, "balance": 3, "startTime": 1744046060883, "endTime": 1746724460883 } ] } } ``` **400** **400 Bad Request** ```json { "error": "Invalid parameters" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model To download assets without watermarks, use the [GET /assets/download](/docs/api-kling-v1/get-kling-assets-download) endpoint with the workId values found in the `works` array of the response. ```typescript { // TypeScript, all fields are optional limitations: { type: string remaining: number limit: number }[] history: { works: { workId: number workItemId: number taskId: number userId: number type: string status: number contentType: string resource: { resource: string height: number width: number duration: number resourceKey: string } cover: { resource: string height: number width: number duration: number resourceKey: string } starNum: number cloneCount: number reportNum: number createTime: number taskInfo: { type: string inputs: { name: string inputType: string token: string | null blobStorage: string | null url: string cover: string | null fromWorkId: number | null fromUploadId: number | null }[] arguments: { name: string value: string }[] extraArgs: Record callbackPayloads: any[] scene: string } selfAttitude: string selfComment: { rate: number tags: any[] content: string prompts: any[] } favored: boolean starred: boolean publishStatus: string deleted: boolean publishTime: number submitTime: number lipSyncStatus: number downloadInfo: { fileTypes: { type: string watermark: boolean }[] } allowPublish: boolean }[] task: { id: number userId: number type: string scene: string status: number taskInfo: { type: string inputs: { name: string inputType: string token: string | null blobStorage: string | null url: string cover: string | null fromWorkId: number | null fromUploadId: number | null }[] arguments: { name: string value: string }[] extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } etaTime: number etaTimeOverSla: boolean queuingEtaTime: number originEtaTime: number originQueuingEtaTime: number currentTimestamp: number }[] userPoints: { points: { orderId: string type: string amount: number balance: number startTime: number endTime: number }[] total: number } userTickets: { ticket: { orderId: string type: string packageType: string amount: number balance: number startTime: number endTime: number }[] } } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/assets/?email=user@example.com" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = `https://api.useapi.net/v1/kling/assets/?email=${email}`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = f"https://api.useapi.net/v1/kling/assets/?email={email}" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-avatars === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-avatars --- layout: default title: GET avatars description: "List personal or system-template Kling avatars available for lip-sync video generation via GET avatars in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 450 --- ## List avatars January 12, 2026 --- This endpoint retrieves a list of avatars. You can list either your personal saved avatars or browse system-provided templates. Avatars are digital characters that can be animated with lip-sync using [POST /avatars/video](/docs/api-kling-v1/post-kling-avatars-video). > **https://api.useapi.net/v1/kling/avatars/?...** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `type` is optional, the type of avatars to list. Supported values: `personal` (default), `templates`. - `personal`: Your saved avatars created via [POST /avatars](/docs/api-kling-v1/post-kling-avatars) - `templates`: System-provided avatar templates ##### Responses **200** **200 OK** **Personal avatars response (type=personal):** ```json [ { "id": "123456789012", "nickname": "My Fashion Avatar", "prompt": "Elegant woman in professional attire", "scene": "advertising_marketing", "imageResources": [ { "url": "https://s21-kling.klingai.com/ai-platform/.../avatar.jpg", "sourceFrom": 2 } ], "ttsSpeaker": "speaker_id_123", "ttsSpeed": "1", "ttsEmotionKey": "neutral", "createTime": 1736640000000, "updateTime": 1736640000000 } ] ``` **Templates response (type=templates):** ```json [ { "id": "12345", "name": "Business Woman", "imageResources": [ { "url": "https://s21-kling.klingai.com/ai-platform/.../template.jpg" } ], "prompt": "Professional businesswoman in formal attire" } ] ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript Array<{ id: string nickname?: string name?: string prompt: string scene?: string imageResources: { url: string sourceFrom?: number }[] ttsSpeaker?: string ttsSpeed?: string ttsEmotionKey?: string createTime?: number updateTime?: number }> ``` ##### Avatar ID Format - **Personal avatars** have long IDs (more than 8 digits), e.g., `123456789012` - **Template avatars** have short IDs (8 digits or fewer), e.g., `12345` This distinction is used internally when generating avatar videos. ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/avatars/?email=user@example.com&type=personal" \ -H "Accept: application/json" \ -H "Authorization: Bearer ..." ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = `https://api.useapi.net/v1/kling/avatars/?email=${email}&type=personal`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = f"https://api.useapi.net/v1/kling/avatars/?email={email}&type=personal" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-elements-elementId === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-elements-elementId --- layout: default title: GET elements/elementId description: "Retrieve details for a saved character or object element by ID via GET elements/elementId in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 424 --- ## Retrieve element by ID January 12, 2026 (February 9, 2026) --- This endpoint retrieves details for a specific element by its ID. Use [GET /elements](/docs/api-kling-v1/get-kling-elements) to list all your elements and get their IDs. > **https://api.useapi.net/v1/kling/elements/`elementId`?...** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Path Parameters - `elementId` is **required**, the element ID to retrieve. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. ##### Responses **200** **200 OK** ```json { "id": "u_123456789012345", "name": "FashionLady ABC12", "userId": 12345678, "type": "IMAGE", "description": "Elegant woman in red dress", "cover": { "resource": "https://s21-kling.klingai.com/ai-platform/.../cover.jpg", "width": 768, "height": 1365, "resourceKey": "cover", "cover": true, "slotKey": "" }, "resources": [ { "resource": ".../cover.jpg", "resourceKey": "cover", "cover": true, "slotKey": "" }, { "resource": ".../side.png", "resourceKey": "secondary", "cover": false, "slotKey": "side" }, { "resource": ".../back.png", "resourceKey": "secondary", "cover": false, "slotKey": "back" }, { "resource": ".../top.png", "resourceKey": "secondary", "cover": false, "slotKey": "topView" } ], "tagList": [], "favored": false, "official": false, "createTime": 1736640000000, "updateTime": 1736640000000 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** ```json { "error": "" } ``` ##### Model ```typescript { // TypeScript, all fields are optional id: string name: string userId: number type: 'IMAGE' | 'VIDEO' description: string cover: { resource: string width: number height: number resourceKey: 'cover' | 'secondary' | 'video' cover: boolean slotKey: string } resources: { resource: string width: number height: number resourceKey: 'cover' | 'secondary' | 'video' cover: boolean slotKey: string voice: { id: number name: string official: boolean resource: object } }[] tagList: object[] voice: { id: number name: string official: boolean resource: object } currentVersion: number createTime: number updateTime: number favored: boolean official: boolean } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/elements/u_123456789012345?email=user@example.com" \ -H "Accept: application/json" \ -H "Authorization: Bearer ..." ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const elementId = "u_123456789012345"; const apiUrl = `https://api.useapi.net/v1/kling/elements/${elementId}?email=${email}`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" elementId = "u_123456789012345" apiUrl = f"https://api.useapi.net/v1/kling/elements/{elementId}?email={email}" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-elements-tags === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-elements-tags --- layout: default title: GET elements/tags description: "Retrieve available category tags for organizing and filtering elements via GET elements/tags in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 420 --- ## Retrieve available element tags January 12, 2026 --- This endpoint retrieves available element category tags. Tags are used to categorize elements when creating them via [POST /elements](/docs/api-kling-v1/post-kling-elements) and for filtering when listing elements via [GET /elements](/docs/api-kling-v1/get-kling-elements). > **https://api.useapi.net/v1/kling/elements/tags/?...** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. ##### Responses **200** **200 OK** ```json { "tagList": [ { "id": "o_102", "tagKey": "character", "name": "Characters", "official": true, "type": "element" }, { "id": "o_103", "tagKey": "animal", "name": "Animals", "official": true, "type": "element" }, { "id": "o_104", "tagKey": "prop", "name": "Items", "official": true, "type": "element" }, { "id": "o_105", "tagKey": "costume", "name": "Costumes", "official": true, "type": "element" }, { "id": "o_106", "tagKey": "scene", "name": "Scenes", "official": true, "type": "element" }, { "id": "o_107", "tagKey": "effect", "name": "Effects", "official": true, "type": "element" }, { "id": "o_108", "tagKey": "others", "name": "Others", "official": true, "type": "element" } ] } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript, all fields are optional tagList: { id: string tagKey: string name: string official: boolean type: string }[] } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/elements/tags/?email=user@example.com" \ -H "Accept: application/json" \ -H "Authorization: Bearer ..." ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = `https://api.useapi.net/v1/kling/elements/tags/?email=${email}`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = f"https://api.useapi.net/v1/kling/elements/tags/?email={email}" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-elements-voices === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-elements-voices --- layout: default title: GET elements/voices description: "List official voices assignable to character-tagged elements via GET elements/voices in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 422 --- ## Retrieve available element voices February 9, 2026 --- This endpoint retrieves available official voices for elements. Voices can be assigned to elements when creating them via [POST /elements](/docs/api-kling-v1/post-kling-elements). Only elements with the `character` tag support voice assignment. > **https://api.useapi.net/v1/kling/elements/voices/?...** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. ##### Responses **200** **200 OK** ```json { "voices": [ { "id": 1, "name": "Vivid Girl" }, { "id": 2, "name": "Gentle Lady" }, { "id": 3, "name": "Charming Uncle" } ] } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript, all fields are optional voices: { id: number name: string }[] } ``` Use the `id` or `name` value in the `voice` parameter when creating VIDEO elements via [POST /elements](/docs/api-kling-v1/post-kling-elements). ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/elements/voices/?email=user@example.com" \ -H "Accept: application/json" \ -H "Authorization: Bearer ..." ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = `https://api.useapi.net/v1/kling/elements/voices/?email=${email}`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = f"https://api.useapi.net/v1/kling/elements/voices/?email={email}" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-elements === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-elements --- layout: default title: GET elements description: "List saved character and object elements reusable across Omni image and video generations via GET elements in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 422 --- ## List elements January 12, 2026 (February 9, 2026) --- This endpoint retrieves a list of your custom elements. Elements are saved character/object references that can be reused across multiple generations in [POST /images/omni](/docs/api-kling-v1/post-kling-images-omni) and [POST /videos/omni](/docs/api-kling-v1/post-kling-videos-omni) using the `@element_N` syntax. > **https://api.useapi.net/v1/kling/elements/?...** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `pageNum` is optional, the page number to retrieve. Default: `1`. Must be `1` or greater. - `pageSize` is optional, the number of elements per page. Range: `1` to `100`. Default: `50`. - `tag` is optional, filter elements by tag. Use [GET /elements/tags](/docs/api-kling-v1/get-kling-elements-tags) to get available tags. - `official` is optional, filter to show only official/system elements. Default: `false`. - `favored` is optional, filter to show only favored elements. Default: `false`. - `sortDirection` is optional, sort order for results. Supported values: `ASC`, `DESC` (default). ##### Responses **200** **200 OK** ```json { "elementsList": [ { "id": "u_123456789012345", "name": "FashionLady ABC12", "userId": 12345678, "type": "IMAGE", "description": "Elegant woman in red dress", "cover": { "resource": "https://s21-kling.klingai.com/ai-platform/.../cover.jpg", "width": 768, "height": 1365, "resourceKey": "cover", "cover": true, "slotKey": "" }, "resources": [ { "resource": ".../cover.jpg", "resourceKey": "cover", "cover": true, "slotKey": "" }, { "resource": ".../side.png", "resourceKey": "secondary", "slotKey": "side" } ], "tagList": [], "favored": false, "official": false, "createTime": 1736640000000, "updateTime": 1736640000000 } ], "pageNum": 1, "pageSize": 50, "total": 3 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript, all fields are optional elementsList: { id: string name: string userId: number type: 'IMAGE' | 'VIDEO' description: string cover: { resource: string width: number height: number resourceKey: 'cover' | 'secondary' | 'video' cover: boolean slotKey: string } resources: { resource: string width: number height: number resourceKey: 'cover' | 'secondary' | 'video' cover: boolean slotKey: string voice: { id: number name: string official: boolean resource: object } }[] tagList: object[] voice: { id: number name: string official: boolean resource: object } currentVersion: number createTime: number updateTime: number favored: boolean official: boolean }[] pageNum: number pageSize: number total: number } ``` ##### Usage in Omni Endpoints Once you have element IDs, you can reference them in [POST /images/omni](/docs/api-kling-v1/post-kling-images-omni) and [POST /videos/omni](/docs/api-kling-v1/post-kling-videos-omni): ```json { "prompt": "Character @element_1 walking through a beautiful garden", "element_1": "u_123456789012345" } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/elements/?email=user@example.com&pageSize=10" \ -H "Accept: application/json" \ -H "Authorization: Bearer ..." ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = `https://api.useapi.net/v1/kling/elements/?email=${email}&pageSize=10`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = f"https://api.useapi.net/v1/kling/elements/?email={email}&pageSize=10" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-scheduler-available === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-scheduler-available --- layout: default title: GET scheduler/available description: "Retrieve available generation capacity and running task counts via GET scheduler/available in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 510 --- ## Retrieve available capacity April 18, 2025 --- This endpoint retrieves information about available capacity and currently running API tasks. > **https://api.useapi.net/v1/kling/scheduler/available** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Responses **200** **200 OK** ```json { "executing": [ { "id": 123456789, "email": "user1@example.com", "started": "2025-04-18T12:34:56.789Z", "elapsed": "03:45", "replyUrl": "https://example.com/webhook", "replyRef": "reference-id" } ], "available": [ { "email": "user1@example.com", "maxJobs": 5, "executing": 1, "available": 4 }, { "email": "user2@example.com", "maxJobs": 3, "executing": 0, "available": 3 } ] } ``` **400** **400 Bad Request** ```json { "error": "Error ..." } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript, all fields are optional executing: { id: number // Task ID email: string // Account email started: string // ISO timestamp of when the task started elapsed: string // Elapsed time in MM:SS format replyUrl: string // Webhook URL to notify when the task completes replyRef: string // Reference ID for the webhook }[] available: { email: string // Kling account email maxJobs: number // Maximum number of concurrent jobs configured executing: number // Number of jobs currently executing available: number // Number of available job slots }[] } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/scheduler/available" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const apiUrl = "https://api.useapi.net/v1/kling/scheduler/available"; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" apiUrl = "https://api.useapi.net/v1/kling/scheduler/available" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-scheduler === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-scheduler --- layout: default title: GET scheduler description: "Check which API tasks are currently running via GET scheduler in the useapi.net Kling API v1 — useful for monitoring active Kling generation jobs." parent: Kling API v1 nav_order: 500 --- ## Retrieve running tasks April 18, 2025 --- This endpoint retrieves information about currently running API tasks. > **https://api.useapi.net/v1/kling/scheduler** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Responses **200** **200 OK** ```json [ { "id": 123456789, "email": "user@example.com", "started": "2025-04-18T12:34:56.789Z", "elapsed": "03:45", "replyUrl": "https://example.com/webhook", "replyRef": "reference-id" }, { "id": 987654321, "email": "user@example.com", "started": "2025-04-18T12:45:67.890Z", "elapsed": "02:34", "replyUrl": "https://example.com/webhook", "replyRef": "reference-id-2" } ] ``` **400** **400 Bad Request** ```json { "error": "Error ..." } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript, all fields are optional id: number // Task ID email: string // Account email started: string // ISO timestamp of when the task started elapsed: string // Elapsed time in MM:SS format replyUrl: string // Webhook URL to notify when the task completes replyRef: string // Reference ID for the webhook }[] ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/scheduler" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const apiUrl = "https://api.useapi.net/v1/kling/scheduler"; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" apiUrl = "https://api.useapi.net/v1/kling/scheduler" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-tasks-task_id === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-tasks-task_id --- layout: default title: GET tasks/`task_id` description: "Poll the status and output of a specific Kling task by task ID via GET tasks/task_id in the useapi.net Kling API v1 — response schema and status values documented." parent: Kling API v1 nav_order: 305 --- ## Retrieve specific Kling task April 18, 2025 (December 10, 2025) --- This endpoint retrieves information about a specific task by its ID. > **https://api.useapi.net/v1/kling/tasks/`task_id`?…** The `task_id` value should be a numeric identifier of the task you want to retrieve. ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. ##### Responses **200** **200 OK** ```json { "status": 99, "status_name": "succeed", "status_final": true, "etaTime": 0, "etaTimeOverSla": false, "queuingEtaTime": 0, "originEtaTime": 0, "originQueuingEtaTime": 0, "message": "success", "task": { "id": 123456789, "userId": 12345, "type": "m2v_img2video_hq", "scene": "NORMAL_CREATION", "status": 99, "status_name": "succeed", "status_final": true, "taskInfo": { "type": "m2v_img2video_hq", "inputs": [ { "name": "input", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://s21-kling.klingai.com/....jpg", "cover": null, "fromWorkId": null } ], "arguments": [ { "name": "prompt", "value": "A person dancing" }, { "name": "negative_prompt", "value": "" }, { "name": "duration", "value": "5" }, { "name": "kling_version", "value": "2.0" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": true, "createTime": 1744858514499, "updateTime": 1744858823172, "viewTime": 1744916388016 }, "works": [ { "workId": 123456789, "workItemId": 0, "taskId": 123456789, "userId": 12345, "type": "m2v_img2video_hq", "status": 99, "status_name": "succeed", "status_final": true, "contentType": "video", "resource": { "resource": "https://s21-kling.klingai.com/....mp4", "height": 1268, "width": 724, "duration": 5041, "resourceKey": "" }, "cover": { "resource": "https://s21-kling.klingai.com/....jpg", "height": 1268, "width": 724, "duration": 0, "resourceKey": "" }, "starNum": 0, "cloneCount": 0, "reportNum": 0, "createTime": 1744858514515, "taskInfo": { "type": "m2v_img2video_hq", "inputs": [ { "name": "input", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://s21-kling.klingai.com/....jpg", "cover": null, "fromWorkId": null, "fromUploadId": null } ], "arguments": [ { "name": "prompt", "value": "A person dancing" }, { "name": "negative_prompt", "value": "" }, { "name": "duration", "value": "5" }, { "name": "kling_version", "value": "2.0" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "selfAttitude": "unknown", "selfComment": { "rate": 0, "tags": [], "content": "", "prompts": [] }, "favored": false, "starred": false, "publishStatus": "unpublished", "deleted": false, "publishTime": 0, "submitTime": 1744858514515, "lipSyncStatus": 99, "downloadInfo": { "fileTypes": [ { "type": "MP4", "watermark": true } ] }, "allowPublish": true } ], "currentTimestamp": 1744955215247 } ``` **400** **400 Bad Request** ```json { "error": "Invalid task_id parameter" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Task was either deleted or failed due to moderation, or your account did not have enough credits. Check your KLING account balance [GET accounts/`email`](/docs/api-kling-v1/get-kling-accounts-email) ```json { "error": "Sorry, the requested resource was not found (VALID.ResourceNotFound)", "message": "Not Found" } ``` ##### Model List of known `status` values: | status | status_name | status_final | Notes | |--------|-------------|---------------|------------------------------------------------| | 5 | submitted | false | | | 6 | failed | true | Change the input prompt and try again | | 7 | failed | true | The input prompt contains sensitive words | | 9 | failed | true | Change the input prompt and try again | | 10 | processing | false | | | 50 | failed | true | Change the input prompt and try again | | 53 | failed | true | Your account does not support this feature | | 54 | failed | true | The queue for the free plan is busy now | | 58 | failed | true | The queue for your plan is busy now. Wait until running tasks are completed and retry, or upgrade your plan. | | 99 | succeed | true | | Calculate estimated time left in milliseconds as `etaTime - currentTimestamp`. When the task is complete, `etaTime` will be `0`. To download assets without watermarks, use the [GET /assets/download](/docs/api-kling-v1/get-kling-assets-download) endpoint with the workId values found in the `works` array of the response. ```typescript { // TypeScript, all fields are optional status: number status_name: string status_final: boolean etaTime: number etaTimeOverSla: boolean queuingEtaTime: number originEtaTime: number originQueuingEtaTime: number message: string task: { id: number userId: number type: string scene: string status: number status_name: string status_final: boolean taskInfo: { type: string inputs: { name: string inputType: string token: string | null blobStorage: string | null url: string cover: string | null fromWorkId: number | null }[] arguments: { name: string value: string }[] extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } works: { workId: number workItemId: number taskId: number userId: number type: string status: number status_name: string status_final: boolean contentType: string resource: { resource: string height: number width: number duration: number resourceKey: string } cover: { resource: string height: number width: number duration: number resourceKey: string } starNum: number cloneCount: number reportNum: number createTime: number taskInfo: { type: string inputs: { name: string inputType: string token: string | null blobStorage: string | null url: string cover: string | null fromWorkId: number | null fromUploadId: number | null }[] arguments: { name: string value: string }[] extraArgs: Record callbackPayloads: any[] scene: string } selfAttitude: string selfComment: { rate: number tags: any[] content: string prompts: any[] } favored: boolean starred: boolean publishStatus: string deleted: boolean publishTime: number submitTime: number lipSyncStatus: number downloadInfo: { fileTypes: { type: string watermark: boolean }[] } allowPublish: boolean }[] currentTimestamp: number } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/tasks/123456789?email=user@example.com" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const taskId = "123456789"; const apiUrl = `https://api.useapi.net/v1/kling/tasks/${taskId}?email=${email}`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" task_id = "123456789" apiUrl = f"https://api.useapi.net/v1/kling/tasks/{task_id}?email={email}" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-tasks === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-tasks --- layout: default title: GET tasks description: "List Kling tasks (images, videos, and other generations) from your account via GET tasks in the useapi.net Kling API v1, with pagination and type filtering." parent: Kling API v1 nav_order: 300 --- ## Retrieve Kling tasks April 18, 2025 --- This endpoint retrieves a list of tasks from your Kling account. > **https://api.useapi.net/v1/kling/tasks/?…** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `contentType` is optional, filter tasks by content type. Supported values: `video`, `image`, or `audio`. - `pageSize` is optional, specify the number of tasks to return. - `createdBefore` is optional, timestamp (in milliseconds) to get tasks created before this time. Cannot be used with `createdAfter`. - `createdAfter` is optional, timestamp (in milliseconds) to get tasks created after this time. Cannot be used with `createdBefore`. ##### Responses **200** **200 OK** ```json { "history": [ { "works": [ { "workId": 123456789, "workItemId": 0, "taskId": 123456789, "userId": 12345, "type": "m2v_img2video_hq", "status": 99, "status_name": "succeed", "status_final": true "contentType": "video", "resource": { "resource": "https://s21-kling.klingai.com/....mp4", "height": 1268, "width": 724, "duration": 5041, "resourceKey": "" }, "cover": { "resource": "https://s21-kling.klingai.com/....jpg", "height": 1268, "width": 724, "duration": 0, "resourceKey": "" }, "starNum": 0, "cloneCount": 0, "reportNum": 0, "createTime": 1744858514515, "taskInfo": { "type": "m2v_img2video_hq", "inputs": [ { "name": "input", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://s21-kling.klingai.com/....jpg", "cover": null, "fromWorkId": null, "fromUploadId": null } ], "arguments": [ { "name": "prompt", "value": "A person dancing" }, { "name": "negative_prompt", "value": "" }, { "name": "duration", "value": "5" }, { "name": "kling_version", "value": "2.0" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "selfAttitude": "unknown", "selfComment": { "rate": 0, "tags": [], "content": "", "prompts": [] }, "favored": false, "starred": false, "publishStatus": "unpublished", "deleted": false, "publishTime": 0, "submitTime": 1744858514515, "lipSyncStatus": 99, "downloadInfo": { "fileTypes": [ { "type": "MP4", "watermark": true } ] }, "allowPublish": true } ], "task": { "id": 123456789, "userId": 12345, "type": "m2v_img2video_hq", "scene": "NORMAL_CREATION", "status": 99, "status_name": "succeed", "status_final": true "taskInfo": { "type": "m2v_img2video_hq", "inputs": [ { "name": "input", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://s21-kling.klingai.com/....jpg", "cover": null, "fromWorkId": null, "fromUploadId": null } ], "arguments": [ { "name": "prompt", "value": "A person dancing" }, { "name": "negative_prompt", "value": "" }, { "name": "duration", "value": "5" }, { "name": "kling_version", "value": "2.0" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": true, "createTime": 1744858514499, "updateTime": 1744858823172, "viewTime": 1744916388016 }, "etaTime": 0, "etaTimeOverSla": false, "queuingEtaTime": 0, "originEtaTime": 0, "originQueuingEtaTime": 0, "currentTimestamp": 1744955215247 } ], "userPoints": { "total": 190500 }, "userTickets": { "ticket": [ { "orderId": "123456789", "type": "priority", "packageType": "reward", "amount": 1, "balance": 1, "startTime": 1744046060883, "endTime": 1746724460883 } ] } } ``` **400** **400 Bad Request** ```json { "error": "createdAfter and createdBefore cannot be used together" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model List of known `status` values: | status | status_name | status_final | Notes | |--------|-------------|---------------|------------------------------------------------| | 5 | submitted | false | | | 6 | failed | true | Change the input prompt and try again | | 7 | failed | true | The input prompt contains sensitive words | | 9 | failed | true | Change the input prompt and try again | | 10 | processing | false | | | 50 | failed | true | Change the input prompt and try again | | 53 | failed | true | Your account does not support this feature | | 54 | failed | true | The queue for the free plan is busy now | | 58 | failed | true | The queue for your plan is busy now. Wait until running tasks are completed and retry, or upgrade your plan. | | 99 | succeed | true | | To download assets without watermarks, use the [GET /assets/download](/docs/api-kling-v1/get-kling-assets-download) endpoint with the workId values found in the `works` array of the response. ```typescript { // TypeScript, all fields are optional history: { works: { workId: number workItemId: number taskId: number userId: number type: string status: number status_name: string status_final: boolean contentType: string resource: { resource: string height: number width: number duration: number resourceKey: string } cover: { resource: string height: number width: number duration: number resourceKey: string } starNum: number cloneCount: number reportNum: number createTime: number taskInfo: { type: string inputs: { name: string inputType: string token: string | null blobStorage: string | null url: string cover: string | null fromWorkId: number | null fromUploadId: number | null }[] arguments: { name: string value: string }[] extraArgs: Record callbackPayloads: any[] scene: string } selfAttitude: string selfComment: { rate: number tags: any[] content: string prompts: any[] } favored: boolean starred: boolean publishStatus: string deleted: boolean publishTime: number submitTime: number lipSyncStatus: number downloadInfo: { fileTypes: { type: string watermark: boolean }[] } allowPublish: boolean }[] task: { id: number userId: number type: string scene: string status: number status_name: string status_final: boolean taskInfo: { type: string inputs: { name: string inputType: string token: string | null blobStorage: string | null url: string cover: string | null fromWorkId: number | null fromUploadId: number | null }[] arguments: { name: string value: string }[] extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } etaTime: number etaTimeOverSla: boolean queuingEtaTime: number originEtaTime: number originQueuingEtaTime: number currentTimestamp: number }[] userPoints: { total: number } userTickets: { ticket: { orderId: string type: string packageType: string amount: number balance: number startTime: number endTime: number }[] } } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/tasks/?email=user@example.com" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = `https://api.useapi.net/v1/kling/tasks/?email=${email}`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = f"https://api.useapi.net/v1/kling/tasks/?email={email}" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-tts-voices === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-tts-voices --- layout: default title: GET tts/voices description: "List available Kling text-to-speech voices for use with POST tts/create via GET tts/voices in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 470 --- ## Retrieve available TTS voices April 18, 2025 --- This endpoint retrieves a list of available text-to-speech voices from Kling. > **https://api.useapi.net/v1/kling/tts/voices?…** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. ##### Responses **200** **200 OK** ```json { "ttsList": [ { "name": "Voice Name 1", "speakerId": "voice_id_1", "exampleUrl": "https://s21-kling.klingai.com/....mp3", "new": false, "emotions": [ { "name": "Happy", "key": "happy", "enable": true }, { "name": "Sad", "key": "sad", "enable": true } ] }, { "name": "Voice Name 2", "speakerId": "voice_id_2", "exampleUrl": "https://s21-kling.klingai.com/....mp3", "new": true, "emotions": [] } ], "lastSpeakerId": "voice_id_1", "typeList": ["en", "zh"] } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript, all fields are optional ttsList: { name: string speakerId: string exampleUrl: string new: boolean emotions: { name: string key: string enable: boolean }[] }[] lastSpeakerId: string typeList: string[] } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/tts/voices?email=user@example.com" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = `https://api.useapi.net/v1/kling/tts/voices?email=${email}`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = f"https://api.useapi.net/v1/kling/tts/voices?email={email}" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-videos-effects === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-videos-effects --- layout: default title: GET videos/effects description: "List available special video effects for use with POST videos/image2video-effects via GET videos/effects in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 320 --- ## Get Available Video Effects April 18, 2025 (July 25, 2025) --- This endpoint retrieves a list of available special effects that can be applied to videos when using the [POST /videos/image2video-effects](/docs/api-kling-v1/post-kling-videos-image2video-effects) endpoint. > **https://api.useapi.net/v1/kling/videos/effects/?...** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. ##### Responses **200** **200 OK** ```json [ { "name": "rocket", "caption": "RocketRocket", "hot": true, "minimalKrnVersion": 20250416, "supportedModelMode": ["std", "pro"], "compositedSchema": { "preprocess": { "taskType": "", "taskVersion": "", "defaultPrompt": "", "requireInputs": [ { "inputType": "URL", "contentType": "IMAGE", "optional": false, "contentName": "image" } ] }, "process": { "taskType": "m2v_img2video_se_hq", "taskVersion": "1.6", "defaultPrompt": "emits dazzling white smoke and orange Mach rings from the bottom, and it begins to rise into the air...", "requireInputs": [ { "inputType": "URL", "contentType": "IMAGE", "optional": false, "contentName": "image" } ] } }, "videoUrl": "https://v21-kling.klingai.com/bs2/upload-ylab-stunt-sgp/kling/ai_se/火箭升空-原-海-视频.gif", "coverUrl": "https://s21-kling.klingai.com/bs2/upload-ylab-stunt-sgp/kling/ai_se/火箭升空-原-海-封面.jpg", "webVideoUrl": "https://v21-kling.klingai.com/bs2/upload-ylab-stunt-sgp/kling/ai_se/火箭升空-原-海-视频.mp4", "effectSupported": true, "promptSupported": true }, { "name": "spinoff", "caption": "DizzyDizzy", "hot": false, "minimalKrnVersion": 400, "supportedModelMode": ["pro"], "videoUrl": "https://v21-kling.klingai.com/bs2/upload-ylab-stunt-sgp/kling/ai_se/魔力转圈圈-视频.gif", "coverUrl": "https://s21-kling.klingai.com/bs2/upload-ylab-stunt-sgp/kling/ai_se/魔力转圈圈-封面.png", "webVideoUrl": "https://v21-kling.klingai.com/bs2/upload-ylab-stunt-sgp/kling/ai_se/魔力转圈圈-视频-compress.mp4", "effectSupported": false, "promptSupported": false } ] ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` The response contains an array of available effects that can be used with the [POST /videos/image2video-effects](/docs/api-kling-v1/post-kling-videos-image2video-effects) endpoint. Each effect now includes additional flags: - `effectSupported`: Indicates if the effect is supported by the current endpoint (false means it requires image preprocessing) - `promptSupported`: Indicates if the effect accepts custom prompts (false means it uses only default prompts) ##### Model ```typescript { // TypeScript, all fields are optional name: string // Effect name identifier (used in requests) caption: string // Display name for the effect hot: boolean // Whether this is a featured effect minimalKrnVersion?: number // Minimum kernel version required supportedModelMode?: string[] // Supported model modes ("std", "pro") effectSupported?: boolean // Whether effect is supported (false = requires preprocessing) promptSupported?: boolean // Whether effect accepts custom prompts compositedSchema?: { // Legacy schema information preprocess?: { taskType: string taskVersion: string defaultPrompt: string requireInputs: Array<{ inputType: string contentType: string optional: boolean contentName: string }> } process?: { taskType: string taskVersion: string defaultPrompt: string requireInputs: Array<{ inputType: string contentType: string optional: boolean contentName: string }> } } videoUrl: string // Preview video URL for the effect coverUrl: string // Cover image URL for the effect webVideoUrl: string // Web-optimized preview video URL } ``` ##### Usage Notes - **effectSupported**: Only effects with `effectSupported: true` can be used with the [POST /videos/image2video-effects](/docs/api-kling-v1/post-kling-videos-image2video-effects) endpoint - **promptSupported**: Effects with `promptSupported: true` accept custom prompts; others use built-in defaults - **supportedModelMode**: Check which quality modes (std/pro) are available for each effect - Use the effect's `name` value when making requests to the [POST /videos/image2video-effects](/docs/api-kling-v1/post-kling-videos-image2video-effects) endpoint ##### Examples **Curl** ``` bash curl -X GET "https://api.useapi.net/v1/kling/videos/effects?email=user@example.com" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/videos/effects"; const response = await fetch(`${apiUrl}?email=${email}`, { method: "GET", headers: { "Authorization": `Bearer ${token}`, } }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/videos/effects" headers = { "Authorization" : f"Bearer {token}" } params = { "email": email } response = requests.get(apiUrl, headers=headers, params=params) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/get-kling-videos-motions === Document URL: https://useapi.net/docs/api-kling-v1/get-kling-videos-motions --- layout: default title: GET videos/motions description: "List official motion videos to use as the motionUrl parameter in POST videos/motion-create via GET videos/motions in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 325 --- ## Get Available Motions October 7, 2025 (January 6, 2026) --- This endpoint retrieves a list of available motion assets. Official motion videos can be used as `motionUrl` in [POST /videos/motion-create](/docs/api-kling-v1/post-kling-videos-motion-create). Uses Kling v2.6 modality asset API. > **https://api.useapi.net/v1/kling/videos/motions?...** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `mine` is optional, boolean value. When `true`, retrieves user's own motion assets. When `false` or omitted, retrieves official Kling motion templates. **Notes:** - Use the `url` field as `motionUrl` when making requests to motion-create - Official motions are pre-processed motion videos provided by Kling - User motions are videos previously uploaded via [POST /assets](/docs/api-kling-v1/post-kling-assets) - use `resourceUrl` from upload response ##### Responses **200** **200 OK** ```json [ { "assetId": "motion_12345", "assetType": "MOTION", "url": "https://v15-kling.klingai.com/bs2/upload-ylab-stunt-sgp/.../motion.mp4", "coverUrl": "https://s15-kling.klingai.com/.../cover.jpg", "duration": 5760, "width": 720, "height": 1280, "hasAudio": true, "createTime": 1767669665000 } ] ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript Array<{ // TypeScript, all fields are optional assetId: string // Unique asset identifier assetType: string // "MOTION" url: string // URL to the motion video - use as motionUrl in motion-create coverUrl?: string // URL to the cover/thumbnail image duration?: number // Duration in milliseconds width?: number // Video width in pixels height?: number // Video height in pixels hasAudio?: boolean // Whether the motion has audio createTime?: number // Creation timestamp }> ``` ##### Examples **Curl** ``` bash # Get official motions curl -X GET "https://api.useapi.net/v1/kling/videos/motions?email=user@example.com" \ -H "Authorization: Bearer ..." # Get user motions curl -X GET "https://api.useapi.net/v1/kling/videos/motions?email=user@example.com&mine=true" \ -H "Authorization: Bearer ..." ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const mine = false; // false for official, true for user const apiUrl = "https://api.useapi.net/v1/kling/videos/motions"; const response = await fetch(`${apiUrl}?email=${email}&mine=${mine}`, { method: "GET", headers: { "Authorization": `Bearer ${token}`, } }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/videos/motions" headers = { "Authorization" : f"Bearer {token}" } params = { "email": email, "mine": False # False for official, True for user } response = requests.get(apiUrl, headers=headers, params=params) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-accounts === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-accounts --- layout: default title: POST accounts description: "Add or update a Kling account in your useapi.net configuration via POST accounts in the Kling API v1 — credentials are automatically verified on save." parent: Kling API v1 nav_order: 110 --- ## Create/update Kling API account April 18, 2025 (July 20, 2026) --- This endpoint adds or updates a Kling account in your configuration. The API will automatically login to verify your credentials. > **https://api.useapi.net/v1/kling/accounts** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "password": "your-password", "maxJobs": 50 } ``` - `email` and `password` are **required**. Please see [Setup Kling](/docs/start-here/setup-kling) for details. - `maxJobs` is **required**, specify maximum number of concurrent jobs (`1`-`50`) - `passToken`, `did`, and `userId` are **optional** — supply all three together, or none. Provide them only when the account hits the Kling login slider captcha (which our server cannot solve, so plain `email` + `password` returns `Unable to login (400002)`). The three values are your signed-in Kling session captured from your own browser, where you solved the slider. When present, the account is stored in `passToken` mode and refreshes captcha-free using the `passToken`, with no password login. The connect tool captures them for you — see [Setup Kling](/docs/start-here/setup-kling). ##### Responses **201** **201 Created** ```json { "email": "user@example.com", "authMode": "password", "session": { "userId": "user12345", "ExpireTime": 123456789, "ExpireTimeUTC": "2025-01-01T12:13:14.000Z" }, "maxJobs": 50, "password": "…secured…" } ``` `authMode` is `password` for accounts added with email + password, or `passToken` when the account was connected with `passToken` + `did` + `userId`. **400** **400 Bad Request** ```json { "error": "Account does not exist or password is incorrect" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **402** **402 Payment Required** ```json { "error": "Subscription required", "code": 402 } ``` ##### Model ```typescript { // TypeScript, all fields are optional email: string authMode: "password" | "passToken" session: { userId: string ExpireTime: number ExpireTimeUTC: string } maxJobs: number password: string error: string } ``` ##### Examples **Curl** ``` bash curl -X POST https://api.useapi.net/v1/kling/accounts \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{"email": "user@example.com", "password": "your-password", "maxJobs": 50}' ``` **JavaScript** ``` javascript const token = "API token"; const apiUrl = "https://api.useapi.net/v1/kling/accounts"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: "user@example.com", password: "your-password", maxJobs: 50 }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" apiUrl = "https://api.useapi.net/v1/kling/accounts" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": "user@example.com", "password": "your-password", "maxJobs": 50 } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-assets === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-assets --- layout: default title: POST assets description: "Upload images or other files to your Kling account for use in image and video generation via POST assets in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 210 --- ## Upload asset to Kling April 18, 2025 (April 28, 2026) --- This endpoint uploads an asset to your Kling account for later use in image and video generation. > **https://api.useapi.net/v1/kling/assets/?…** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: select from the table below ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. - `Content-Type` is **required**, select from the table below: | Content-Type | File Extension | Max Size | Notes | | ------------------- | -------------- | -------- | ----- | | image/png | png | 10MB | Minimum dimensions of 300px | | image/jpeg | jpg/jpeg | 10MB | Minimum dimensions of 300px | | video/mp4 | mp4 | 150MB | 720p/1080p resolution, 10s max | | video/quicktime | mov | 150MB | 720p/1080p resolution, 10s max | | audio/wav | wav | 30MB | 30 seconds max | | audio/wave | wav | 30MB | 30 seconds max | | audio/mpeg | mp3 | 30MB | 30 seconds max | | audio/mp4 | m4a | 30MB | 30 seconds max | | audio/flac | flac | 30MB | 30 seconds max | | audio/aac | aac | 30MB | 30 seconds max | | audio/ogg | ogg | 30MB | 30 seconds max | ##### Query Parameters - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. ##### Responses **200** **200 OK** ```json { "status": 3, "url": "https://s21-kling.klingai.com/....jpg", "message": "", "fileName": "abc123def456789.jpg" } ``` **400** **400 Bad Request** ```json { "error": "Content-Type {content-type} is not supported. Valid values: image/png,image/jpeg,video/mp4,video/quicktime,audio/wav,audio/wave,audio/mpeg,audio/mp4,audio/flac,audio/aac,audio/ogg" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` You can retrieve uploaded asset details via [GET assets/uploaded/?fileName=`fileName`](/docs/api-kling-v1/get-kling-assets-uploaded). ##### Model ```typescript { // TypeScript, all fields are optional status: number // 3 = success for image, 1 = success for video url: string // URL of the uploaded asset for image/audio message: string // Status message or error error: string fileName?: string // Generated unique filename resourceUrl?: string // URL of the processed file (video) coverUrl?: string // URL of the cover image (video) cover?: { resource: string // URL of the cover height: number // Height in pixels width: number // Width in pixels duration: number // Duration in milliseconds (for video) resourceKey: string // Resource key } } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/assets/?email=user@example.com" \ -H "Authorization: Bearer …" \ -H "Content-Type: image/jpeg" \ --data-binary @/path/to/your/image.jpg ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = `https://api.useapi.net/v1/kling/assets/?email=${email}`; let blob; /* // Example 1: Fetch image from URL const imageUrl = "https://example.com/image.jpg"; const responseImage = await fetch(imageUrl); blob = await responseImage.blob(); */ /* // Example 2: Load image from local file (Node.js) const fsp = require('fs').promises; const imageFileName = "./image.jpg"; blob = new Blob([await fsp.readFile(imageFileName)]); */ /* // Example 3: Load from input file html element // const imageFile = document.getElementById(`image-file`); if (imageFile.files[0]) blob = imageFile.files[0]; */ const response = await fetch(apiUrl, { method: "POST", headers: { "Authorization": `Bearer ${token}`, "Content-Type": "image/jpeg" }, body: blob }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = f"https://api.useapi.net/v1/kling/assets/?email={email}" headers = { 'Authorization': f'Bearer {token}', 'Content-Type': 'image/jpeg' } # Example: Load image from local file image_file_path = "./image.jpg" with open(image_file_path, 'rb') as image_file: file_content = image_file.read() response = requests.post(apiUrl, headers=headers, data=file_content) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-avatars-video === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-avatars-video --- layout: default title: POST avatars/video description: "Generate a lip-sync avatar video where a Kling avatar speaks an audio file or TTS text via POST avatars/video in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 460 --- ## Generate avatar video January 12, 2026 --- This endpoint generates a lip-sync video from an avatar image and audio. The avatar speaks with realistic lip movements synchronized to the provided audio or generated text-to-speech. You can use either: - A saved avatar from [POST /avatars](/docs/api-kling-v1/post-kling-avatars) or system templates - A direct image URL For audio, you can provide either: - A pre-recorded audio file URL (upload via [POST /assets](/docs/api-kling-v1/post-kling-assets)) - Text that will be converted to speech using TTS > **https://api.useapi.net/v1/kling/avatars/video** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "avatarId": "123456789012", "text": "Hello, welcome to our product demo!", "speakerId": "speaker_id_123" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. ###### Avatar Source (one required) Provide either `avatarId` or `imageUrl`, not both: - `avatarId` is the ID of a saved avatar. Use [GET /avatars](/docs/api-kling-v1/get-kling-avatars) to list your personal avatars or browse system templates. When using an avatar, its saved `prompt` and TTS settings are used as defaults. - `imageUrl` is a direct URL to an avatar image. You can upload images using [POST /assets](/docs/api-kling-v1/post-kling-assets) and use the returned URL here. ###### Audio Source (one required) Provide either `audioUrl` or `text`, not both: - `audioUrl` is a URL to a pre-recorded audio file. You can upload audio using [POST /assets](/docs/api-kling-v1/post-kling-assets) and use the returned URL here. - `text` is the text to be converted to speech. Maximum length: 5000 characters. Requires `speakerId` to be provided. ###### TTS Options (when using text) These options apply when providing `text` for text-to-speech: - `speakerId` is **required** when using `text`. Use [GET /tts/voices](/docs/api-kling-v1/get-kling-tts-voices) to get available speaker IDs. If using an `avatarId`, the avatar's saved `ttsSpeaker` is used as default. - `speed` is optional, speech speed. Range: `0.8` to `2.0`. Default: `1`. If using an `avatarId`, the avatar's saved `ttsSpeed` is used as default. - `emotion` is optional, speech emotion. Supported values: `neutral` (default), `happy`, `angry`, `sad`, `fearful`, `disgusted`, `surprised`. Not all emotions are available for all speakers. Check [GET /tts/voices](/docs/api-kling-v1/get-kling-tts-voices) for each speaker's supported emotions. If using an `avatarId`, the avatar's saved `ttsEmotionKey` is used as default. ###### Video Options - `prompt` is optional, description of the avatar's behavior/appearance. Maximum length: 2000 characters. If using an `avatarId`, the avatar's saved `prompt` is used as default. Default: "Natural speaking". - `mode` is optional, the video generation mode. Supported values: `std` (default), `pro`. ###### Scheduler Parameters - `maxJobs` is optional, range from `1` to `50`. Specifies the maximum number of concurrent jobs. - `replyUrl` is optional, a callback URL to receive generation progress and result. See [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id#model) for response model. - `replyRef` is optional, a reference identifier for the callback. ##### Responses **200** **200 OK** ```json { "task": { "id": 123456789, "userId": 12345, "type": "m2v_img2digital", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "m2v_img2digital", "inputs": [ { "name": "image", "inputType": "URL", "url": "https://s21-kling.klingai.com/ai-platform/.../avatar.jpg" }, { "name": "audio", "inputType": "URL", "url": "https://s21-kling.klingai.com/ai-platform/.../audio.mp3" } ], "arguments": [ { "name": "prompt", "value": "Natural speaking" }, { "name": "upload_method", "value": "MY_AVATAR" }, { "name": "duration", "value": "5.234" }, { "name": "model_mode", "value": "std" } ] }, "createTime": 1736640000000, "updateTime": 1736640000000 }, "status": 5, "status_name": "submitted", "status_final": false } ``` **400** **400 Bad Request** ```json { "error": "" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** ```json { "error": "" } ``` ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number userId: number type: string scene: string status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean taskInfo: { type: string inputs: { name: string, inputType: string, url: string }[] arguments: { name: string, value: string }[] } createTime: number updateTime: number } works: object[] status: number status_name: string status_final: boolean message: string } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/avatars/video" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "user@example.com", "avatarId": "123456789012", "text": "Welcome to our demo!", "speakerId": "speaker_id_123" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/avatars/video"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, avatarId: "123456789012", text: "Welcome to our demo!", speakerId: "speaker_id_123" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/avatars/video" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "avatarId": "123456789012", "text": "Welcome to our demo!", "speakerId": "speaker_id_123" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-avatars === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-avatars --- layout: default title: POST avatars description: "Create a Kling avatar (digital character) from an image via POST avatars in the useapi.net Kling API v1 — AI auto-fills most fields including TTS voice settings." parent: Kling API v1 nav_order: 455 --- ## Create avatar January 12, 2026 --- This endpoint creates a new avatar from an image. Avatars are digital characters that can be animated with lip-sync using [POST /avatars/video](/docs/api-kling-v1/post-kling-avatars-video). Most fields are optional and will be automatically populated using AI if not provided. The AI analyzes your image to suggest an appropriate nickname, description, scene, and TTS settings. > **https://api.useapi.net/v1/kling/avatars** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "imageUrl": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `imageUrl` is **required**, the URL of the avatar image. You can upload images using [POST /assets](/docs/api-kling-v1/post-kling-assets) and use the returned URL here. ###### Optional Parameters (AI Auto-Populated) The following fields will be automatically filled by AI if not provided: - `nickname` is optional, display name for the avatar. Maximum length: 30 characters. - `prompt` is optional, description/prompt for the avatar. Maximum length: 2000 characters. Used as the default prompt when generating avatar videos. - `scene` is optional, the avatar's use case category. Supported values: `all`, `social_media`, `entertainment`, `advertising_marketing` (default), `business`, `education`, `virtual_idol`. - `ttsSpeaker` is optional, the TTS speaker ID for voice. Use [GET /tts/voices](/docs/api-kling-v1/get-kling-tts-voices) to get available speaker IDs. AI will recommend an appropriate voice if not provided. - `ttsSpeed` is optional, speech speed. Range: `0.8` to `2.0`. Default: `1`. - `ttsEmotionKey` is optional, speech emotion. Supported values: `neutral` (default), `happy`, `angry`, `sad`, `fearful`, `disgusted`, `surprised`. Note: Not all emotions are available for all speakers. Check [GET /tts/voices](/docs/api-kling-v1/get-kling-tts-voices) for each speaker's supported emotions. ##### Responses **200** **200 OK** ```json { "id": "300137233318846", "status": "SUCCESS" } ``` Use [GET /avatars](/docs/api-kling-v1/get-kling-avatars) to retrieve the full avatar details after creation. **400** **400 Bad Request** ```json { "error": "" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript id: string status: 'SUCCESS' | 'FAILED' } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/avatars" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "user@example.com", "imageUrl": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/avatars"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, imageUrl: "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/avatars" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "imageUrl": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-elements === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-elements --- layout: default title: POST elements description: "Create reusable IMAGE or VIDEO elements from images or clips via POST elements in the useapi.net Kling API v1 — IMAGE elements work in O1 and v3 Omni, VIDEO elements in v3 Omni only." parent: Kling API v1 nav_order: 426 --- ## Create element January 12, 2026 (March 6, 2026) --- This endpoint creates one or more elements from a cover image or video. Elements are saved character/object references that can be reused across multiple generations in [POST /images/omni](/docs/api-kling-v1/post-kling-images-omni) and [POST /videos/omni](/docs/api-kling-v1/post-kling-videos-omni) using the `@element_N` syntax. There are two element types: - **IMAGE** elements: Created from a `coverImage`, with optional multi-angle views - **VIDEO** elements: Created from a `video` URL (mp4, minimum 3 seconds, auto-trimmed to 8s), with optional voice assignment. VIDEO elements can only be used in v3 video generation via [POST /videos/omni](/docs/api-kling-v1/post-kling-videos-omni). | Feature | IMAGE | VIDEO | |---------|:-----:|:-----:| | Input | `coverImage` | `video` (mp4, min 3s, auto-trimmed to 8s) | | `voice` support | ✅ (character tag only) | ✅ (character tag only) | | Auto voice extraction | ❌ | ✅ (character tag, 5-60s video) | | Custom voice from URL | ✅ (mp4, 5-60s) | ✅ (mp4, 5-60s) | | `extraImage1/2/3` | ✅ | ❌ | | `generateViews` | ✅ | ❌ | | Used in O1 omni | ✅ | ❌ | | Used in v3 omni | ✅ | ✅ | The `generateViews` option (IMAGE only) uses AI to create multiple variations of your element with different angles, which can produce up to 3 separate elements from a single image. You can review the results and delete ones you don't like using [DELETE /elements/`elementId`](/docs/api-kling-v1/del-kling-elements-elementId). > **https://api.useapi.net/v1/kling/elements** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "name": "MyCharacter", "coverImage": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg", "tag": "character" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `name` is **required**, the base name for the element. Maximum length: 15 characters. A 5-character random suffix is automatically appended (e.g., "MyChar" becomes "MyChar ABC12"). - `coverImage` is required for IMAGE elements, the URL of the primary image. You can upload images using [POST /assets](/docs/api-kling-v1/post-kling-assets) and use the returned URL here. Cannot be used together with `video`. - `video` is required for VIDEO elements, the URL of a video (mp4 format, minimum 3 seconds). You can upload videos using [POST /assets](/docs/api-kling-v1/post-kling-assets) and use the returned URL here. The video is preprocessed to extract a cover frame and normalized video. Videos longer than 8 seconds are automatically trimmed. Minimum 700px shortest edge. Cannot be used together with `coverImage`. - `voice` is optional (`character` tag required), the voice to assign to the element. Accepts an official voice name/ID from [GET /elements/voices](/docs/api-kling-v1/get-kling-elements-voices), or a video URL (mp4, 5-60 seconds) to extract a custom voice from. For VIDEO elements without an explicit voice, voice extraction is automatically attempted from the video (requires 5-60 seconds with audio; silently skipped if video is too short). Voice is only supported for elements with the `character` tag. - `description` is optional, a text description of the element. Maximum length: 100 characters. If not provided, a description is automatically generated from the image using AI. - `tag` is optional, the category tag for the element. Use [GET /elements/tags](/docs/api-kling-v1/get-kling-elements-tags) to get available tags. Accepts either `id` or `tagKey` (e.g., "1" or "character"). If not provided, the tag is automatically detected from the image using AI. ###### Secondary Images (IMAGE only) You can optionally provide additional angle/view images: - `extraImage1` is optional, URL of first additional view. - `extraImage2` is optional, URL of second additional view. - `extraImage3` is optional, URL of third additional view. Maximum 3 secondary images allowed. Cannot be used together with `generateViews` or `video`. ###### Auto-Generate Views (IMAGE only) - `generateViews` is optional, set to `true` to have AI generate 3 multi-angle variations. When enabled, the system generates different views of your element automatically. This can create **up to 3 separate elements**, one for each variation group. Cannot be used together with `extraImage1/2/3` or `video`. This call can take up to 60 seconds to complete since generation takes time. ##### Responses **200** **200 OK** **Standard response (without generateViews):** ```json { "elements": [ { "id": "u_123456789012345", "name": "MyCharacter ABC12", "userId": 12345678, "description": "AI-generated description of the character", "cover": { "resource": "https://s21-kling.klingai.com/ai-platform/.../cover.jpg", "width": 768, "height": 1365, "resourceKey": "cover", "cover": true, "slotKey": "" }, "resources": [ { "resource": "https://s21-kling.klingai.com/ai-platform/.../cover.jpg", "width": 768, "height": 1365, "resourceKey": "cover", "cover": true, "slotKey": "" } ], "tagList": [], "createTime": 1736640000000, "updateTime": 1736640000000, "favored": false, "official": false } ], "count": 1 } ``` **Response with generateViews (creates up to 3 separate elements, each with 4 views):** ```json { "elements": [ { "id": "u_123456789012345", "name": "MyCharacter ABC12", "userId": 12345678, "description": "AI-generated description", "cover": { "resource": "https://s21-kling.klingai.com/ai-platform/.../cover.jpg", "resourceKey": "cover", "cover": true, "slotKey": "" }, "resources": [ { "resource": ".../cover.jpg", "resourceKey": "cover", "cover": true, "slotKey": "" }, { "resource": ".../side.png", "resourceKey": "secondary", "cover": false, "slotKey": "side" }, { "resource": ".../back.png", "resourceKey": "secondary", "cover": false, "slotKey": "back" }, { "resource": ".../top.png", "resourceKey": "secondary", "cover": false, "slotKey": "topView" } ], "tagList": [] }, { "id": "u_234567890123456", "name": "MyCharacter DEF34", "description": "AI-generated description", "resources": [ { "resource": ".../cover.jpg", "resourceKey": "cover", "cover": true, "slotKey": "" }, { "resource": ".../side.png", "resourceKey": "secondary", "cover": false, "slotKey": "side" }, { "resource": ".../back.png", "resourceKey": "secondary", "cover": false, "slotKey": "back" }, { "resource": ".../top.png", "resourceKey": "secondary", "cover": false, "slotKey": "topView" } ], "tagList": [] } ], "count": 2 } ``` **400** **400 Bad Request** ```json { "error": "" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript, all fields are optional elements: { id: string name: string userId: number type: 'IMAGE' | 'VIDEO' description: string cover: { resource: string width: number height: number resourceKey: 'cover' | 'secondary' | 'video' cover: boolean slotKey: string } resources: { resource: string width: number height: number resourceKey: 'cover' | 'secondary' | 'video' cover: boolean slotKey: string voice: { id: number name: string official: boolean resource: object } }[] tagList: object[] voice: { id: number name: string official: boolean resource: object } currentVersion: number createTime: number updateTime: number favored: boolean official: boolean }[] count: number } ``` ##### Usage After Creation Once created, you can use element IDs in [POST /images/omni](/docs/api-kling-v1/post-kling-images-omni), [POST /videos/omni](/docs/api-kling-v1/post-kling-videos-omni), and [POST /videos/motion-create](/docs/api-kling-v1/post-kling-videos-motion-create): ```json { "prompt": "Character @element_1 walking through a beautiful garden", "element_1": "u_123456789012345" } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/elements" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "user@example.com", "name": "FashionLady", "coverImage": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg", "tag": "character" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/elements"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, name: "FashionLady", coverImage: "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg", tag: "character" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/elements" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "name": "FashionLady", "coverImage": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg", "tag": "character" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-images-kolors-elements === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-images-kolors-elements --- layout: default title: POST …/kolors-elements description: "Generate KOLORS v2.1 images from up to 4 subject images plus optional scene and style references via POST images/kolors-elements in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 313 --- ## Generate Images with KOLORS Elements July 18, 2025 (October 31, 2025) --- This endpoint generates images using Kling's KOLORS v2.1 with multiple image elements (up to 4 subject images, plus optional scene and style images) that will appear as elements in the generated image. This allows for more complex compositions with multiple reference images. > **https://api.useapi.net/v1/kling/images/kolors-elements** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "prompt": "A digital art gallery with modern paintings and sculptures on display", "subjectImage1": "https://example.com/painting1.jpg", "subjectImage2": "https://example.com/sculpture1.jpg", "subjectImage3": "https://example.com/painting2.jpg", "subjectImage4": "https://example.com/decoration.jpg", "sceneImage": "https://example.com/gallery-background.jpg", "styleImage": "https://example.com/art-style.jpg", "aspect_ratio": "16:9", "imageCount": 1, "replyUrl": "https://your-callback-url.com/webhook", "replyRef": "your-reference-id" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `prompt` is optional, the text description of the image to generate. Maximum length: 2500 characters. - `subjectImage1`, `subjectImage2`, `subjectImage3` and `subjectImage4` are optional URLs to subject images that will appear as elements in the generated image. Images can be uploaded using [POST /assets](/docs/api-kling-v1/post-kling-assets) and the returned URLs can be used here. - `sceneImage` is optional, URL to a scene/background image. Image can be uploaded using [POST /assets](/docs/api-kling-v1/post-kling-assets) and the returned URLs can be used here. - `styleImage` is optional, URL to a style reference image. Image can be uploaded using [POST /assets](/docs/api-kling-v1/post-kling-assets) and the returned URLs can be used here. - `aspect_ratio` is optional, the aspect ratio of the generated image. Supported values: `1:1`, `16:9` (default), `4:3`, `3:2`, `2:3`, `3:4`, `9:16`, `21:9`. - `imageCount` is optional, the number of images to generate. Range: `1` to `9`. Default: `1`. - `maxJobs` is optional, range from `1` to `50`. Specifies the maximum number of concurrent jobs. - `replyUrl` is optional, a callback URL to receive generation progress and result. See [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id#model) for response model. - `replyRef` is optional, a reference identifier for the callback. **Note:** At least two images must be provided (any combination of subjectImage1-4, sceneImage, or styleImage). ##### Responses **200** **200 OK** ```json { "task": { "id": 123456789, "userId": 12345, "type": "mmu_multi_img2img_aiweb", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "mmu_multi_img2img_aiweb", "inputs": [ { "name": "subject_image_0", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/painting1.jpg", "cover": null, "fromWorkId": null }, { "name": "raw_subject_image_0", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/painting1.jpg", "cover": null, "fromWorkId": null }, { "name": "subject_image_1", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/sculpture1.jpg", "cover": null, "fromWorkId": null }, { "name": "scene_image", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/gallery-background.jpg", "cover": null, "fromWorkId": null } ], "arguments": [ { "name": "prompt", "value": "A digital art gallery with modern paintings and sculptures on display" }, { "name": "aspect_ratio", "value": "16:9" }, { "name": "imageCount", "value": "1" }, { "name": "kolors_version", "value": "2.1" }, { "name": "img_resolution", "value": "1k" }, { "name": "style", "value": "默认" }, { "name": "imageList", "value": "[{\"top\":0,\"left\":0,\"width\":1,\"height\":1},{\"top\":0,\"left\":0,\"width\":1,\"height\":1}]" }, { "name": "biz", "value": "klingai" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1745376611075, "updateTime": 1745376611075 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "", "limitation": { "type": "mmu_multi_img2img_aiweb", "remaining": 10000, "limit": 10000 }, "userPoints": { "points": [], "total": 0 }, "userTickets": { "ticket": [] }, "editProject": null } ``` **400** **400 Bad Request** ```json { "error": "At least two images must be provided" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Kling was unable to locate one of the referenced assets. Make sure to use [POST /assets](/docs/api-kling-v1/post-kling-assets) to upload assets. ```json { "error": "Sorry, the requested resource was not found (VALID.ResourceNotFound)", "message": "Not Found" } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` When successful, the response includes a task ID which can be used to check the status using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number userId: number type: string scene: string status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean taskInfo: { type: string inputs: Array<{ name: string inputType: string token: string | null blobStorage: any | null url: string cover: string | null fromWorkId: number | null }> arguments: Array<{ name: string value: string }> extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } works: Array status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean message: string error: string limitation: { type: string remaining: number limit: number } userPoints: { points: Array<{ orderId: string type: string amount: number balance: number startTime: number endTime: number }> total: number } userTickets: { ticket: Array<{ orderId: string type: string packageType: string amount: number balance: number startTime: number endTime: number }> } editProject: any | null } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/images/kolors-elements" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "email": "user@example.com", "prompt": "A digital art gallery with modern paintings and sculptures on display", "subjectImage1": "https://example.com/painting1.jpg", "subjectImage2": "https://example.com/sculpture1.jpg", "sceneImage": "https://example.com/gallery-background.jpg" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/images/kolors-elements"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, prompt: "A digital art gallery with modern paintings and sculptures on display", subjectImage1: "https://example.com/painting1.jpg", subjectImage2: "https://example.com/sculpture1.jpg", sceneImage: "https://example.com/gallery-background.jpg" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/images/kolors-elements" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "prompt": "A digital art gallery with modern paintings and sculptures on display", "subjectImage1": "https://example.com/painting1.jpg", "subjectImage2": "https://example.com/sculpture1.jpg", "sceneImage": "https://example.com/gallery-background.jpg" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-images-kolors === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-images-kolors --- layout: default title: POST images/kolors description: "Generate images with KOLORS v3.0 (up to 10 reference images) or v2.1 (face, subject, restyle workflows) via POST images/kolors in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 312 --- ## Generate Images with KOLORS April 24, 2025 (February 9, 2026) --- This endpoint generates images using Kling's KOLORS. It supports KOLORS v3.0 for text-to-image with reference images, and KOLORS v2.1 for text-to-image with face, subject, and restyle reference workflows. **Note:** KOLORS v2.0 and v1.5 have been retired by Kling from the website. Their features (restyle, face, subject) are now available under v2.1. The legacy versions are still accepted for backwards compatibility. ##### Model Support Matrix | Feature | v3.0 | v2.1 | |---------|:----:|:----:| | Text-to-image | ✅ | ✅ | | Reference images (`image_1`-`image_10`) | ✅ (up to 10) | ❌ | | Face reference (`reference: face`) | ❌ | ✅ | | Subject reference (`reference: subject`) | ❌ | ✅ | | Restyle (`reference: restyle`) | ❌ | ✅ | | `resolution` | `1k`, `2k` (default) | `1k`, `2k` (default, text-to-image only) | | `aspect_ratio` default | `16:9` | `16:9` | | `imageCount` default | `2` | `1` | | `aspect_ratio: auto` | ✅ (with images only) | ❌ | > **https://api.useapi.net/v1/kling/images/kolors** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "prompt": "A woman @image_1 dancing elegantly in a ballroom", "version": "kling-v3-0", "resolution": "2k", "aspect_ratio": "3:4", "imageCount": 2, "image_1": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `prompt` is **required**, the text description of the image to generate. Maximum length: 2500 characters. For v3, use `@image_1`, `@image_2`, etc. to reference images in your prompt. - `version` is optional, the KOLORS model version to use. Supported values: `kling-v3-0` (default), `kling-v2-1`. Legacy (retired): `kling-v1-5`, `kling-v1-6`, `kling-v2-0` — still accepted for backwards compatibility. - `resolution` is optional, the resolution of the generated image. Supported values: `1k`, `2k` (default). Only available for v3.0 and v2.1 text-to-image (`reference: none`). Not supported by subject/face/restyle. ###### v3 Parameters - `image_1` through `image_10` are optional (v3 only), URLs of reference images. You can upload images using [POST /assets](/docs/api-kling-v1/post-kling-assets). Reference in prompt using `@image_1`, `@image_2`, etc. **Note:** v3 does not support `reference`, `imageReference`, `faceStrength`, `subjectStrength`, or `faceNo` parameters. ###### v3 Aspect Ratios When using `version: kling-v3-0`, the supported aspect ratios are: `9:16`, `2:3`, `3:4`, `1:1`, `4:3`, `3:2`, `16:9` (default), `21:9`, `auto` (with images only). ###### v2.1 Reference Parameters - `reference` is optional, the type of reference to use (v2.1). Supported values: - `none` (default) — text-to-image - `subject` — subject similarity reference - `face` — face similarity reference - `restyle` — style transfer from reference image - `imageReference` is required if `reference` is not `none`, the URL of the reference image. You can upload images using [POST /assets](/docs/api-kling-v1/post-kling-assets) and use the returned URL here. - `aspect_ratio` is optional, the aspect ratio of the generated image. Not supported by `restyle` reference type. Supported values: `1:1`, `16:9` (default), `4:3`, `3:2`, `2:3`, `3:4`, `9:16`, `21:9`. - `imageCount` is optional, the number of images to generate. Range: `1` to `9`. Default: `1` (v3 default: `2`). - `faceStrength` is optional, the strength of face similarity for both `face` and `subject` reference types. Range: `1` to `100`. Default: `65`. - `subjectStrength` is optional, the strength of subject similarity for `subject` reference type. Range: `1` to `100`. Default: `50`. - `faceNo` is optional, the index of the face to use in multi-face images for `face` reference type. Default: `1`. You can use [POST /images/recognize-faces](/docs/api-kling-v1/post-kling-images-recognize-faces) to detect faces in an image. ###### Scheduler Parameters - `maxJobs` is optional, range from `1` to `50`. Specifies the maximum number of concurrent jobs. - `replyUrl` is optional, a callback URL to receive generation progress and result. See [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id#model) for response model. - `replyRef` is optional, a reference identifier for the callback. ##### Responses **200** **200 OK** ```json { "task": { "id": 123456789, "userId": 12345, "type": "mmu_img2img_aiweb", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "mmu_img2img_aiweb", "inputs": [ { "name": "input", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/face.jpg", "cover": null, "fromWorkId": null }, { "name": "feature", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://s21-kling.klingai.com/....jpg", "cover": null, "fromWorkId": null } ], "arguments": [ { "name": "prompt", "value": "Portrait of a woman with blue eyes, detailed, photorealistic" }, { "name": "aspect_ratio", "value": "16:9" }, { "name": "imageCount", "value": "1" }, { "name": "kolors_version", "value": "2.1" }, { "name": "fidelity", "value": "0.65" }, { "name": "style", "value": "默认" }, { "name": "faceBound", "value": "{\"x\":120,\"y\":80,\"width\":200,\"height\":240}" }, { "name": "referenceType", "value": "mmu_img2img_aiweb_v15_character" }, { "name": "biz", "value": "klingai" } ], "extraArgs": {}, "callbackPayloads": [ { "name": "face_count", "value": "1" }, { "name": "referenceImageWidth", "value": "724" }, { "name": "referenceImageHeight", "value": "1268" } ], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1745376611075, "updateTime": 1745376611075 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "", "limitation": { "type": "mmu_img2img_aiweb", "remaining": 10000, "limit": 10000 }, "userPoints": { "points": [], "total": 0 }, "userTickets": { "ticket": [] }, "editProject": null } ``` **400** **400 Bad Request** ```json { "error": "reference \"face\" does not support subjectStrength" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Kling was unable to locate one of the referenced assets. Make sure to use [POST /assets](/docs/api-kling-v1/post-kling-assets) to upload assets. ```json { "error": "Sorry, the requested resource was not found (VALID.ResourceNotFound)", "message": "Not Found" } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` When successful, the response includes a task ID which can be used to check the status using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number userId: number type: string scene: string status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean taskInfo: { type: string inputs: Array<{ name: string inputType: string token: string | null blobStorage: any | null url: string cover: string | null fromWorkId: number | null }> arguments: Array<{ name: string value: string }> extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } works: Array status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean message: string error: string limitation: { type: string remaining: number limit: number } userPoints: { points: Array<{ orderId: string type: string amount: number balance: number startTime: number endTime: number }> total: number } userTickets: { ticket: Array<{ orderId: string type: string packageType: string amount: number balance: number startTime: number endTime: number }> } editProject: any | null } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/images/kolors" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "email": "user@example.com", "prompt": "Portrait of a woman with blue eyes, detailed, photorealistic", "reference": "face", "imageReference": "https://example.com/face.jpg", "faceStrength": 65, "faceNo": 1 }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/images/kolors"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, prompt: "Portrait of a woman with blue eyes, detailed, photorealistic", reference: "face", imageReference: "https://example.com/face.jpg", faceStrength: 65, faceNo: 1 }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/images/kolors" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "prompt": "Portrait of a woman with blue eyes, detailed, photorealistic", "reference": "face", "imageReference": "https://example.com/face.jpg", "faceStrength": 65, "faceNo": 1 } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-images-omni === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-images-omni --- layout: default title: POST images/omni description: "Generate images with Kling's O1 or v3 Omni model via POST images/omni in the useapi.net Kling API v1 — v3 supports 4k resolution, saved elements, and Story Mode." parent: Kling API v1 nav_order: 310 --- ## Generate Images with Omni December 10, 2025 (March 19, 2026) --- This endpoint generates images using Kling's Omni model (`O1` and `v3`). It supports text-to-image generation with up to 10 reference images and/or saved elements that can be referenced in your prompt. ##### Version Comparison | Feature | v3 | O1 | |---------|:--:|:--:| | Resolution | `1k`, `2k`, `4k` (VIP) | `1k`, `2k` | | Default `aspect_ratio` | `auto` | `16:9` | | `auto` aspect ratio | ✅ | ❌ | | `story_mode` (Series Mode) | ✅ | ❌ | > **https://api.useapi.net/v1/kling/images/omni** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "prompt": "A woman @image_1 dancing elegantly in a ballroom", "resolution": "2k", "aspect_ratio": "16:9", "imageCount": 2, "story_mode": true, "image_1": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `prompt` is **required**, the text description of the image to generate. Maximum length: 1700 characters. Use `@image_1`, `@image_2`, etc. to reference images in your prompt. Use `@element_1`, `@element_2`, etc. (or `@object_1`, etc.) to reference saved elements. - `omni_version` is optional, the Omni model version to use. Supported values: `o1`, `v3` (default). - `resolution` is optional, the resolution of the generated image. Supported values: `1k` (default), `2k`, `4k` (v3 only, **VIP required**). - `aspect_ratio` is optional, the aspect ratio of the generated image. Supported values: `auto` (v3 only), `16:9` (default for O1), `9:16`, `1:1`, `4:3`, `3:4`, `3:2`, `2:3`, `21:9`. v3 defaults to `auto`. `auto` is NOT available for O1. - `imageCount` is optional, the number of images to generate. Range: `1` to `9`. Default: `1`. - `story_mode` is optional, enables Series Mode for coherent multi-image generation (v3 only). Requires at least one reference image or element. When enabled, generates a coherent set of images rather than independent generations. Default: `false`. - `unlimited` is optional, enables unlimited generation mode for eligible Pro and above accounts (subscribed prior December 15, 2025). Default: `false`. ###### Reference Images - `image_1` through `image_10` are optional, URLs of reference images. You can upload images using [POST /assets](/docs/api-kling-v1/post-kling-assets). Reference in prompt using `@image_1`, `@image_2`, etc. ###### Saved Elements - `element_1` through `element_10` are optional, IDs of saved elements. Create elements using [POST /elements](/docs/api-kling-v1/post-kling-elements). Reference in prompt using `@element_1` or `@object_1`, etc. **Note:** Images and elements share the same pool of 10 slots. Combined total cannot exceed 10. ###### Prompt Reference Syntax | Input Type | Prompt Syntax | Example | |------------|---------------|---------| | Images | `@image_1`, `@image_2`, ... | `"A woman @image_1 in a ballroom"` | | Elements | `@element_1` or `@object_1`, ... | `"Character @element_1 sitting..."` | ###### Scheduler Parameters - `maxJobs` is optional, range from `1` to `50`. Specifies the maximum number of concurrent jobs. - `replyUrl` is optional, a callback URL to receive generation progress and result. See [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id#model) for response model. - `replyRef` is optional, a reference identifier for the callback. ##### Responses **200** **200 OK** ```json { "task": { "id": 123456789, "userId": 12345, "type": "mmu_omni_image", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "mmu_omni_image", "inputs": [ { "name": "image_1", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg", "cover": null, "fromWorkId": null } ], "arguments": [ { "name": "prompt", "value": "A woman Image1 dancing elegantly in a ballroom" }, { "name": "rich_prompt", "value": "A woman <<>> dancing elegantly in a ballroom" }, { "name": "kolors_version", "value": "3.0-omni" }, { "name": "img_resolution", "value": "2k" }, { "name": "aspect_ratio", "value": "16:9" }, { "name": "imageCount", "value": "1" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1733836800000, "updateTime": 1733836800000 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "", "limitation": { "type": "mmu_omni_image", "remaining": 10000, "limit": 10000 }, "userPoints": { "points": [], "total": 0 }, "userTickets": { "ticket": [] }, "editProject": null } ``` **400** **400 Bad Request** ```json { "error": "" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** ```json { "error": "" } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` When successful, the response includes a task ID which can be used to check the status using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number userId: number type: string scene: string status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean taskInfo: { type: string inputs: Array<{ name: string inputType: string token: string | null blobStorage: any | null url: string cover: string | null fromWorkId: number | null }> arguments: Array<{ name: string value: string }> extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } works: Array status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean message: string error: string limitation: { type: string remaining: number limit: number } userPoints: { points: Array<{ orderId: string type: string amount: number balance: number startTime: number endTime: number }> total: number } userTickets: { ticket: Array<{ orderId: string type: string packageType: string amount: number balance: number startTime: number endTime: number }> } editProject: any | null } ``` ##### Examples **Curl** ``` bash # Using reference image curl -X POST "https://api.useapi.net/v1/kling/images/omni" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "user@example.com", "prompt": "A woman @image_1 dancing elegantly in a ballroom", "resolution": "2k", "aspect_ratio": "16:9", "image_1": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg" }' # Using story_mode (Series Mode) for coherent multi-image generation curl -X POST "https://api.useapi.net/v1/kling/images/omni" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "user@example.com", "prompt": "A series of @image_1 in different seasons", "resolution": "2k", "aspect_ratio": "16:9", "imageCount": 3, "story_mode": true, "image_1": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg" }' # Using saved element curl -X POST "https://api.useapi.net/v1/kling/images/omni" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "user@example.com", "prompt": "Character @element_1 in a garden setting", "resolution": "2k", "aspect_ratio": "16:9", "element_1": "u_123456789012345" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/images/omni"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, prompt: "Character @element_1 in a garden setting", resolution: "2k", aspect_ratio: "16:9", element_1: "u_123456789012345" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/images/omni" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "prompt": "Character @element_1 in a garden setting", "resolution": "2k", "aspect_ratio": "16:9", "element_1": "u_123456789012345" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-images-recognize-faces === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-images-recognize-faces --- layout: default title: POST images/recognize-faces description: "Detect faces in an image and return their positions and features for free via POST images/recognize-faces in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 314 --- ## Detect Faces in Images April 24, 2025 (October 1, 2025) --- This endpoint detects faces in the provided image and returns face information, including positions and features. This is useful for identifying facial features prior to using them with [POST /images/kolors](/docs/api-kling-v1/post-kling-images-kolors) with the `face` reference type. You can execute an unlimited number of face detections for **free**. This feature is available for all Kling subscription plans, including the free one. > **https://api.useapi.net/v1/kling/images/recognize-faces** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "imageReference": "https://example.com/image.jpg" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `imageReference` is **required**, the URL of the image to analyze. You can upload images using [POST /assets](/docs/api-kling-v1/post-kling-assets) and use the returned URL here. ##### Responses **200** **200 OK** ```json { "status": 0, "message": "", "faceItems": [ { "name": "face_0", "resources": [ { "name": "face", "type": "image", "url": "https://s21-kling.klingai.com/...face_0.jpg", "marginTop": 0, "countInRow": 1 }, { "name": "face_feature", "type": "image", "url": "https://s21-kling.klingai.com/...face_feature_0.jpg", "marginTop": 0, "countInRow": 1 } ], "arguments": [ { "name": "face_bound", "value": "{\"x\":120,\"y\":80,\"width\":200,\"height\":240}" } ] } ], "mediaInfo": { "type": "image", "duration": 0, "width": 724, "height": 1268 } } ``` **400** **400 Bad Request** ```json { "error": "Parameter imageReference is required" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` If the response contains `faceItems`, it means faces were detected in the image. Each face is listed with its position and features. The response will include: - `status`: 0 indicates success - `faceItems`: An array of detected faces, each with: - `resources`: Face images and feature information - `arguments`: Contains face bounding box coordinates - `mediaInfo`: Information about the original image ##### Model ```typescript { // TypeScript, all fields are optional status: number // 0 for success message: string // Empty string on success, error message otherwise error: string faceItems?: { name: string // Face identifier (e.g., "face_0") resources: { name: string // Resource type identifier (e.g., "face", "face_feature") type: string // Resource type (typically "image") url: string // URL to the resource marginTop: number // Display margin countInRow: number // Display count in row }[] arguments: { name: string // Argument name (e.g., "face_bound") value: string // JSON string with facial bounds coordinates }[] }[] mediaInfo: { type: string // Media type (typically "image") duration: number // Duration for video (0 for image) width: number // Image width in pixels height: number // Image height in pixels } } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/images/recognize-faces" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "email": "user@example.com", "imageReference": "https://example.com/image.jpg" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/images/recognize-faces"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, imageReference: "https://example.com/image.jpg" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/images/recognize-faces" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "imageReference": "https://example.com/image.jpg" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-images-upscale === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-images-upscale --- layout: default title: POST images/upscale description: "Upscale a previously generated Kling image to higher resolution by task ID and work ID via POST images/upscale in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 316 --- ## Upscale Images April 24, 2025 (October 1, 2025) --- This endpoint upscales previously generated images to higher resolution. It takes a task ID and work ID from a completed task, and creates a new upscaled version of the specified image. > **https://api.useapi.net/v1/kling/images/upscale** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "task_id": "123456789", "workId": "987654321" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `task_id` is **required**, the ID of a completed task that generated the image. Must be in the `succeed` status, which can be checked using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). - `workId` is **required**, the ID of the specific image from the task to upscale. Can be found in the `works` array of the [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id) response. - `maxJobs` is optional, range from `1` to `50`. Specifies the maximum number of concurrent jobs. - `replyUrl` is optional, a callback URL to receive generation progress and result. See [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id#model) for response model. - `replyRef` is optional, a reference identifier for the callback. ##### Responses **200** **200 OK** ```json { "task": { "id": 123456789, "userId": 12345, "type": "mmu_image_upscale_aiweb", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "mmu_image_upscale_aiweb", "inputs": [ { "name": "input", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://s21-kling.klingai.com/....jpg", "cover": null, "fromWorkId": 987654321 } ], "arguments": [ { "name": "biz", "value": "klingai" }, { "name": "__initialType", "value": "mmu_img2img_aiweb" }, { "name": "__initialPrompt", "value": "Portrait of a woman with blue eyes" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1745376611075, "updateTime": 1745376611075 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "", "limitation": { "type": "mmu_image_upscale_aiweb", "remaining": 10000, "limit": 10000 }, "userPoints": { "points": [], "total": 0 }, "userTickets": { "ticket": [] }, "editProject": null } ``` **400** **400 Bad Request** ```json { "error": "Task 123456789 is not completed" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` When successful, the response includes a task ID which can be used to check the status using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number userId: number type: string scene: string status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean taskInfo: { type: string inputs: Array<{ name: string inputType: string token: string | null blobStorage: any | null url: string cover: string | null fromWorkId: number | null }> arguments: Array<{ name: string value: string }> extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } works: Array status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean message: string error: string limitation: { type: string remaining: number limit: number } userPoints: { points: Array<{ orderId: string type: string amount: number balance: number startTime: number endTime: number }> total: number } userTickets: { ticket: Array<{ orderId: string type: string packageType: string amount: number balance: number startTime: number endTime: number }> } editProject: any | null } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/images/upscale" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "email": "user@example.com", "task_id": "123456789", "workId": "987654321" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/images/upscale"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, task_id: "123456789", workId: "987654321" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/images/upscale" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "task_id": "123456789", "workId": "987654321" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-images-virtual-try-on === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-images-virtual-try-on --- layout: default title: POST images/virtual-try-on description: "Create virtual clothing try-on images from a person photo and garment references via POST images/virtual-try-on in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 310 --- ## Virtual Try-On April 18, 2025 (October 1, 2025) --- This endpoint allows you to create virtual try-on images with Kling AI by providing a human image and clothing items. > **https://api.useapi.net/v1/kling/images/virtual-try-on** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "humanImage": "https://example.com/person.jpg", "dressInput": "https://example.com/dress.jpg", "imageCount": 2, "replyUrl": "https://your-callback-url.com/webhook", "replyRef": "your-reference-id" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `humanImage` is **required**, URL to the image of a person. Must be a valid http/https URL. Images can be uploaded using [POST /assets](/docs/api-kling-v1/post-kling-assets) and the returned URLs can be used here. - `dressInput` URL to a full-dress image to try on. Incompatible with upperInput and lowerInput. Images can be uploaded using [POST /assets](/docs/api-kling-v1/post-kling-assets). - `upperInput` URL to an upper garment image. Incompatible with dressInput. Images can be uploaded using [POST /assets](/docs/api-kling-v1/post-kling-assets). - `lowerInput` URL to a lower garment image. Incompatible with dressInput. Images can be uploaded using [POST /assets](/docs/api-kling-v1/post-kling-assets). - `imageCount` is optional, range from `1` to `4`. Default is `1`. - `maxJobs` is optional, range from `1` to `50`. Specifies the maximum number of concurrent jobs. - `replyUrl` is optional, a callback URL to receive generation progress and result. See [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id#model) for response model. - `replyRef` is optional, a reference identifier for the callback. **Note:** You must provide at least one of: `dressInput`, `upperInput`, or `lowerInput`. ##### Responses **200** **200 OK** ```json { "task": { "id": 123456789, "userId": 12345, "type": "mmu_img2img_aitryon", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "mmu_img2img_aitryon", "inputs": [ { "name": "humanImage", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/person.jpg", "cover": null, "fromWorkId": null }, { "name": "dressInput", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/dress.jpg", "cover": null, "fromWorkId": null } ], "arguments": [ { "name": "personType", "value": "Female" }, { "name": "imageCount", "value": "2" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1745376611075, "updateTime": 1745376611075 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "", "limitation": { "type": "mmu_img2img_aitryon", "remaining": 10000, "limit": 10000 }, "userPoints": { "points": [], "total": 0 }, "userTickets": { "ticket": [] }, "editProject": null } ``` **400** **400 Bad Request** ```json { "error": "At least one of dressInput, upperInput or lowerInput must be provided" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Kling was unable to locate one of the referenced assets. Make sure to use [POST /assets](/docs/api-kling-v1/post-kling-assets) to upload assets. ```json { "error": "Sorry, the requested resource was not found (VALID.ResourceNotFound)", "message": "Not Found" } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` When successful, the response includes a task ID which can be used to check the status using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number userId: number type: string scene: string status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean taskInfo: { type: string inputs: Array<{ name: string inputType: string token: string | null blobStorage: any | null url: string cover: string | null fromWorkId: number | null }> arguments: Array<{ name: string value: string }> extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } works: Array status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean message: string error: string limitation: { type: string remaining: number limit: number } userPoints: { points: Array<{ orderId: string type: string amount: number balance: number startTime: number endTime: number }> total: number } userTickets: { ticket: Array<{ orderId: string type: string packageType: string amount: number balance: number startTime: number endTime: number }> } editProject: any | null } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/images/virtual-try-on" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "email": "user@example.com", "humanImage": "https://example.com/person.jpg", "dressInput": "https://example.com/dress.jpg", "imageCount": 2 }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/images/virtual-try-on"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, humanImage: "https://example.com/person.jpg", dressInput: "https://example.com/dress.jpg", imageCount: 2 }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/images/virtual-try-on" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "humanImage": "https://example.com/person.jpg", "dressInput": "https://example.com/dress.jpg", "imageCount": 2 } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-tts-create === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-tts-create --- layout: default title: POST tts/create description: "Generate up to 5 minutes of speech from text for free via POST tts/create in the useapi.net Kling API v1 — unlimited TTS on all Kling subscription plans." parent: Kling API v1 nav_order: 475 --- ## Generate speech from text April 18, 2025 (December 15, 2025) --- This endpoint generates speech up to **5 minutes** long from text using Kling's text-to-speech technology. You can execute an unlimited number of TTS generations for **free**. This feature is available for all Kling subscription plans, including the free one. > **https://api.useapi.net/v1/kling/tts/create** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "speakerId": "speakerId", "text": "Text to be converted to speech", "speed": 1.0, "emotion": "happy" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `speakerId` is **required**, a valid speakerId from [GET /tts/voices](/docs/api-kling-v1/get-kling-tts-voices). - `text` is **required**, the text to be converted to speech. - `speed` is optional, range from `0.8` to `2.0`. Default is `1.0`. - `emotion` is optional, must be one of the supported emotion keys for the selected voice. ##### Responses **200** **200 OK** ```json { "resource": "https://s21-kling.klingai.com/....mp3", "status": 99, "duration": 195621, "status_name": "succeed", "status_final": true } ``` **400** **400 Bad Request** ```json { "error": "" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` Field `resource` will contain URL with generated mp3 audio file. ##### Model ```typescript { // TypeScript, all fields are optional resource: string // URL to the generated MP3 audio file status: number // Status code, e.g., 99 for succeed duration: number // Duration, seconds status_name: 'submitted' | 'failed' | 'processing' | 'succeed' // Status name status_final: boolean // Whether this is the final status message: string error: string } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/tts/create" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{"email":"user@example.com","speakerId":"speakerId","text":"Hello, world!"}' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/tts/create"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, speakerId: "speakerId", text: "Hello, world!" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/tts/create" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "speakerId": "speakerId", "text": "Hello, world!" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-add-sound === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-add-sound --- layout: default title: POST videos/add-sound description: "Add AI-generated sound to an existing Kling video (3–20 seconds long) via POST videos/add-sound in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 385 --- ## Add sound to Kling video August 8, 2025 (October 1, 2025) --- This endpoint generates sound for an existing video using Kling's AI audio generation capabilities. Video can't be shorter than 3 seconds or longer than 20 seconds. > **https://api.useapi.net/v1/kling/videos/add-sound** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ``` json { "video": "https://s21-kling.klingai.com/....mp4", "replyUrl": "https://my.domain.com/webhook-endpoint-kling", "replyRef": "my-id-1234" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `video` is **required**, the URL of the video to add sound to. Video can be uploaded using [POST /assets](/docs/api-kling-v1/post-kling-assets) and the returned URL can be used here. Video can't be shorter than 3 seconds or longer than 20 seconds. - `cropVideoOriginalSound` is optional, whether to preserve the original video's sound. Default `false` (original sound will be replaced). - `maxJobs` is optional, the maximum number of concurrent Kling jobs. - `replyUrl` is optional, a URL to receive webhooks when the video is completed. Callback body has the same JSON shape as [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id) response. - `replyRef` is optional, include a custom reference to identify the job. Passed as-is to the `replyUrl` webhook. ##### Responses **200** **200 OK** ```json { "task": { "id": 1234567890, "userId": 12345, "type": "kwave_video2audio", "scene": "NORMAL_CREATION", "status": 5, "taskInfo": { "type": "kwave_video2audio", "inputs": [ { "name": "video", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://v15-kling.klingai.com/…", "cover": null, "fromWorkId": null, "fromUploadId": null } ], "arguments": [ { "name": "biz", "value": "klingai" }, { "name": "imageCount", "value": "1" }, { "name": "duration", "value": "20" } ], "extraArgs": {}, "callbackPayloads": [ { "name": "video2audio_payloads", "resources": [ { "name": "originalVideoUrl", "type": "VIDEO", "url": "https://v15-kling.klingai.com/…" } ], "arguments": [ { "name": "cropVideoOriginalSound", "value": "false" } ] } ], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1754630611379, "updateTime": 1754630611379, "viewTime": 0, "status_name": "submitted", "status_final": false }, "works": [], "status": 5, "message": "", "limitation": null, "userPoints": { "points": [ { "orderId": "1234567890", "type": "reward", "amount": 26600, "balance": 3150, "startTime": 1754406534079, "endTime": 1757084934079 } ], "total": 113390 }, "userTickets": { "ticket": [ { "orderId": "1234456789", "type": "priority", "packageType": "reward", "amount": 1, "balance": 1, "startTime": 1754406534079, "endTime": 1757084934079 } ] }, "editProject": null, "status_name": "submitted", "status_final": false } ``` **400** **400 Bad Request** ```json { "error": "Invalid video URL format" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Kling was unable to locate one of the referenced assets. Make sure to use [POST /assets](/docs/api-kling-v1/post-kling-assets) to upload assets. ```json { "error": "Sorry, the requested resource was not found (VALID.ResourceNotFound)", "message": "Not Found" } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` When successful, the response includes a task ID which can be used to check the status using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number // Unique task identifier userId: number // User ID type: string // Task type: "kwave_video2audio" scene: string // Scene type: "NORMAL_CREATION" status: number // Task status taskInfo: { type: string // Task type inputs: { name: string // Input name: "video" inputType: string // Input type: "URL" token: string | null blobStorage: string | null url: string // Video URL cover: string | null fromWorkId: number | null fromUploadId: number | null }[] arguments: { name: string // Argument name value: string // Argument value }[] extraArgs: Record callbackPayloads: { name: string // "video2audio_payloads" resources: { name: string // "originalVideoUrl" type: string // "VIDEO" url: string // Original video URL marginTop?: number countInRow?: number mode?: string }[] arguments: { name: string // Parameter name value: string // Parameter value }[] }[] scene: string // Scene type } favored: boolean deleted: boolean viewed: boolean createTime: number // Creation timestamp updateTime: number // Update timestamp viewTime: number // View timestamp status_name: string // Status name: "submitted" status_final: boolean // Whether status is final } works: any[] // Work items (empty initially) status: number // Overall status message: string // Status message error: string limitation: any | null // Rate limiting info userPoints: { points: { orderId: string // Order ID type: string // Point type amount: number // Point amount balance: number // Remaining balance startTime: number // Start timestamp endTime: number // End timestamp }[] total: number // Total points } userTickets: { ticket: { orderId: string // Order ID type: string // Ticket type packageType: string // Package type amount: number // Ticket amount balance: number // Remaining balance startTime: number // Start timestamp endTime: number // End timestamp }[] } editProject: any | null // Edit project info status_name: string // Status name status_final: boolean // Whether status is final } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/kling/videos/add-sound" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "email": "user@domain.com", "video": "https://s21-kling.klingai.com/....mp4", "replyUrl": "https://my.domain.com/webhook-endpoint-kling" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const requestData = { email, video: "https://s21-kling.klingai.com/....mp4", replyUrl: "https://my.domain.com/webhook-endpoint-kling" }; const response = await fetch("https://api.useapi.net/v1/kling/videos/add-sound", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify(requestData) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" request_data = { "email": email, "video": "https://s21-kling.klingai.com/....mp4", "replyUrl": "https://my.domain.com/webhook-endpoint-kling" } headers = { "Content-Type": "application/json", "Authorization": f"Bearer {token}" } response = requests.post("https://api.useapi.net/v1/kling/videos/add-sound", headers=headers, json=request_data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-extend === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-extend --- layout: default title: POST videos/extend description: "Extend a previously generated Kling video, continuing its animation from where it left off, via POST videos/extend in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 370 --- ## Extend an Existing Video April 18, 2025 (October 1, 2025) --- This endpoint extends a previously generated video, continuing the animation from where it left off. > **https://api.useapi.net/v1/kling/videos/extend** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "task_id": "12345678", "prompt": "Continue with the mountain landscape, now showing a sunset", "negative_prompt": "people, low quality, distorted", "cfg_scale": 0.5, "replyUrl": "https://your-callback-url.com/webhook", "replyRef": "your-reference-id" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `task_id` is **required**, the ID of a completed video generation task to extend. You can get a list of your tasks from [GET /tasks](/docs/api-kling-v1/get-kling-tasks). - `prompt` is optional, text description to guide the extended video generation. Maximum length: 2500 characters. - `negative_prompt` is optional, what not to include in the generated video. Maximum length: 2500 characters. - `cfg_scale` is optional, guidance scale for video extension. Range: `0` to `1`. Default: `0.5`. - `enable_audio` is optional, add sound effects. Supported values: `false` (default) or `true`. - `maxJobs` is optional, range from `1` to `50`. Specifies the maximum number of concurrent jobs. - `replyUrl` is optional, a callback URL to receive generation progress and result. See [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id#model) for response model. - `replyRef` is optional, a reference identifier for the callback. **Note:** The task specified by `task_id` must be in the `succeed` status for the extension to work. ##### Responses **200** **200 OK** ```json { "task": { "id": 123456789, "userId": 12345, "type": "m2v_extend_video", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "m2v_extend_video", "inputs": [ { "name": "input", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://s21-kling.klingai.com/video12345.mp4", "cover": null, "fromWorkId": 12345678 } ], "arguments": [ { "name": "prompt", "value": "Continue with the mountain landscape, now showing a sunset" }, { "name": "negative_prompt", "value": "people, low quality, distorted" }, { "name": "cfg", "value": "0.5" }, { "name": "__initialType", "value": "m2v_txt2video_hq" }, { "name": "__initialPrompt", "value": "A majestic mountain landscape with snow-capped peaks and flowing rivers" }, { "name": "kling_version", "value": "1.6" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1745376611075, "updateTime": 1745376611075 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "", "limitation": { "type": "m2v_extend_video", "remaining": 10000, "limit": 10000 }, "userPoints": { "points": [], "total": 0 }, "userTickets": { "ticket": [] }, "editProject": null } ``` **400** **400 Bad Request** ```json { "error": "Task is not completed" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` When successful, the response includes a task ID which can be used to check the status using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number userId: number type: string scene: string status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean taskInfo: { type: string inputs: Array<{ name: string inputType: string token: string | null blobStorage: any | null url: string cover: string | null fromWorkId: number | null }> arguments: Array<{ name: string value: string }> extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } works: Array status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean message: string error: string limitation: { type: string remaining: number limit: number } userPoints: { points: Array<{ orderId: string type: string amount: number balance: number startTime: number endTime: number }> total: number } userTickets: { ticket: Array<{ orderId: string type: string packageType: string amount: number balance: number startTime: number endTime: number }> } editProject: any | null } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/videos/extend" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "email": "user@example.com", "task_id": "12345678", "prompt": "Continue with the mountain landscape, now showing a sunset", "negative_prompt": "people, low quality, distorted" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/videos/extend"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, task_id: "12345678", prompt: "Continue with the mountain landscape, now showing a sunset", negative_prompt: "people, low quality, distorted" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/videos/extend" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "task_id": "12345678", "prompt": "Continue with the mountain landscape, now showing a sunset", "negative_prompt": "people, low quality, distorted" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-image2video-effects === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-image2video-effects --- layout: default title: POST …/image2video-effects description: "Animate an image using a special effect preset via POST videos/image2video-effects in the useapi.net Kling API v1 — browse available effects with GET videos/effects." parent: Kling API v1 nav_order: 360 --- ## Create Video From Image with Effects April 18, 2025 (October 1, 2025) --- This endpoint generates a video from an image using special effects. > **https://api.useapi.net/v1/kling/videos/image2video-effects** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "effect": "rocket", "image": "https://example.com/image.jpg", "prompt": "A detailed description for the effect", "mode": "std", "replyUrl": "https://your-callback-url.com/webhook", "replyRef": "your-reference-id" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `effect` is **required**, the name of the effect to apply. Get available effects from [GET /videos/effects](/docs/api-kling-v1/get-kling-videos-effects). - `image` is **required**, URL to the image to animate. Image can be uploaded using [POST /assets](/docs/api-kling-v1/post-kling-assets) and the returned URLs can be used here. - `prompt` is optional, text description to guide the effect. Some effects support custom prompts while others use default prompts. Maximum length: 2500 characters. - `mode` is optional, generation quality mode. Accepted values: `std` (standard), `pro` (professional). Defaults to `std`. Not all effects support all modes - check the effect details from [GET /videos/effects](/docs/api-kling-v1/get-kling-videos-effects). - `maxJobs` is optional, range from `1` to `50`. Specifies the maximum number of concurrent jobs. - `replyUrl` is optional, a callback URL to receive generation progress and result. See [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id#model) for response model. - `replyRef` is optional, a reference identifier for the callback. **Notes:** - Different effects have different capabilities. Check the response from [GET /videos/effects](/docs/api-kling-v1/get-kling-videos-effects) to see if an effect supports custom prompts and which modes are available. - Effects marked as `effectSupported: false` require image preprocessing and are not yet supported. - Effects with `promptSupported: true` accept custom prompts, while others use built-in default prompts. - The `mode` parameter allows selection between standard and professional quality where supported. ##### Responses **200** **200 OK** ```json { "task": { "id": 123456789, "userId": 12345, "type": "m2v_img2video_se_hq", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "m2v_img2video_se_hq", "inputs": [ { "name": "input", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/image.jpg", "cover": null, "fromWorkId": null, "fromUploadId": null } ], "arguments": [ { "name": "special_effect", "value": "expansion" }, { "name": "prompt", "value": "A detailed description for the effect" }, { "name": "kling_version", "value": "1.6" }, { "name": "model_mode", "value": "std" }, { "name": "seStepName", "value": "seSubmit" }, { "name": "biz", "value": "klingai" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1753424884354, "updateTime": 1753424884354, "viewTime": 0 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "", "limitation": null, "userPoints": { "points": [ { "orderId": "…", "type": "recharge", "amount": 66000, "balance": 25540, "startTime": 1752894669788, "endTime": 1815966669788 } ], "total": 25540 }, "userTickets": { "ticket": [ { "orderId": "…", "type": "priority", "packageType": "reward", "amount": 1, "balance": 1, "startTime": 1751329144926, "endTime": 1754007544926 } ] }, "editProject": null } ``` **400** **400 Bad Request** ```json { "error": "Effect rocket not found. Supported effects: cartoon,cyberpunk,spinoff" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Kling was unable to locate one of the referenced assets. Make sure to use [POST /assets](/docs/api-kling-v1/post-kling-assets) to upload assets. ```json { "error": "Sorry, the requested resource was not found (VALID.ResourceNotFound)", "message": "Not Found" } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` When successful, the response includes a task ID which can be used to check the status using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number userId: number type: string scene: string status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean taskInfo: { type: string inputs: Array<{ name: string inputType: string token: string | null blobStorage: any | null url: string cover: string | null fromWorkId: number | null }> arguments: Array<{ name: string value: string }> extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } works: Array status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean message: string error: string limitation: { type: string remaining: number limit: number } userPoints: { points: Array<{ orderId: string type: string amount: number balance: number startTime: number endTime: number }> total: number } userTickets: { ticket: Array<{ orderId: string type: string packageType: string amount: number balance: number startTime: number endTime: number }> } editProject: any | null } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/videos/image2video-effects" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "email": "user@example.com", "effect": "rocket", "image": "https://example.com/image.jpg" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/videos/image2video-effects"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, effect: "rocket", image: "https://example.com/image.jpg" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/videos/image2video-effects" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "effect": "rocket", "image": "https://example.com/image.jpg" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-image2video-elements === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-image2video-elements --- layout: default title: POST …/image2video-elements description: "Create a Kling video from image or element references via POST videos/image2video-elements in the useapi.net Kling API v1 — v3.0 supports up to 3 combined refs, v1.6 up to 4 images." parent: Kling API v1 nav_order: 350 --- ## Create Video From Multiple Images April 18, 2025 (April 24, 2026) --- This endpoint generates a video from multiple images (up to 4) that will appear as elements in the video. Model `3.0` additionally supports saved [elements](/docs/api-kling-v1/get-kling-elements) via `element_1`-`element_3` parameters, with a combined maximum of 3 images/elements. ##### Model Support Matrix | Feature | v3.0 | v1.6 | |---------|:----:|:----:| | Image inputs (`image_0`-`image_3`) | ✅ | ✅ | | Element inputs (`element_1`-`element_3`) | ✅ | ❌ | | Max combined inputs | 3 | 4 | | Duration | 3-15s | 5/10s | | Audio | Always on | Optional | | aspect_ratio | ❌ (from image) | ✅ | > **https://api.useapi.net/v1/kling/videos/image2video-elements** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "prompt": "A museum gallery with artwork on display", "image_0": "https://example.com/image1.jpg", "image_1": "https://example.com/image2.jpg", "image_2": "https://example.com/image3.jpg", "image_3": "https://example.com/image4.jpg", "negative_prompt": "low quality, blurry, distorted", "duration": "5", "aspect_ratio": "16:9", "model_name": "kling-v1-6", "mode": "std", "replyUrl": "https://your-callback-url.com/webhook", "replyRef": "your-reference-id" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `prompt` is **required**, text description of the video to generate. Maximum length: 2500 characters. - `image_0` to `image_3` are URLs to images that will appear in the video. At least one image or element must be provided. Images can be uploaded using [POST /assets](/docs/api-kling-v1/post-kling-assets) and the returned URLs can be used here. - `element_1` to `element_3` are optional, IDs of saved [elements](/docs/api-kling-v1/get-kling-elements). Model `3.0` only. Create elements using [POST /elements](/docs/api-kling-v1/post-kling-elements). Combined total of images + elements cannot exceed 3 for model `3.0`. - `negative_prompt` is optional, what not to include in the generated video. Maximum length: 2500 characters. - `duration` is optional, length of the video in seconds. Model `3.0`: `3` to `15` seconds (default `5`). Model `1.6`: `5` (default) or `10`. - `aspect_ratio` is optional, the video aspect ratio. Supported values: `16:9` (default), `9:16`, `1:1`. Model `3.0` does not support this parameter (aspect ratio is derived from input image). - `model_name` is optional, the AI model version to use. Supported values: `kling-v3-0`, `kling-v1-6` (default). - `mode` is optional, quality level. Supported values: `std` (standard, default), `pro` (higher quality, slower generation), or `4k` (4K resolution, model `3.0` only). - `enable_audio` is optional, add sound effects. Supported values: `false` (default) or `true`. Model `3.0` defaults to audio enabled; set `enable_audio: false` to disable. - `maxJobs` is optional, range from `1` to `50`. Specifies the maximum number of concurrent jobs. - `replyUrl` is optional, a callback URL to receive generation progress and result. See [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id#model) for response model. - `replyRef` is optional, a reference identifier for the callback. **Note:** At least one image or element must be provided. For model `1.6`, at least one of `image_0`-`image_3` is required. For model `3.0`, elements (`element_1`-`element_3`) alone are also sufficient. ##### Responses **200** **200 OK** ```json { "task": { "id": 123456789, "userId": 12345, "type": "m2v_img2video_hq", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "m2v_img2video_hq", "inputs": [ { "name": "ref_img_0", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/image1.jpg", "cover": null, "fromWorkId": null }, { "name": "raw_ref_img_0", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/image1.jpg", "cover": null, "fromWorkId": null }, { "name": "ref_img_1", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/image2.jpg", "cover": null, "fromWorkId": null }, { "name": "raw_ref_img_1", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/image2.jpg", "cover": null, "fromWorkId": null } ], "arguments": [ { "name": "prompt", "value": "A museum gallery with artwork on display" }, { "name": "negative_prompt", "value": "low quality, blurry, distorted" }, { "name": "duration", "value": "5" }, { "name": "aspect_ratio", "value": "16:9" }, { "name": "kling_version", "value": "1.6" }, { "name": "imageList", "value": "[{\"top\":0,\"left\":0,\"width\":1,\"height\":1},{\"top\":0,\"left\":0,\"width\":1,\"height\":1}]" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1745376611075, "updateTime": 1745376611075 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "", "limitation": { "type": "m2v_img2video_hq", "remaining": 10000, "limit": 10000 }, "userPoints": { "points": [], "total": 0 }, "userTickets": { "ticket": [] }, "editProject": null } ``` **400** **400 Bad Request** ```json { "error": "At least one image (image_0, image_1, image_2 or image_3) is required" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Kling was unable to locate one of the referenced assets. Make sure to use [POST /assets](/docs/api-kling-v1/post-kling-assets) to upload assets. ```json { "error": "Sorry, the requested resource was not found (VALID.ResourceNotFound)", "message": "Not Found" } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` When successful, the response includes a task ID which can be used to check the status using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number userId: number type: string scene: string status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean taskInfo: { type: string inputs: Array<{ name: string inputType: string token: string | null blobStorage: any | null url: string cover: string | null fromWorkId: number | null }> arguments: Array<{ name: string value: string }> extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } works: Array status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean message: string error: string limitation: { type: string remaining: number limit: number } userPoints: { points: Array<{ orderId: string type: string amount: number balance: number startTime: number endTime: number }> total: number } userTickets: { ticket: Array<{ orderId: string type: string packageType: string amount: number balance: number startTime: number endTime: number }> } editProject: any | null } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/videos/image2video-elements" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "email": "user@example.com", "prompt": "A museum gallery with artwork on display", "image_0": "https://example.com/image1.jpg", "image_1": "https://example.com/image2.jpg", "negative_prompt": "low quality, blurry, distorted" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/videos/image2video-elements"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, prompt: "A museum gallery with artwork on display", image_0: "https://example.com/image1.jpg", image_1: "https://example.com/image2.jpg", negative_prompt: "low quality, blurry, distorted" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/videos/image2video-elements" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "prompt": "A museum gallery with artwork on display", "image_0": "https://example.com/image1.jpg", "image_1": "https://example.com/image2.jpg", "negative_prompt": "low quality, blurry, distorted" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-image2video-frames === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-image2video-frames --- layout: default title: POST …/image2video-frames description: "Generate a Kling video from one or two frame images via POST videos/image2video-frames in the useapi.net Kling API v1 — models v3.0, v3.0 Turbo, v2.6, v2.5, v2.1, and v1.6." parent: Kling API v1 nav_order: 340 --- ## Create Video From Image Frames April 18, 2025 (August 13, 2026) --- This endpoint generates a video from one or two images (start and end frames). | Model | Start
Frame | End
Frame | Elements | Audio | Multi-
shot | |-------|:--:|:--:|:--:|:--:|:--:| | kling-v3-0 | ✅
Required | ✅ | ✅
Up to 3 | ✅
default on | ✅ | | kling-v3-0-turbo | ✅
Required | ❌ | ❌ | ✅
always on | ❌ | | kling-v2-6 | ✅
Required | ✅ | ❌ | ✅
Native
(Pro) | ❌ | | kling-v2-5 | ✅
Required | ✅ | ❌ | ✅
SFX | ❌ | | kling-v2-1 | ✅
Required | ✅ | ❌ | ✅
SFX | ❌ | | kling-v2-1-master | ✅
Required | ❌ | ❌ | ✅
SFX | ❌ | | kling-v1-6 | ✅ | ✅ | ❌ | ✅
SFX | ❌ | | kling-v1-5 | ✅ | ✅ | ❌ | ✅
SFX | ❌ | - **Duration**: `kling-v3-0` / `kling-v3-0-turbo` support 3–15s; all other models support 5s or 10s. - **SFX** = Sound Effects. - **Native** = Native Audio (model `2.6`, `pro` mode, start frame only). > **https://api.useapi.net/v1/kling/videos/image2video-frames** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "image": "https://example.com/start-image.jpg", "prompt": "A futuristic city with flying cars and tall buildings", "negative_prompt": "people, low quality, distorted", "duration": "10", "model_name": "kling-v2-5", "mode": "pro", "replyUrl": "https://your-callback-url.com/webhook", "replyRef": "your-reference-id" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `image` is required if `image_tail` is not provided. URL to the start frame image. Required for models `2.x`. Image can be uploaded using [POST /assets](/docs/api-kling-v1/post-kling-assets) and the returned URLs can be used here. - `image_tail` is required if `image` is not provided. URL to the end frame image. Model `2.1 Master` does not support this parameter. Image can be uploaded using [POST /assets](/docs/api-kling-v1/post-kling-assets) and the returned URLs can be used here. - `element_1`, `element_2`, `element_3` are optional, references to saved [elements](/docs/api-kling-v1/post-kling-elements) (e.g. `u_309377170505500`) used to guide the generation alongside the start/end frames. Up to 3 combined. Supported by model `3.0` only. - `prompt` is optional, text description to guide the video generation. Maximum length: 2500 characters. Cannot be used together with multi-shot parameters (`shot_N_prompt`/`shot_N_duration`). - `negative_prompt` is optional, what not to include in the generated video. Models `2.5`, `2.6`, and `3.0` do not support this parameter. Maximum length: 2500 characters. - `cfg_scale` is optional, guidance scale for image-to-video generation. Models `2.x` do not support this parameter. Range: `0` to `1`. Default: `0.5`. - `duration` is optional, length of the video in seconds. Cannot be used together with multi-shot parameters (`shot_N_prompt`/`shot_N_duration`). Model `3.0`: `3` to `15` seconds (default `5`). Other models: `5` (default) or `10`. - `model_name` is optional, the AI model version to use. Supported values: `kling-v3-0`, `kling-v3-0-turbo`, `kling-v2-6`, `kling-v2-5`, `kling-v2-1` (default), `kling-v2-1-master`, `kling-v1-6`, `kling-v1-5`. Models `3.0` and `3.0 Turbo` do not support `aspect_ratio` (derived from input image). Audio is enabled by default; set `enable_audio: false` to disable (model `3.0` only). Model `3.0 Turbo` (`kling-v3-0-turbo`) is a faster 3.0 variant: start frame only (no `image_tail`), `std`/`pro` modes (no `4k`), audio always on (`enable_audio` not supported), and no `element_N` references or multi-shot. - `mode` is optional, quality level. Model `2.1 Master` only supports `pro` mode. Supported values: `std` (standard, default), `pro` (higher quality, slower generation), or `4k` (4K resolution, model `3.0` only). Model `2.6` supports `std` and `pro`, but `pro` is required when `enable_audio` is `true`. Model `3.0` adds support for `4k`. Model `3.0 Turbo` supports `std` and `pro` only. - `enable_audio` is optional, add audio to the generated video. Supported values: `false` (default) or `true`. Model `3.0` defaults to audio enabled (including `4k`); set `enable_audio: false` to disable. Model `3.0 Turbo` always generates audio; this parameter is not supported. Model `2.6`: Native Audio (AI-generated audio synced with video), requires `mode: pro`, not available with End Frame. Other models: Sound Effects (basic audio generation). - `multi_shot` is optional, let the model cut the video into several shots on its own (model `3.0` only). Supported values: `false` (default) or `true`. You write one ordinary `prompt` and Kling decides where the cuts fall — use `shot_1_prompt` below instead when you want to direct each shot yourself. Ignored when `shot_1_prompt` is present — directing the shots yourself already turns multi-shot on. Only model `3.0` accepts this parameter. Every other model, including `3.0 Turbo`, rejects it outright — even `multi_shot: false`. - `shot_1_prompt` through `shot_6_prompt` are optional, per-shot text prompts for multi-shot storytelling (v3 only). Maximum length: 2500 characters per shot. Minimum 2 shots required. Cannot be used together with `prompt` or `duration`. - `shot_1_duration` through `shot_6_duration` are optional, per-shot duration in seconds. Each shot must have both prompt and duration. Total duration must be 3-15 seconds. Shots must be sequential with no gaps (e.g. `shot_1` + `shot_2`, not `shot_1` + `shot_3`). - `maxJobs` is optional, range from `1` to `50`. Specifies the maximum number of concurrent jobs. - `replyUrl` is optional, a callback URL to receive generation progress and result. See [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id#model) for response model. - `replyRef` is optional, a reference identifier for the callback. **Notes:** - At least one of `image` or `image_tail` must be provided. - If `image_tail` provided, the mode is automatically set to `pro` (models `2.x`). - Element references (`element_1`-`element_3`) require model `3.0`. - Model `3.0 Turbo` supports the start frame only — no end frame (`image_tail`), `element_N` references, or multi-shot. ##### Responses **200** **200 OK** ```json { "task": { "id": 123456789, "userId": 12345, "type": "m2v_img2video_hq", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "m2v_img2video_hq", "inputs": [ { "name": "input", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/start-image.jpg", "cover": null, "fromWorkId": null }, { "name": "tail_image", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/end-image.jpg", "cover": null, "fromWorkId": null } ], "arguments": [ { "name": "prompt", "value": "A futuristic city with flying cars and tall buildings" }, { "name": "negative_prompt", "value": "people, low quality, distorted" }, { "name": "duration", "value": "5" }, { "name": "kling_version", "value": "2.1" }, { "name": "tail_image_enabled", "value": "true" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1745376611075, "updateTime": 1745376611075 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "", "limitation": { "type": "m2v_img2video_hq", "remaining": 10000, "limit": 10000 }, "userPoints": { "points": [], "total": 0 }, "userTickets": { "ticket": [] }, "editProject": null } ``` **400** **400 Bad Request** ```json { "error": "image or image_tail is required" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Kling was unable to locate one of the referenced assets. Make sure to use [POST /assets](/docs/api-kling-v1/post-kling-assets) to upload assets. ```json { "error": "Sorry, the requested resource was not found (VALID.ResourceNotFound)", "message": "Not Found" } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` When successful, the response includes a task ID which can be used to check the status using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number userId: number type: string scene: string status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean taskInfo: { type: string inputs: Array<{ name: string inputType: string token: string | null blobStorage: any | null url: string cover: string | null fromWorkId: number | null }> arguments: Array<{ name: string value: string }> extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } works: Array status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean message: string error: string limitation: { type: string remaining: number limit: number } userPoints: { points: Array<{ orderId: string type: string amount: number balance: number startTime: number endTime: number }> total: number } userTickets: { ticket: Array<{ orderId: string type: string packageType: string amount: number balance: number startTime: number endTime: number }> } editProject: any | null } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/videos/image2video-frames" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "email": "user@example.com", "image": "https://example.com/start-image.jpg", "image_tail": "https://example.com/end-image.jpg", "prompt": "A futuristic city with flying cars and tall buildings", "negative_prompt": "people, low quality, distorted" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/videos/image2video-frames"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, image: "https://example.com/start-image.jpg", image_tail: "https://example.com/end-image.jpg", prompt: "A futuristic city with flying cars and tall buildings", negative_prompt: "people, low quality, distorted" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/videos/image2video-frames" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "image": "https://example.com/start-image.jpg", "image_tail": "https://example.com/end-image.jpg", "prompt": "A futuristic city with flying cars and tall buildings", "negative_prompt": "people, low quality, distorted" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-lipsync === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-lipsync --- layout: default title: POST videos/lipsync description: "Sync character lips to an audio file in a Kling video (max 60 seconds) via POST videos/lipsync in the useapi.net Kling API v1." parent: Kling API v1 nav_order: 380 --- ## Apply Lip Sync to Video April 18, 2025 (October 1, 2025) --- This endpoint applies lip sync to a video using an audio file, making the character in the video appear to speak the audio. Video cannot be longer than 60 seconds. We suggest using PixVerse Lip Sync [POST pixverse/videos/lipsync](/docs/api-pixverse-v2/post-pixverse-videos-lipsync) for longer videos. PixVerse can lip sync videos over 60 seconds long and has much more relaxed requirements for character face visibility. > **https://api.useapi.net/v1/kling/videos/lipsync** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "video": "https://example.com/video.mp4", "audio": "https://example.com/audio.mp3", "replyUrl": "https://your-callback-url.com/webhook", "replyRef": "your-reference-id" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `video` is **required**, URL to the video that contains a face to sync with. Video cannot be longer than 60 seconds. Video can be uploaded using [POST /assets](/docs/api-kling-v1/post-kling-assets) and the returned URL can be used here. - `audio` is **required**, URL to the audio file containing speech. Audio can be uploaded using [POST /assets](/docs/api-kling-v1/post-kling-assets) and the returned URL can be used here. - `maxJobs` is optional, range from `1` to `50`. Specifies the maximum number of concurrent jobs. - `replyUrl` is optional, a callback URL to receive generation progress and result. See [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id#model) for response model. - `replyRef` is optional, a reference identifier for the callback. **Notes:** - The video should contain a clear frontal view of a face with lip movements. - Supported audio formats include MP3, WAV, and other common audio formats. - If the audio is shorter than the video, the excess video will be muted. If it's longer, the excess audio will be discarded. ##### Responses **200** **200 OK** ```json { "task": { "id": 123456789, "userId": 12345, "type": "m2v_video_lip_sync", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "m2v_video_lip_sync", "inputs": [ { "name": "video", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/video.mp4", "cover": null, "fromWorkId": null }, { "name": "audio", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/audio.mp3", "cover": null, "fromWorkId": null } ], "arguments": [ { "name": "__filename", "value": "audio.mp3" }, { "name": "__isLocalAudio", "value": "true" }, { "name": "biz", "value": "klingai" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1745376611075, "updateTime": 1745376611075 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "", "limitation": { "type": "m2v_video_lip_sync", "remaining": 10000, "limit": 10000 }, "userPoints": { "points": [], "total": 0 }, "userTickets": { "ticket": [] }, "editProject": null } ``` **400** **400 Bad Request** ```json { "error": "Parameter video is required" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Kling was unable to locate one of the referenced assets. Make sure to use [POST /assets](/docs/api-kling-v1/post-kling-assets) to upload assets. ```json { "error": "Sorry, the requested resource was not found (VALID.ResourceNotFound)", "message": "Not Found" } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` When successful, the response includes a task ID which can be used to check the status using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number userId: number type: string scene: string status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean taskInfo: { type: string inputs: Array<{ name: string inputType: string token: string | null blobStorage: any | null url: string cover: string | null fromWorkId: number | null }> arguments: Array<{ name: string value: string }> extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } works: Array status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean message: string error: string limitation: { type: string remaining: number limit: number } userPoints: { points: Array<{ orderId: string type: string amount: number balance: number startTime: number endTime: number }> total: number } userTickets: { ticket: Array<{ orderId: string type: string packageType: string amount: number balance: number startTime: number endTime: number }> } editProject: any | null } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/videos/lipsync" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "email": "user@example.com", "video": "https://example.com/video.mp4", "audio": "https://example.com/audio.mp3" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/videos/lipsync"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, video: "https://example.com/video.mp4", audio: "https://example.com/audio.mp3" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/videos/lipsync" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "video": "https://example.com/video.mp4", "audio": "https://example.com/audio.mp3" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-motion-create === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-motion-create --- layout: default title: POST videos/motion-create description: "Transfer motion from a reference video onto a static image via POST videos/motion-create in the useapi.net Kling API v1 — Kling v3.0 and v2.6 motion control models." parent: Kling API v1 nav_order: 390 --- ## Create Video from Motion and Image October 7, 2025 (March 6, 2026) --- This endpoint applies motion from a reference video to a static image, creating an animated video where the character in the image performs the motion. Supports Kling v3.0 (default) and v2.6 motion control models. Optionally attach an element for improved character consistency. > **https://api.useapi.net/v1/kling/videos/motion-create** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "model_name": "kling-v3-0", "imageUrl": "https://example.com/person.jpg", "motionUrl": "https://example.com/dance-video.mp4", "prompt": "Person dancing energetically", "keepAudio": true, "motionDirection": "motion_direction", "mode": "std", "element_1": "u_123456789012345", "replyUrl": "https://your-callback-url.com/webhook", "replyRef": "your-reference-id" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `model_name` is optional, must be `kling-v3-0` or `kling-v2-6`. Selects the motion control model version. v3.0 provides upgraded motion capture with high facial consistency. Default: `kling-v3-0` - `imageUrl` is **required**, URL to the image containing the person. The person's body and pose should be clearly visible. Must be uploaded via [POST /assets](/docs/api-kling-v1/post-kling-assets) first - use the `url` field from the response. - `motionUrl` is **required**, URL to the motion reference video (3-30 seconds). The video provides the motion that will be applied to the person in the image. Use [GET /videos/motions](/docs/api-kling-v1/get-kling-videos-motions) to retrieve official Kling motions or your previously uploaded motions. To upload a new motion video, use [POST /assets](/docs/api-kling-v1/post-kling-assets) - use the `resourceUrl` field from the response. - `prompt` is optional, string up to 2500 characters. Text description to guide the video generation. - `keepAudio` is optional, boolean. When `true`, preserves the original audio from the motion video. Default: `false` - `motionDirection` is optional, must be `motion_direction` or `image_direction`. - `motion_direction` (default): The generated video follows the motion from the reference video - `image_direction`: The generated video follows the pose/direction from the source image - `mode` is optional, must be `std` or `pro`. Generation quality mode. Pro mode provides higher quality but costs more. Default: `std` - `element_1` is optional, a saved element ID (e.g., `u_123456789012345`) for improved character consistency. Only supported with `kling-v3-0`. Create elements using [POST /elements](/docs/api-kling-v1/post-kling-elements). The element's cover image is included in the generation inputs. - `maxJobs` is optional, range from `1` to `50`. Specifies the maximum number of concurrent jobs. - `replyUrl` is optional, a callback URL to receive generation progress and result. See [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id#model) for response model. - `replyRef` is optional, a reference identifier for the callback. **Notes:** - The image must contain at least one clearly visible person with detectable pose - The endpoint validates the image before processing - returns error if no character detected - Video duration is automatically detected from the motion video ##### Responses **200** **200 OK** ```json { "task": { "id": 299640525521807, "userId": 23555898, "type": "m2v_motion_control", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "m2v_motion_control", "inputs": [ { "name": "video", "inputType": "URL", "url": "https://example.com/dance-video.mp4", "cover": "" }, { "name": "image", "inputType": "URL", "url": "https://example.com/person.jpg" } ], "arguments": [ { "name": "biz", "value": "klingai" }, { "name": "prompt", "value": "Person dancing energetically" }, { "name": "duration", "value": 5.76 }, { "name": "imageCount", "value": 1 }, { "name": "kling_version", "value": "3.0" }, { "name": "keep_original_sound", "value": false }, { "name": "motion_direction", "value": "motion_direction" }, { "name": "model_mode", "value": "std" } ], "callbackPayloads": [ { "name": "motionFrom", "value": "LOCAL" } ] }, "createTime": 1767669665000, "updateTime": 1767669665000 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "" } ``` **400** **400 Bad Request** Image validation failed - no detectable character in image: ```json { "status": 1, "message": "MOTION.PIC_NOT_MATCHED" } ``` Missing required parameter: ```json { "error": "Parameter imageUrl is required" } ``` Insufficient credits: ```json { "error": { "type": "TASK.PointNotEnough", "detail": "Credit are insufficient, please top up and try again." } } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` When successful, the response includes a task ID which can be used to check the status using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number userId: number type: string // "m2v_motion_control" scene: string status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean taskInfo: { type: string inputs: Array<{ name: string inputType: string url: string cover?: string }> arguments: Array<{ name: string value: string | number | boolean }> callbackPayloads: Array<{ name: string value: string }> } createTime: number updateTime: number } works: Array status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean message: string error?: { type: string detail: string } } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/videos/motion-create" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "user@example.com", "model_name": "kling-v3-0", "imageUrl": "https://s15-kling.klingai.com/.../person.jpg", "motionUrl": "https://v15-kling.klingai.com/.../dance.mp4", "prompt": "Person dancing energetically", "keepAudio": true, "mode": "std", "element_1": "u_123456789012345" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/videos/motion-create"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, model_name: "kling-v3-0", imageUrl: "https://s15-kling.klingai.com/.../person.jpg", motionUrl: "https://v15-kling.klingai.com/.../dance.mp4", prompt: "Person dancing energetically", keepAudio: true, mode: "std", element_1: "u_123456789012345" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/videos/motion-create" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "model_name": "kling-v3-0", "imageUrl": "https://s15-kling.klingai.com/.../person.jpg", "motionUrl": "https://v15-kling.klingai.com/.../dance.mp4", "prompt": "Person dancing energetically", "keepAudio": True, "mode": "std", "element_1": "u_123456789012345" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-omni === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-omni --- layout: default title: POST videos/omni description: "Generate Kling Omni (O1 or v3) videos via POST videos/omni in the useapi.net Kling API v1 — text-to-video, frames, video reference, and video transform workflows." parent: Kling API v1 nav_order: 330 --- ## Generate Videos with Omni December 11, 2025 (August 13, 2026) --- This endpoint generates videos using Kling's Omni model (`O1` and `v3`). It supports multiple workflows for different use cases: - **Default workflow**: Text-to-video with optional image/element references - **Frames workflow**: Generate video between start and end frame images - **Video Reference workflow**: Use a reference video to guide generation style - **Video Transform workflow**: Transform/modify a reference video ##### Version Comparison | Feature | v3 | O1 | |---------|:--:|:--:| | Duration | 3-15s | 3-10s | | Multi-shot | ✅ | ❌ | | Native Audio | ✅ `enable_audio` (default on, no video) | ❌ | | Aspect Ratio | `16:9` (default), `9:16`, `1:1` | `16:9` (default), `9:16`, `1:1` | | Aspect Ratio `auto` | Frames workflow only | Frames workflow only | | VIDEO elements | ✅ | ❌ (IMAGE only) | > **https://api.useapi.net/v1/kling/videos/omni** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "prompt": "A woman @image_1 dancing elegantly in a ballroom", "duration": "5", "aspect_ratio": "16:9", "count": 1, "image_1": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `prompt` is **required** (unless using multi-shot), the text description of the video to generate. Maximum length: 1700 characters. Cannot be used together with multi-shot parameters (`shot_N_prompt`/`shot_N_duration`). Use `@image_1`, `@image_2`, etc. to reference images in your prompt. Use `@element_1`, `@element_2`, etc. (or `@object_1`, etc.) to reference saved elements. Use `@video_1` to reference a video in your prompt. - `omni_version` is optional, the Omni model version to use. Supported values: `o1`, `v3` (default). - `mode` is optional, the generation mode. Supported values: `std` (default), `pro`, or `4k` (4K resolution, `omni_version: v3` only). - `enable_audio` is optional, whether to generate native audio (a soundtrack) for the video. Default: `true`. Applies to `omni_version: v3` without a reference video. Set to `false` for a silent video, which uses the lower audio-off price tier. Not valid together with `video_1` (use `keep_audio` for video workflows) or with `omni_version: o1`. ###### Workflow Selection The workflow is automatically determined based on which inputs you provide: | Inputs Provided | Workflow | |-----------------|----------| | `frame_start` (with optional `frame_end`) | Frames | | `video_1` with `video_mode=transform` | Video Transform | | `video_1` with `video_mode=reference` (default) | Video Reference | | Images/elements only, or text-only | Default | ###### Default Workflow (Images/Elements) Use images and/or saved elements as references in your prompt. - `image_1` through `image_7` are optional, URLs of reference images. You can upload images using [POST /assets](/docs/api-kling-v1/post-kling-assets). Reference in prompt using `@image_1`, `@image_2`, etc. - `element_1` through `element_7` are optional, IDs of saved elements. Create elements using [POST /elements](/docs/api-kling-v1/post-kling-elements). Reference in prompt using `@element_1` or `@object_1`, etc. **Note:** Images and elements share the same pool of 7 slots. Combined total cannot exceed 7. ###### Frames Workflow Generate video that transitions between a start frame and optional end frame. - `frame_start` is required for frames workflow, URL of the start frame image. Internally mapped to `image_1`. - `frame_end` is optional, URL of the end frame image. Internally mapped to `image_2`. Cannot be used without `frame_start`. **Restrictions:** When using frames workflow, `image_N`, `element_N`, and `video_1` are not allowed. ###### Video Reference/Transform Workflow Use a reference video to guide generation or transform it directly. - `video_1` is optional, URL of a reference video. You can upload videos using [POST /assets](/docs/api-kling-v1/post-kling-assets). Reference in prompt using `@video_1`. Video must be 3-10 seconds long (O1) or 3-15 seconds (v3). - `video_mode` is optional, how to use the video reference. Supported values: `reference` (default), `transform`. - `reference`: Video guides the style/motion of generated content - `transform`: Video is directly transformed/modified - `keep_audio` is optional, whether to keep audio from the reference video. Default: `false`. Only applies when `video_1` is provided. **Note:** When using `video_1`, you can still include up to 4 images/elements (combined). ###### Duration Support Matrix Duration availability depends on the workflow, inputs, and version: | Scenario | O1 Durations | v3 Durations | Notes | |----------|-------------|--------------|-------| | Text-only (no inputs) | `5`, `10` | `3`-`15` | O1 restricted | | Single start frame only | `5`, `10` | `3`-`15` | O1 restricted | | Images/elements provided | `3`-`10` | `3`-`15` | Full range | | Both frames (start + end) | `3`-`10` | `3`-`15` | Full range | | With `video_1` | **Locked** to video length | **Locked** to video length | Cannot be changed | - `duration` is optional, the duration in seconds. Default: `5`. Cannot be used together with multi-shot parameters (`shot_N_prompt`/`shot_N_duration`). **VIP required** for durations `7`-`10` (O1) or `7`-`15` (v3). When `video_1` is provided, duration is auto-detected and cannot be overridden. ###### Aspect Ratio Support Matrix | Workflow | Allowed Values | Default | |----------|---------------|---------| | Default (text/images/elements) | `16:9`, `9:16`, `1:1` | `16:9` | | Frames workflow | `auto` only | `auto` | | Video Reference/Transform | `16:9`, `9:16`, `1:1` | `16:9` | - `aspect_ratio` is optional. When using `frame_start`, aspect ratio is always `auto` (derived from input). `auto` is NOT allowed for other workflows. ###### Input Limits Matrix | Workflow | Max Images | Max Elements | Max Combined | Max Video | |----------|------------|--------------|--------------|-----------| | Default | 7 | 7 | 7 | 0 | | Frames | 0 | 0 | 0 | 0 | | Video Reference | 4 | 4 | 4 | 1 | | Video Transform | 4 | 4 | 4 | 1 | ###### Multi-shot (v3 only) Split a video into multiple shots, each with its own prompt and duration. Useful for storytelling with scene transitions. Either hand the whole job to the model with `multi_shot`, or direct each shot yourself with `shot_1_prompt` and friends. - `multi_shot` is optional, let the model cut the video into several shots on its own. Supported values: `false` (default) or `true`. You write one ordinary `prompt` and Kling decides where the cuts fall. Ignored when `shot_1_prompt` is present — directing the shots yourself already turns multi-shot on. - `shot_1_prompt` through `shot_6_prompt` are optional, per-shot text prompts. Maximum length: 2500 characters per shot. Minimum 2 shots required. Cannot be used together with `prompt` or `duration`. Use `@image_1`, `@element_1`, etc. references within shot prompts. - `shot_1_duration` through `shot_6_duration` are optional, per-shot duration in seconds. Each shot must have both prompt and duration. Total duration must be 3-15 seconds. Shots must be sequential with no gaps (e.g. `shot_1` + `shot_2`, not `shot_1` + `shot_3`). ###### Other Parameters - `count` is optional, the number of videos to generate. Range: `1` to `4`. Default: `1`. **VIP required** for counts `2`-`4`. - `maxJobs` is optional, range from `1` to `50`. Specifies the maximum number of concurrent jobs. - `replyUrl` is optional, a callback URL to receive generation progress and result. See [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id#model) for response model. - `replyRef` is optional, a reference identifier for the callback. ##### Prompt Reference Syntax Reference your inputs in the prompt using these patterns: | Input Type | Prompt Syntax | Example | |------------|---------------|---------| | Images | `@image_1`, `@image_2`, ... | `"A woman @image_1 dancing..."` | | Elements | `@element_1` or `@object_1`, ... | `"Character @element_1 walks..."` | | Frames | `@image_1`, `@image_2` | `"Scene transitions from @image_1 to @image_2"` | | Video | `@video_1` | `"Scene like @video_1 but in winter"` | ##### Responses **200** **200 OK** ```json { "task": { "id": 123456789, "userId": 12345, "type": "m2v_omni_video", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "m2v_omni_video", "inputs": [ { "name": "image_1", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg", "cover": null, "fromWorkId": null } ], "arguments": [ { "name": "prompt", "value": "A woman Image1 dancing elegantly in a ballroom" }, { "name": "rich_prompt", "value": "A woman <<>> dancing elegantly in a ballroom" }, { "name": "kling_version", "value": "o1" }, { "name": "model_mode", "value": "pro" }, { "name": "duration", "value": "5" }, { "name": "aspect_ratio", "value": "16:9" }, { "name": "imageCount", "value": "1" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1733836800000, "updateTime": 1733836800000 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "", "limitation": { "type": "m2v_omni_video", "remaining": 10000, "limit": 10000 }, "userPoints": { "points": [], "total": 0 }, "userTickets": { "ticket": [] }, "editProject": null } ``` **400** **400 Bad Request** ```json { "error": "" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** ```json { "error": "" } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` When successful, the response includes a task ID which can be used to check the status using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number userId: number type: string scene: string status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean taskInfo: { type: string inputs: Array<{ name: string inputType: string token: string | null blobStorage: any | null url: string cover: string | null fromWorkId: number | null }> arguments: Array<{ name: string value: string }> extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } works: Array status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean message: string error: string limitation: { type: string remaining: number limit: number } userPoints: { points: Array<{ orderId: string type: string amount: number balance: number startTime: number endTime: number }> total: number } userTickets: { ticket: Array<{ orderId: string type: string packageType: string amount: number balance: number startTime: number endTime: number }> } editProject: any | null } ``` ##### Examples **Curl** ``` bash # Default workflow with image curl -X POST "https://api.useapi.net/v1/kling/videos/omni" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "user@example.com", "prompt": "A woman @image_1 dancing elegantly in a ballroom", "duration": "5", "aspect_ratio": "16:9", "image_1": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg" }' # Using saved element curl -X POST "https://api.useapi.net/v1/kling/videos/omni" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "user@example.com", "prompt": "Character @element_1 walking through a garden", "duration": "5", "element_1": "u_123456789012345" }' # Frames workflow curl -X POST "https://api.useapi.net/v1/kling/videos/omni" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "user@example.com", "prompt": "Smooth transition from @image_1 to @image_2", "duration": "5", "frame_start": "https://s21-kling.klingai.com/ai-platform/xxx/start.jpg", "frame_end": "https://s21-kling.klingai.com/ai-platform/xxx/end.jpg" }' # Video reference workflow curl -X POST "https://api.useapi.net/v1/kling/videos/omni" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "user@example.com", "prompt": "Scene like @video_1 but in a winter setting", "video_1": "https://s21-kling.klingai.com/ai-platform/xxx/reference.mp4", "video_mode": "reference" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/videos/omni"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, prompt: "Character @element_1 dancing elegantly", duration: "5", aspect_ratio: "16:9", element_1: "u_123456789012345" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/videos/omni" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "prompt": "Character @element_1 walking through garden", "duration": "5", "aspect_ratio": "16:9", "element_1": "u_123456789012345" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-text2video === Document URL: https://useapi.net/docs/api-kling-v1/post-kling-videos-text2video --- layout: default title: POST videos/text2video description: "Submit a text prompt to generate a Kling video via POST videos/text2video in the useapi.net Kling API v1 — v3.0, v3.0 Turbo, v2.6 native audio, and earlier models supported." parent: Kling API v1 nav_order: 330 --- ## Create Video From Text April 18, 2025 (August 13, 2026) --- This endpoint generates a video based on a text prompt. ##### Model Support Matrix | Feature | v3.0 | v3.0 Turbo | v2.6 | v2.5
v2.1 Master | v1.6
v1.5 | |---------|:----:|:----------:|:----:|:------------------:|:----:| | Duration | 3-15s | 3-15s | 5/10s | 5/10s | 5/10s | | Mode `std`
720p | ✅ | ✅ | ✅ | ❌ | ✅ | | Mode `pro`
1080p | ✅ | ✅ | ✅ | ✅ | ✅ | | Mode `4k`
4K | ✅ | ❌ | ❌ | ❌ | ❌ | | Audio | ✅
Default on | ✅
Always on | ✅
Native Audio
(Pro) | ✅
Sound Effects | ✅
Sound Effects | | Multi-shot | ✅ | ❌ | ❌ | ❌ | ❌ | | cfg_scale | ❌ | ❌ | ❌ | ❌ | ✅ | > **https://api.useapi.net/v1/kling/videos/text2video** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "email": "user@example.com", "prompt": "A majestic mountain landscape with snow-capped peaks and flowing rivers", "negative_prompt": "people, buildings, text, low quality", "duration": "10", "model_name": "kling-v2-1-master", "aspect_ratio": "16:9", "replyUrl": "https://your-callback-url.com/webhook", "replyRef": "your-reference-id" } ``` - `email` is optional when only one [account](/docs/api-kling-v1/get-kling-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `prompt` is **required** (unless using multi-shot), the text description of the video to generate. Maximum length: 2500 characters. Cannot be used together with multi-shot parameters (`shot_N_prompt`/`shot_N_duration`). - `negative_prompt` is optional, what not to include in the generated video. Models `2.5`, `2.6`, and `3.0` do not support this parameter. Maximum length: 2500 characters. - `cfg_scale` is optional, guidance scale for text-to-video generation. Models `2.x` do not support this parameter. Range: `0` to `1`. Default: `0.5`. - `duration` is optional, length of the video in seconds. Cannot be used together with multi-shot parameters (`shot_N_prompt`/`shot_N_duration`). Supported values depend on `model_name`: | Model | Supported Durations | |-------|-------------------| | kling-v3-0, kling-v3-0-turbo | `3`, `4`, `5` (default), `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` | | kling-v2-6, v2-5, v2-1-master, v1-6, v1-5 | `5` (default), `10` | - `model_name` is optional, the AI model version to use. Supported values: `kling-v3-0`, `kling-v3-0-turbo`, `kling-v2-6`, `kling-v2-5`, `kling-v2-1-master`, `kling-v1-6` (default), `kling-v1-5`. Model `3.0 Turbo` (`kling-v3-0-turbo`) is a faster 3.0 variant: `std`/`pro` modes (no `4k`), audio always on (`enable_audio` not supported), and no multi-shot. - `aspect_ratio` is optional, the video aspect ratio. Supported values: `16:9` (default), `9:16`, `1:1`. - `mode` is optional, quality level. Models `2.1 Master` and `2.5` only support `pro` mode. Supported values: `std` (standard, default), `pro` (higher quality, slower generation), or `4k` (4K resolution, model `3.0` only). Model `2.6` supports `std` and `pro`, but `pro` is required when `enable_audio` is `true`. Model `3.0` adds support for `4k`. Model `3.0 Turbo` supports `std` and `pro` only. - `enable_audio` is optional, add sound effects (Native Audio for models `2.6` and `3.0`). Supported values: `false` (default) or `true`. Model `2.6` with `enable_audio: true` requires `mode: pro`. Model `3.0` defaults to audio enabled; set `enable_audio: false` to disable. Model `3.0 Turbo` always generates audio; this parameter is not supported. - `multi_shot` is optional, let the model cut the video into several shots on its own (model `3.0` only). Supported values: `false` (default) or `true`. You write one ordinary `prompt` and Kling decides where the cuts fall — use `shot_1_prompt` below instead when you want to direct each shot yourself. Ignored when `shot_1_prompt` is present — directing the shots yourself already turns multi-shot on. Only model `3.0` accepts this parameter. Every other model, including `3.0 Turbo`, rejects it outright — even `multi_shot: false`. - `shot_1_prompt` through `shot_6_prompt` are optional, per-shot text prompts for multi-shot storytelling (v3 only). Maximum length: 2500 characters per shot. Minimum 2 shots required. Cannot be used together with `prompt` or `duration`. - `shot_1_duration` through `shot_6_duration` are optional, per-shot duration in seconds. Each shot must have both prompt and duration. Total duration must be 3-15 seconds. Shots must be sequential with no gaps (e.g. `shot_1` + `shot_2`, not `shot_1` + `shot_3`). - `maxJobs` is optional, range from `1` to `50`. Specifies the maximum number of concurrent jobs. - `replyUrl` is optional, a callback URL to receive generation progress and result. See [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id#model) for response model. - `replyRef` is optional, a reference identifier for the callback. ##### Responses **200** **200 OK** ```json { "task": { "id": 123456789, "userId": 12345, "type": "m2v_txt2video_hq", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "m2v_txt2video_hq", "inputs": [], "arguments": [ { "name": "prompt", "value": "A majestic mountain landscape with snow-capped peaks and flowing rivers" }, { "name": "negative_prompt", "value": "people, buildings, text, low quality" }, { "name": "cfg", "value": "0.5" }, { "name": "duration", "value": "5" }, { "name": "kling_version", "value": "1.6" }, { "name": "aspect_ratio", "value": "16:9" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1745376611075, "updateTime": 1745376611075 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "", "limitation": { "type": "m2v_txt2video_hq", "remaining": 10000, "limit": 10000 }, "userPoints": { "points": [], "total": 0 }, "userTickets": { "ticket": [] }, "editProject": null } ``` **400** **400 Bad Request** ```json { "error": "Parameter prompt is required" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **500** **500 Internal Server Error** Kling uses a `500` response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use the `error` field text and your best judgement to tell them apart, since the `message` field most often has very generic and perhaps misleading text. ```json { "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" } ``` When successful, the response includes a task ID which can be used to check the status using [GET /tasks/`task_id`](/docs/api-kling-v1/get-kling-tasks-task_id). ##### Model ```typescript { // TypeScript, all fields are optional task: { id: number userId: number type: string scene: string status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean taskInfo: { type: string inputs: Array<{ name: string inputType: string token: string | null blobStorage: any | null url: string cover: string | null fromWorkId: number | null }> arguments: Array<{ name: string value: string }> extraArgs: Record callbackPayloads: any[] scene: string } favored: boolean deleted: boolean viewed: boolean createTime: number updateTime: number viewTime: number } works: Array status: number status_name: 'submitted' | 'failed' | 'processing' | 'succeed' status_final: boolean message: string error: string limitation: { type: string remaining: number limit: number } userPoints: { points: Array<{ orderId: string type: string amount: number balance: number startTime: number endTime: number }> total: number } userTickets: { ticket: Array<{ orderId: string type: string packageType: string amount: number balance: number startTime: number endTime: number }> } editProject: any | null } ``` ##### Examples **Curl** ``` bash curl -X POST "https://api.useapi.net/v1/kling/videos/text2video" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "email": "user@example.com", "prompt": "A majestic mountain landscape with snow-capped peaks and flowing rivers", "negative_prompt": "people, buildings, text, low quality", "model_name": "kling-v1-6", "aspect_ratio": "16:9", "mode": "pro" }' ``` **JavaScript** ``` javascript const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/videos/text2video"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, prompt: "A majestic mountain landscape with snow-capped peaks and flowing rivers", negative_prompt: "people, buildings, text, low quality", model_name: "kling-v1-6", aspect_ratio: "16:9", mode: "pro" }) }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/videos/text2video" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "prompt": "A majestic mountain landscape with snow-capped peaks and flowing rivers", "negative_prompt": "people, buildings, text, low quality", "model_name": "kling-v1-6", "aspect_ratio": "16:9", "mode": "pro" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json()) ``` === Cross-reference: General Q&A === For cross-cutting tips (rate limiting, prompt moderation, common patterns) see https://useapi.net/assets/aibot/qa.txt WARNING: Q&A items are general-purpose and may reference deprecated APIs, sunsetted services, or scenarios not applicable to the API documented above. Cross-check against this service's endpoint documentation before applying any Q&A guidance.