Overview
Generate high-fidelity images with Kling using prompt, aspect ratio, resolution, and optional reference-image controls.
Primary Endpoint
POST
/api/v1/userKlingImage/startStart Kling 3.0 image generation
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Task name |
| prompt | string | Yes | Image generation prompt |
| input_images | array<string> | No | Optional public reference image URLs |
| aspect_ratio | enum: 1:1 | 16:9 | 9:16 | 4:3 | 3:4 | 2:3 | 3:2 | 21:9 | No | - |
| resolution | enum: 1k | 2k | No | - |
| n | integer | No | - |
| 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/userKlingImage/start" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My generation task",
"prompt": "A cinematic scene with natural motion",
"input_images": [],
"aspect_ratio": "9:16",
"resolution": "1k",
"n": 1,
"webhook_url": "https://your-server.example.com/a2e/webhook",
"webhook_token": "a-shared-secret"
}'Related Endpoints
POST
/api/v1/userKlingImage/startStart Kling 3.0 image generation
GET
/api/v1/userKlingImage/listList Kling image tasks
POST
/api/v1/userKlingImage/batchDetailBatch get Kling image task details
GET
/api/v1/userKlingImage/detail/{id}Get Kling image task details
DELETE
/api/v1/userKlingImage/{id}Delete a Kling image task
Responses
200
Task created successfully
401
Unauthorized - Invalid or missing bearer token