Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer YOUR_API_KEY. Manage keys in API Keys.

Body

application/json
model
string
required
Allowed value: "kling-4.0"
prompt
string
required

Video prompt.

Required string length: 1 - 26000
resolution
enum<string>
default:720P

Output resolution.

Available options:
720P,
1080P
duration
integer
default:5

Output duration in seconds.

Required range: 3 <= x <= 30
aspect_ratio
enum<string>

First-frame-only generation follows the source image aspect ratio; other modes can specify a ratio.

Available options:
21:9,
16:9,
9:16,
1:1,
adaptive
reference_images
object[]

Includes keyframes.

Maximum array length: 10
reference_videos
object[]

Reference videos or an edit source.

Maximum array length: 5

Response

Task accepted.

task_id
string
required

Task ID to poll.

model
string
required

Echoes the supplied model ID.

created_at
string<date-time>
required

Task creation time (UTC).

request_id
string
required

Request ID.