Overview
An extended variant of Kling with additional control parameters for output style, generation quality, and advanced scene handling.
Primary Endpoint
/api/v1/klingOmni/startGenerate videos using Kling Omni API (model: kling-v3-omni). This is a simplified wrapper around the official Kling API. **Key Features:** - Multi-reference images: up to 7 images, use `<<<image_N>>>` tags in prompt - Multi-shot editing: AI Director (intelligence) or manual (customize) storyboard - Native sound generation via `sound` parameter - Flexible duration: 3–15 seconds **Simplified vs Official API:** - `image_list`: accepts `string[]` (image URLs); official uses `[{image_url, type?}]`, auto-converted on server - `sound`: accepts `boolean`; official uses `"on"/"off"`, auto-converted on server - `multi_prompt`: items need `prompt` + `duration`; server auto-adds `index` field for official API - `prompt` is required when `multi_shot=false` or `shot_type=intelligence` - `multi_prompt` total duration must equal `duration` when `shot_type=customize` - `element_ids`: `string[]` of Element `asset_id` values (not `_id`). Create an Element with `POST /api/v1/klingAssets/elements` (`name`, frontal `image_url`, 1–3 `reference_image_urls`), poll `GET /api/v1/klingAssets` until `status` is `succeed`, then pass its `asset_id`. With `image_list`, at most 3 Elements are allowed. ### Request - Send a valid bearer token. The server evaluates the operation in the authenticated caller's access context. - Send an `application/json` body when using the optional controls documented in the request schema. - API-token callers may include `webhook_url` and `webhook_token` for best-effort terminal-state notifications; ordinary JWT/cookie calls ignore these fields. ### Behavior - This is an asynchronous operation: a successful submission creates a task and returns before processing finishes. - Persist the returned task identifier and use the corresponding detail or list operation to observe progress. - Treat the detail endpoint as the source of truth even when webhook delivery is enabled. ### Response - A `200` response confirms task acceptance; it does not by itself mean media generation has completed. - Retain the returned identifier and wait for a documented terminal status before using output URLs. - JSON object responses, including error responses, normally carry a top-level `trace_id` string for this request; include it when contacting support. It is not a task identifier. - Do not infer undocumented fields or statuses; clients should tolerate additional response properties. ### Errors - `400` — Bad Request - Invalid parameters. - `401` — Unauthorized - Invalid or missing JWT token. ### Related Operations - `GET /api/v1/klingOmni/allRecords` — Get all Kling Omni video records. - `GET /api/v1/klingOmni/{_id}` — Get Kling Omni video detail. - `PUT /api/v1/klingOmni/{_id}` — Update Kling Omni video name. Authentication: set header Authorization: Bearer <token> (supports user JWT or sk_ API token).
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | No | Task name (internal use) |
| prompt | string | No | Text prompt. Use <<<image_N>>> to reference images. Required when multi_shot=false or shot_type=intelligence. |
| image_list | array<string> | No | Reference image URLs (up to 7, jpg/jpeg/png, max 10MB). Simplified: pass URLs directly; server converts to official [{image_url}] format. |
| element_ids | array<string> | No | Kling Elements to include, as an array of `asset_id` strings (not the record `_id`). Create an Element with POST /api/v1/klingAssets/elements, then poll GET /api/v1/klingAssets until its `status` is succeed and read `asset_id`. Only your own succeeded Elements are accepted; duplicate IDs are rejected; with image_list, at most 3 Elements are allowed. |
| mode | enum: std | pro | No | Video generation mode. std=standard (720p), pro=professional (1080p); default: "std" |
| duration | string | No | Video duration in seconds (3–15); default: "5" |
| aspect_ratio | enum: 16:9 | 9:16 | 1:1 | No | default: "16:9" |
| sound | boolean | No | Enable native sound generation. Simplified: pass boolean; server converts to official 'on'/'off'.; default: false |
| multi_shot | boolean | No | Enable multi-shot mode; default: false |
| shot_type | enum: intelligence | customize | No | Shot type. Required when multi_shot=true. |
| multi_prompt | array<object> | No | Manual storyboard (required when shot_type=customize, 1–6 items, total duration must equal duration). Server auto-adds index field for official API. |
| multi_prompt[].prompt | string | Yes | Prompt for this shot (max 512 chars) |
| multi_prompt[].duration | string | Yes | Duration in seconds |
| 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.; maxLength: 2048 |
| webhook_token | string | No | Optional plaintext token returned in the X-A2e-Webhook-Token header so receivers can verify the request originated from a2e.; maxLength: 256 |
Request schema and conditional rules
{
"allOf": [
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Task name (internal use)",
"example": "My Kling Omni Video"
},
"prompt": {
"type": "string",
"description": "Text prompt. Use <<<image_N>>> to reference images. Required when multi_shot=false or shot_type=intelligence.",
"example": "<<<image_1>>> walks towards <<<image_2>>> in a sunny park"
},
"image_list": {
"type": "array",
"items": {
"type": "string"
},
"description": "Reference image URLs (up to 7, jpg/jpeg/png, max 10MB). Simplified: pass URLs directly; server converts to official [{image_url}] format.",
"example": [
"https://example.com/ref1.jpg"
]
},
"element_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Kling Elements to include, as an array of `asset_id` strings (not the record `_id`). Create an Element with POST /api/v1/klingAssets/elements, then poll GET /api/v1/klingAssets until its `status` is succeed and read `asset_id`. Only your own succeeded Elements are accepted; duplicate IDs are rejected; with image_list, at most 3 Elements are allowed.",
"example": [
"860412385741664324"
]
},
"mode": {
"type": "string",
"enum": [
"std",
"pro"
],
"description": "Video generation mode. std=standard (720p), pro=professional (1080p)",
"default": "std"
},
"duration": {
"type": "string",
"description": "Video duration in seconds (3–15)",
"default": "5"
},
"aspect_ratio": {
"type": "string",
"enum": [
"16:9",
"9:16",
"1:1"
],
"default": "16:9"
},
"sound": {
"type": "boolean",
"description": "Enable native sound generation. Simplified: pass boolean; server converts to official 'on'/'off'.",
"default": false
},
"multi_shot": {
"type": "boolean",
"description": "Enable multi-shot mode",
"default": false
},
"shot_type": {
"type": "string",
"enum": [
"intelligence",
"customize"
],
"description": "Shot type. Required when multi_shot=true."
},
"multi_prompt": {
"type": "array",
"description": "Manual storyboard (required when shot_type=customize, 1–6 items, total duration must equal duration). Server auto-adds index field for official API.",
"items": {
"type": "object",
"required": [
"prompt",
"duration"
],
"properties": {
"prompt": {
"type": "string",
"description": "Prompt for this shot (max 512 chars)",
"example": "<<<image_1>>> stands up and waves"
},
"duration": {
"type": "string",
"description": "Duration in seconds",
"example": "3"
}
}
}
}
},
"required": []
},
{
"$ref": "#/components/schemas/WebhookInput"
}
]
}Response Fields
- code: integer
- message: string
- data: object
- data._id: string
- Task ID; use it with the detail, update and delete endpoints
- data.name: string
- data.prompt: string
- data.image_list: array<string>
- Reference image URLs
- data.mode: enum: std | pro | 4k
- data.duration: string
- Video duration in seconds
- data.aspect_ratio: enum: 16:9 | 9:16 | 1:1
- data.sound: boolean
- data.multi_shot: boolean
- data.shot_type: enum: intelligence | customize
- data.multi_prompt: array<object>
- data.multi_prompt[].prompt: string
- data.multi_prompt[].duration: string
- data.multi_shot_mode: enum: off | auto | manual
- data.current_status: enum: initialized | sent | queued | processing | completed | failed
- completed and failed are terminal states
- data.result_url: string
- Generated video URL, empty until the task is completed
- data.cover_url: string
- data.coins: number
- Credits charged for this task
- data.is_downloaded: boolean
- data.is_previewed: boolean
- data.failed_code: string
- data.failed_message: string
- data.failed_reason: string
- Public failure reason, present only when the task failed
- data.createdAt: string
- data.remainingDays: integer
- Days left before the result expires
- data.expirationDate: string
- data.isExpired: boolean
- data.expirationDays: integer
- Retention period in days
- data.shareId: string
- Share identifier, present only for completed tasks
- trace_id: string
- Trace ID of this HTTP request. Include it when contacting support about this request. It is generated per request and is not a task identifier; use the returned task `_id` to query results.
Request Example
curl -X POST "https://www.a2e.com.cn/api/v1/klingOmni/start" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Related Endpoints
/api/v1/klingOmni/{_id}Get Kling Omni video detail
/api/v1/klingOmni/startStart Kling Omni video generation
/api/v1/klingOmni/allRecordsGet all Kling Omni video records
/api/v1/klingOmni/batchDetailBatch get Kling Omni video details
/api/v1/klingOmni/{_id}Update Kling Omni video name
/api/v1/klingOmni/{_id}Delete Kling Omni video
Responses
Video generation task started successfully. Each returned task exposes optional boolean hasRefundCoin (true: refund recorded; false: not refunded; omitted: unknown). A generation failure reason does not prove that a refund was recorded.
Bad Request - Invalid parameters
Unauthorized - Invalid or missing bearer token