Skip to main content
POST
Kling4.0

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required
Available options:
Kling4.0
first_frame_image
string
last_frame_image
string
images
string[]

Use reference images or first/last frames, but not both.

Maximum array length: 10
videos
string[]

Maximum 5 items.

Maximum array length: 5
extends.refer_type
enum<string>

Must be one of: feature.

Available options:
feature
duration
enum<integer>
default:5

Must be one of: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30. Defaults to 5. Value is in s.

Available options:
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30
Required range: 3 <= x <= 30
prompt
string

Length must be at most 5000.

Maximum string length: 5000
resolution
enum<string>
default:720P

Must be one of: 1080P, 720P. Defaults to 720P.

Available options:
1080P,
720P
size
enum<string>

Choose an aspect ratio for text-to-video; image references use auto when omitted.

Available options:
16x9,
1x1,
21x9,
9x16

Response

Business response. code=0 means the task was accepted; validation failures can return HTTP 200 with code=400.

code
enum<integer>
required
Available options:
0
Example:

0

data
object
required
msg
string
required
Example:

"success"

request_id
string<uuid>
Example:

"250b66dd-e1fb-4bb6-b5f6-c668efadc35d"