Skip to main content
POST
Kling 4.0 Image
Poll the returned task URL to retrieve the images. See Query Task Result.

Authorizations

Authorization
string
header
required

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json
prompt
string
required

Non-blank description of the image to generate.

Pattern: \S
resolution
enum<string>

Output resolution.

Available options:
2k,
4k
aspect_ratio
string

Use auto or a supported width-to-height ratio such as 1:1 or 16:9.

Pattern: ^(auto|[1-9][0-9]*:[1-9][0-9]*)$
n
integer

Number of images to generate.

Required range: 1 <= x <= 9

Response

Task submitted successfully

code
integer
required

Response code, 0 indicates success

Example:

0

message
string
required

Response message

Example:

"success"

data
object
required

Detailed data about the submitted asynchronous task.