Skip to main content
POST
Submit Kling AI task

提交任务

prompt、type、quality_mode 和 duration 必填。image-to-video 必须在 image_urls 中传入恰好一个 URL;text-to-video 必须省略该字段。
有效的 Master Key 是 kling-v2-1-master,后端不接受 kling-v2-master。aspect_ratio 和 sound 仅用于 kling-v2-6。图生视频时,image_tail、遮罩和 camera_control 互斥。

授权

Authorization
string
header
必填

Wizzx API key. This is not a JWT.

请求体

application/json

image-to-video requires exactly one image_urls item; text-to-video must omit image_urls. image_tail, masks, and camera_control are mutually exclusive for image-to-video. aspect_ratio and sound are only valid for kling-v2-6.

type
enum<string>
必填
可用选项:
text-to-video
model_name
enum<string>
默认值:kling-v1
必填
prompt
string
必填

Required prompt. The gateway enforces a 2500-byte UTF-8 limit.

Minimum string length: 1
quality_mode
enum<string>
必填
可用选项:
std,
pro
duration
enum<integer>
必填
可用选项:
5,
10
image_urls
string<uri>[]
Maximum array length: 1

Publicly reachable HTTP(S) URL.

Pattern: ^https?://
image_tail
string
negative_prompt
string

Optional negative prompt. The gateway enforces a 2500-byte UTF-8 limit.

cfg_scale
number

V1.x only. Explicit 0 is currently normalized to 0.5; omit for V2.x.

必填范围: 0 <= x <= 1
aspect_ratio
enum<string>

kling-v2-6 only; defaults to 16:9 for that model.

可用选项:
16:9,
9:16,
1:1
sound
enum<string>

kling-v2-6 only; defaults to off.

可用选项:
on,
off
static_mask
string
dynamic_masks
object[]
Maximum array length: 6
camera_control
object
callback_url
string<uri>
external_task_id
string

响应

Task accepted

code
enum<integer>
必填
可用选项:
0
message
string
必填
示例:

"success"

data
object
必填
request_id
string<uuid>
必填