Kling Standard Video (Text/Image to Video)
Channel type: Kling Video (50) Gateway path:
POST/GET https://maasunion.com/kling/v1/standard/videos/{text2video|image2video}Official upstream:https://api.klingai.com(/v1/videos/text2video,/v1/videos/image2video)
Overview
The standard video endpoints cover Kling's traditional video models (1.0 ~ 3.0), distinguished by the model_name field, with identical endpoints and parameter-passing structures. They support text-to-video and image-to-video (including first & last frame).
For Omni models (O1 / V3 Omni), use the Omni Video endpoint; for 3.0 Turbo, use the Turbo endpoint.
Supported Models
| model_name | Supported capabilities |
|---|---|
kling-v3 | Text-to-Video, Image-to-Video |
kling-v2-6 | Text-to-Video, Image-to-Video |
kling-v2-5-turbo | Text-to-Video, Image-to-Video |
kling-v2-1-master | Image-to-Video |
kling-v2-1 | Image-to-Video |
kling-v2-master | Text-to-Video, Image-to-Video |
kling-v1-6 | Text-to-Video, Image-to-Video |
kling-v1-5 | Text-to-Video, Image-to-Video |
kling-v1 | Text-to-Video, Image-to-Video |
Authentication
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer {your_api_token} |
Content-Type | Required for POST | application/json |
Upstream authentication is handled automatically by the gateway; the client does not need to pass the Kling key.
Text-to-Video
POST https://maasunion.com/kling/v1/standard/videos/text2video
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model_name | string | Yes | Model name, see the table above |
prompt | string | Yes | Positive prompt |
negative_prompt | string | No | Negative prompt |
duration | string | No | Video duration (seconds): 5 / 10; some models support longer |
mode | string | No | Generation mode: std (720P) / pro (1080P) / 4k |
aspect_ratio | string | No | Aspect ratio: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9 |
sound | string | No | Whether to generate sound: on / off |
callback_url | string | No | Callback URL for task status changes |
external_task_id | string | No | Custom task ID (unique on the user side) |
cfg_scale | number | No | Prompt relevance, 0~1 |
callback_url | string | No | Callback URL |
Request Example
curl --request POST \
--url "https://maasunion.com/kling/v1/standard/videos/text2video" \
--header "Authorization: Bearer {your_api_token}" \
--header "Content-Type: application/json" \
--data '{
"model_name": "kling-v2-6",
"prompt": "一只猫在草地上奔跑",
"negative_prompt": "模糊, 变形",
"duration": "5",
"mode": "pro",
"aspect_ratio": "16:9",
"sound": "on"
}'Create Response
{
"code": 0,
"message": "string",
"request_id": "string",
"data": {
"task_id": "gateway_public_task_id",
"task_info": { "external_task_id": "string" },
"task_status": "submitted",
"created_at": 1722769557708,
"updated_at": 1722769557708
}
}| Field | Description |
|---|---|
code | Error code; 0 means success |
data.task_id | Gateway task ID, used for subsequent queries |
data.task_status | submitted / processing / succeed / failed |
Image-to-Video
POST https://maasunion.com/kling/v1/standard/videos/image2video
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model_name | string | Yes | Model name |
image | string | Conditional | First frame image URL or Base64 |
image_tail | string | Conditional | Last frame image URL or Base64 |
prompt | string | No | Prompt |
negative_prompt | string | No | Negative prompt |
duration | string | No | Video duration (seconds) |
mode | string | No | std / pro / 4k |
aspect_ratio | string | No | Aspect ratio |
sound | string | No | on / off |
callback_url | string | No | Callback URL |
external_task_id | string | No | Custom task ID |
At least one of
imageandimage_tailis required; choose one ofimage_tail,dynamic_masks/static_mask, orcamera_control.
Request Example
curl --request POST \
--url "https://maasunion.com/kling/v1/standard/videos/image2video" \
--header "Authorization: Bearer {your_api_token}" \
--header "Content-Type: application/json" \
--data '{
"model_name": "kling-v2-6",
"image": "https://example.com/start-frame.jpg",
"image_tail": "https://example.com/end-frame.jpg",
"prompt": "镜头向前推进",
"duration": "5",
"mode": "pro"
}'Optional Extended Parameters
| Parameter | Type | Description |
|---|---|---|
multi_shot | boolean | Multi-shot video; when true, prompt is invalid |
shot_type | string | Shot mode: customize / intelligence |
multi_prompt | array | [{index, prompt, duration}], required in customize mode |
element_list | array | [{element_id}] references subjects (Omni models) |
voice_list | array | [{voice_id}] references voices, specified in prompt with <<<voice_1>>> |
dynamic_masks / static_mask | object | Camera motion control |
camera_control | object | Camera control parameters |
Query Task
GET https://maasunion.com/kling/v1/standard/videos/text2video/{task_id}
GET https://maasunion.com/kling/v1/standard/videos/image2video/{task_id}
| Path parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | The data.task_id from the create task response |
Request Example
curl --request GET \
--url "https://maasunion.com/kling/v1/standard/videos/text2video/{task_id}" \
--header "Authorization: Bearer {your_api_token}"Query Response
{
"code": 0,
"message": "string",
"request_id": "string",
"data": {
"task_id": "gateway_public_task_id",
"task_status": "succeed",
"task_status_msg": "string",
"watermark_info": { "enabled": false },
"task_result": {
"videos": [
{
"id": "string",
"url": "string",
"watermark_url": "string",
"duration": "5"
}
]
},
"task_info": { "external_task_id": "string" },
"final_unit_deduction": "string",
"created_at": 1722769557708,
"updated_at": 1722769557708
}
}| Field | Description |
|---|---|
data.task_status | submitted / processing / succeed / failed |
data.task_status_msg | Reason shown on failure |
data.task_result.videos[].url | Video download URL (valid for about 30 days; please persist in time) |
data.task_result.videos[].watermark_url | Watermarked video URL |
data.final_unit_deduction | Number of credits deducted by the upstream |
Task Status
task_status | Meaning |
|---|---|
submitted | Submitted |
processing | Processing |
succeed | Succeeded |
failed | Failed |
Error Handling
When code != 0, the request failed; message / task_status_msg contains the specific reason. Common cases:
model_namenot passed or the model is not enabled on the gateway- Invalid token or insufficient balance
- Upstream parameter validation failed (e.g. neither
imagenorimage_tailwas passed) - Content moderation interception (see
task_status=failedandtask_status_msgwhen querying)
For more general information, see Kling Gateway Overview.
How is this guide?