Skip to main content
POST
Generate image

Authorizations

Authorization
string
header
required

Bearer authentication using API key

Body

application/json

Request payload

Request format for image generation models

images
string[]
required

Array of input images, which can be data URL or image URL

Required array length: 1 - 3 elements
model
enum<string>
required

Model name to use for the request

Available options:
kuaishou/kling-image-4.0-long-image
prompt
string
required

Text prompt for generation

size
enum<string>
required

Size

Available options:
1k,
2k
length
enum<string>

Length of the generated long image

Available options:
short,
medium,
long
output_format
enum<string>

Output format for the 3D model

Available options:
jpg,
png,
webp
page_type
enum<string>

Page type of the generated long image

Available options:
ecommerce,
webpage

Response

200 - application/json

Successful response

Standard async task creation response

code
string
required

Status code returned by the service

Example:

"success"

data
object
required

Response payload containing task details

message
string
required

Additional information about the request result

fail_code
string

Failure code if the task submission did not succeed