Kling 2.1
Kuaishou Kling 2.1 video generation with standard, pro, and master tiers
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/generateTask/kling-2-1 | Create generation task |
| GET | /api/v1/statusTask/kling-2-1 | Query task status |
Authentication
All requests require an API Key in the header:
Request Body
Parameters
Parameter
Required
Default
Description
request_typestring—
asyncasync (polling) or callback (webhook)
callback_urlstring✱
—
Callback URL, required when request_type=callback
providerstring—
autoRouting strategy: auto, value, or official
inputobject✓
—
Model input parameters
Mode Options:
standard-image-to-video— Standard tier image-to-video, requires 1 imagepro-image-to-video— Pro tier image-to-video, supports 1-2 images (end frame)master-text-to-video— Master tier text-to-videomaster-image-to-video— Master tier image-to-video, requires 1 image
Example
Standard Image-to-Video
Pro Image-to-Video (with End Frame)
Master Text-to-Video
Response
POST /api/v1/generateTask/kling-2-1
Returns taskId on success for subsequent status queries.
Success:
Error:
GET /api/v1/statusTask/kling-2-1
Query task execution status and results via taskId.
Success:
Failed:
Status Response Fields
| Field | Type | Description |
|---|---|---|
taskId | string | Unique task identifier |
state | string | pending processing success failed |
resultJson | string | JSON containing resultUrls array (on success) |
failCode | string | Error code (on failure) |
failMsg | string | Error message (on failure) |
createTime | integer | Task creation timestamp (ms) |
completeTime | integer | Task completion timestamp (ms) |
costTime | integer | Processing duration (ms) |
Error Codes
| Code | Description |
|---|---|
| 400 | Invalid parameters or request error |
| 401 | Invalid or missing API Key |
| 429 | Rate limit exceeded |
| Fail Code | Description |
|---|---|
CONTENT_VIOLATION | Content violates safety guidelines |
INVALID_IMAGE_URL | Cannot access provided image URL |
Rate Limits
| Limit | Value |
|---|---|
| Requests | 10000 / minute |
| Concurrent tasks | 1000 |
Exceeding limits returns 429 error. Wait and retry.
Tips
- Generation time:
- 5-second video: ~60-90 seconds
- 10-second video: ~90-120 seconds
- Submit task, wait 60 seconds, then poll every 5 seconds
- Callback mode: Video generation takes time, strongly recommend using
callbackmode. - Video expiration: Result URLs are valid for 15 days. Download promptly.
- Content moderation: Prompts must comply with content safety guidelines.
- Tier selection:
standard: Best value, for batch generationpro: Supports start/end frame control, for precise creationmaster: Highest quality, for professional production
- End frame feature:
promode supports 2 images — first as start frame, second as end frame. - Negative prompt: Use
negative_promptto avoid unwanted elements. - CFG Scale:
- Higher values: Follows prompt more strictly, may lose creativity
- Lower values: More creative, may deviate from prompt
- Recommended: 0.3-0.7
- Image formats:
image_urlssupports JPG, PNG, WebP, max 10MB per image.