Developer Docs/Kling Video API

Kling Video API

Build Kling Video integrations with A2E. Review authentication, request parameters, task creation, status, and result endpoints.

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/start

Start Kling video generation

Request Parameters

NameTypeRequiredDescription
namestringNoName of the video generation task
modeenum: text-to-video | image-to-video | motion-controlYesGeneration mode: text-to-video, image-to-video, or motion-control
promptstringYesText prompt describing the desired video
versionenum: 2.6 | 3.0NoKling model version. 2.6 supports 5s/10s, 3.0 supports 5s/10s/15s
model_versionenum: standard | fastNoKling 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.
resolutionenum: 720p | 1080pNoOutput resolution for model_version=fast
quality_modeenum: std | pro | 4kNoQuality mode. 4K is only available for Kling 3.0 text-to-video and image-to-video
durationenum: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15NoVideo duration in seconds. Kling 2.6 supports 5s/10s; Kling 3.0 supports 3–15s.
image_urlstringNoInput image URL (required for image-to-video and motion-control modes)
video_urlstringNoInput video URL (required for motion-control mode)
aspect_ratioenum: 16:9 | 9:16 | 1:1NoVideo aspect ratio (text-to-video mode only)
soundbooleanNoEnable 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_urlstringNoEnd frame image URL (image-to-video + PRO mode only). Cannot be used with sound in v2.6
character_orientationenum: video | imageNoCharacter orientation for motion-control mode. 'image' limits duration to 3-10s, 'video' allows 3-30s
negative_promptstringNoNegative prompt to avoid certain elements
seednumberNoRandom seed for reproducibility
webhook_urlstringNoHTTPS 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_tokenstringNoOptional 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/start

Start Kling video generation

GET/api/v1/klingVideo/allRecords

Get all Kling video records

POST/api/v1/klingVideo/batchDetail

Batch 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