Overview
Text-to-video and image-to-video generation with Kling. Recognized for smooth motion dynamics, scene consistency, and high visual fidelity.
Primary Endpoint
POST
/api/v1/klingVideo/startStart Kling video generation
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | No | Name of the video generation task |
| mode | enum: text-to-video | image-to-video | motion-control | Yes | Generation mode: text-to-video, image-to-video, or motion-control |
| prompt | string | Yes | Text prompt describing the desired video |
| version | enum: 2.6 | 3.0 | No | Kling model version. 2.6 supports 5s/10s, 3.0 supports 5s/10s/15s |
| model_version | enum: standard | fast | No | Kling 3.0 model variant. fast requires version=3.0, supports text-to-video/image-to-video, supports 3–15s, and uses resolution instead of quality_mode=4k. |
| resolution | enum: 720p | 1080p | No | Output resolution for model_version=fast |
| quality_mode | enum: std | pro | 4k | No | Quality mode. 4K is only available for Kling 3.0 text-to-video and image-to-video |
| duration | enum: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | No | Video duration in seconds. Kling 2.6 supports 5s/10s; Kling 3.0 supports 3–15s. |
| image_url | string | No | Input image URL (required for image-to-video and motion-control modes) |
| video_url | string | No | Input video URL (required for motion-control mode) |
| aspect_ratio | enum: 16:9 | 9:16 | 1:1 | No | Video aspect ratio (text-to-video mode only) |
| sound | boolean | No | Enable audio generation. For v2.6 only available in PRO mode (STD does not support sound). v3.0 supports sound in STD/PRO. 4K is billed as a separate quality tier. |
| end_image_url | string | No | End frame image URL (image-to-video + PRO mode only). Cannot be used with sound in v2.6 |
| character_orientation | enum: video | image | No | Character orientation for motion-control mode. 'image' limits duration to 3-10s, 'video' allows 3-30s |
| negative_prompt | string | No | Negative prompt to avoid certain elements |
| seed | number | No | Random seed for reproducibility |
| webhook_url | string | No | HTTPS URL to receive task.completed / task.failed notifications. Best-effort delivery, single attempt, no retries; clients should treat the detail API as the source of truth. |
| webhook_token | string | No | Optional plaintext token returned in the X-A2e-Webhook-Token header so receivers can verify the request originated from a2e. |
Request Example
curl -X POST "https://www.a2e.com.cn/api/v1/klingVideo/start" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My Kling Video",
"mode": "image-to-video",
"prompt": "A beautiful sunset over the ocean",
"version": "3.0",
"model_version": "fast",
"resolution": "720p",
"quality_mode": "std",
"duration": "5",
"image_url": "https://example.com/input.jpg",
"video_url": "https://example.com/input.mp4",
"aspect_ratio": "16:9",
"sound": false
}'Related Endpoints
POST
/api/v1/klingVideo/startStart Kling video generation
GET
/api/v1/klingVideo/allRecordsGet all Kling video records
POST
/api/v1/klingVideo/batchDetailBatch query task details
GET
/api/v1/klingVideo/{_id}Get Kling video detail
PUT
/api/v1/klingVideo/{_id}Update Kling video name
DELETE
/api/v1/klingVideo/{_id}Delete Kling video
Responses
200
Video generation task started successfully
400
Bad Request - Invalid parameters
401
Unauthorized - Invalid or missing bearer token