Kling V2.1 API
Kling V2.1 API with VezAPI. Explore model capabilities, credit pricing, request parameters, and integration examples.
Kling V2.1 API documentation
Integrate Kling V2.1 with your VezAPI key. The operations below share the same authentication and account balance.
https://api.vezapi.comSend Authorization: Bearer YOUR_VEZAPI_KEY. Use a unique Idempotency-Key for each submission; reuse it only when checking the same request.
Kling V2.1 Master Image to Video
/api/v1/jobs/createTaskModel IDs: kling/v2-1-master-image-to-video
| Parameter | Type | Description & constraints |
|---|---|---|
modelrequired | string | The model name to use for generation. Required field. - Must be `kling/v2-1-master-image-to-video` for this endpoint Values: Default: |
callBackUrloptional | string | The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation |
inputoptional | object | Input parameters for the generation task |
input.promptrequired | string | The text prompt describing the video to generate (Max length: 5000 characters)
|
input.image_urlrequired | string | URL of the image to be used for the video (File URL after upload, not file content; Accepted types: image/jpeg, image/png; Max size: 10.0MB) |
input.durationrequired | string | Required. "5" or "10" (seconds). Values: |
input.negative_promptoptional | string | Negative prompt to exclude certain elements from the video (Max length: 500 characters)
|
input.cfg_scaleoptional | number | The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt (Min: 0, Max: 1, Step: 0.1) (step: 0.1) Default:
|
Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
-H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
-H 'Idempotency-Key: your-unique-request-id' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling/v2-1-master-image-to-video",
"input": {
"prompt": "A team of paratroopers descends into enemy territory, as they pass through clouds, the camera switches to a slow pan above the battlefield lighting up with",
"image_url": "https://example.com/input.png",
"duration": "5"
}
}'Responses and errors
HTTP 200
Request successful
| Parameter | Type | Description & constraints |
|---|---|---|
codeoptional | integer | Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying). Values: |
msgoptional | string | Response message, error description upon failure |
datarequired | object | |
data.taskIdrequired | string | The task ID can be used with the "Get Task Details" endpoint to query the task status. |
Kling V2.1 Master Text to Video
/api/v1/jobs/createTaskModel IDs: kling/v2-1-master-text-to-video
| Parameter | Type | Description & constraints |
|---|---|---|
modelrequired | string | The model name to use for generation. Required field. - Must be `kling/v2-1-master-text-to-video` for this endpoint Values: Default: |
callBackUrloptional | string | The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation |
inputoptional | object | Input parameters for the generation task |
input.promptrequired | string | The text prompt describing the video you want to generate (Max length: 5000 characters)
|
input.durationrequired | string | Required. "5" or "10" (seconds). Values: |
input.aspect_ratiooptional | string | The aspect ratio of the generated video frame Values: Default: |
input.negative_promptoptional | string | Elements to avoid in the generated video (Max length: 500 characters)
|
input.cfg_scaleoptional | number | The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt (Min: 0, Max: 1, Step: 0.1) (step: 0.1) Default:
|
Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
-H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
-H 'Idempotency-Key: your-unique-request-id' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling/v2-1-master-text-to-video",
"input": {
"prompt": "First-person view from a soldier jumping from a transport plane — the camera shakes with turbulence, oxygen mask reflections flicker — as the clouds part, the battlefield below pulses with anti-air fire and missile trails.",
"duration": "5",
"aspect_ratio": "16:9"
}
}'Responses and errors
HTTP 200
Request successful
| Parameter | Type | Description & constraints |
|---|---|---|
codeoptional | integer | Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying). Values: |
msgoptional | string | Response message, error description upon failure |
datarequired | object | |
data.taskIdrequired | string | The task ID can be used with the "Get Task Details" endpoint to query the task status. |
Kling V2.1 Pro
/api/v1/jobs/createTaskModel IDs: kling/v2-1-pro
| Parameter | Type | Description & constraints |
|---|---|---|
modelrequired | string | The model name to use for generation. Required field. - Must be `kling/v2-1-pro` for this endpoint Values: Default: |
callBackUrloptional | string | The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation |
inputoptional | object | Input parameters for the generation task |
input.promptrequired | string | Text prompt describing the video to generate (Max length: 5000 characters)
|
input.image_urlrequired | string | URL of the image to be used for the video (File URL after upload, not file content; Accepted types: image/jpeg, image/png; Max size: 10.0MB) |
input.durationrequired | string | Required. "5" or "10" (seconds). Values: |
input.negative_promptoptional | string | Terms to avoid in the generated video (Max length: 500 characters)
|
input.cfg_scaleoptional | number | The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt (Min: 0, Max: 1, Step: 0.1) (step: 0.1) Default:
|
input.tail_image_urloptional | string | URL of the image to be used for the end of the video (File URL after upload, not file content; Accepted types: image/jpeg, image/png; Max size: 10.0MB) |
Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
-H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
-H 'Idempotency-Key: your-unique-request-id' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling/v2-1-pro",
"input": {
"prompt": "POV shot of a gravity surfer diving between ancient ruins suspended midair, glowing moss lights the path, the board hisses as it carves through thin mist, echoes rise with speed ",
"image_url": "https://example.com/input.png",
"duration": "5"
}
}'Responses and errors
HTTP 200
Request successful
| Parameter | Type | Description & constraints |
|---|---|---|
codeoptional | integer | Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying). Values: |
msgoptional | string | Response message, error description upon failure |
datarequired | object | |
data.taskIdrequired | string | The task ID can be used with the "Get Task Details" endpoint to query the task status. |
Kling V2.1 Standard
/api/v1/jobs/createTaskModel IDs: kling/v2-1-standard
| Parameter | Type | Description & constraints |
|---|---|---|
modelrequired | string | The model name to use for generation. Required field. - Must be `kling/v2-1-standard` for this endpoint Values: Default: |
callBackUrloptional | string | The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - To ensure callback security, see [Webhook Verification Guide](/common-api/webhook-verification) for signature verification implementation |
inputoptional | object | Input parameters for the generation task |
input.promptrequired | string | Text prompt describing the desired video content (Max length: 5000 characters)
|
input.image_urlrequired | string | URL of the image to be used for the video (File URL after upload, not file content; Accepted types: image/jpeg, image/png; Max size: 10.0MB) |
input.durationrequired | string | Required. "5" or "10" (seconds). Values: |
input.negative_promptoptional | string | Description of elements to avoid in the generated video (Max length: 500 characters)
|
input.cfg_scaleoptional | number | The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt (Min: 0, Max: 1, Step: 0.1) (step: 0.1) Default:
|
Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
-H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
-H 'Idempotency-Key: your-unique-request-id' \
-H 'Content-Type: application/json' \
-d '{
"model": "kling/v2-1-standard",
"input": {
"prompt": "Begin with the uploaded image as the first frame. Gradually animate the scene: steam rises and drifts upward from the train; lantern lights flicker subtly; cloaked figures begin to move slowly — walking, turning, adjusting their belongings. Floating dust or magical particles catch the light. The text “KLING 2.1 STANDARD API — Now on Kie.ai” softly pulses with a golden glow. The camera pushes forward slightly, then slowly fades to black.",
"image_url": "https://example.com/input.png",
"duration": "5"
}
}'Responses and errors
HTTP 200
Request successful
| Parameter | Type | Description & constraints |
|---|---|---|
codeoptional | integer | Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying). Values: |
msgoptional | string | Response message, error description upon failure |
datarequired | object | |
data.taskIdrequired | string | The task ID can be used with the "Get Task Details" endpoint to query the task status. |
Task status and callbacks
For asynchronous tasks, keep the returned taskId. Query GET /api/v1/jobs/recordInfo?taskId=... or provide callBackUrl when creating the task. Only the account that created a task can access it or derive new resources from it.
A timeout can mean the submission was accepted. Inspect the existing request in your dashboard; do not create another task automatically. Callback delivery is retried and may arrive more than once. Deduplicate with X-VezAPI-Event-Id.
Files, logs and billing
Generated media normally follows a 14-day provider lifetime; uploaded files expire after 24 hours. Save the files you need before expiration. VezAPI streams registered files without keeping a permanent media library. Request logs are retained for two calendar months.
Credits are reserved before submission. Final deductions match actual discounted consumption one for one. Unknown usage pauses new paid requests. If available funds cannot cover final usage while protecting other reservations, settlement stays pending until funded; model usage cannot make the wallet negative. Time-based inputs require server-side metadata reads; a failed read prevents submission.
Send a request using your VezAPI key. Successful generations use your account credits.
/api/v1/jobs/createTaskYour response will appear here.
Kling V2.1 API pricing
Rates below are reference estimates; final deductions equal actual discounted consumption, one for one. At the standard pack rate, 1,000 credits ≈ $10. Larger packs reduce the effective credit price.
| Specification | Credits | Unit | USD reference |
|---|---|---|---|
| Kling 2.1, video-generation, Pro-10.0s | 176 | per video | $1.76 |
| Kling 2.1, text-to-video, Master-5.0s | 252 | per video | $2.52 |
| Kling 2.1, text-to-video, Master-10.0s | 504 | per video | $5.04 |
| Kling 2.1, video-generation, Standard-5.0s | 50.5 | per video | $0.505 |
| Kling 2.1, video-generation, Standard-10.0s | 101 | per video | $1.01 |
| Kling 2.1, video-generation, Pro-5.0s | 88 | per video | $0.88 |
| Kling 2.1, image-to-video, Master-5.0s | 252 | per video | $2.52 |
| Kling 2.1, image-to-video, Master-10.0s | 504 | per video | $5.04 |