Skip to main content
POST
Generate image with Kling Image 4.0

Kling Image 4.0 on BudgetPixel

More examples, prompts and pricing.

Authorizations

Authorization
string
header
required

API key as a bearer token: Authorization: Bearer bpx_live_xxx

Body

application/json
prompt
string
required

Text description of the image to generate, or of the edit to make with the reference images; refer to them in order as @image_1, @image_2 …. Write @handle to cast a character: a BudgetPixel AI influencer or one of your own (GET /v1/characters).

aspect_ratio
enum<string>
default:auto

Output aspect ratio. "auto" (default) lets the model choose (an edit usually keeps its input's shape).

Available options:
auto,
1:1,
16:9,
9:16,
4:3,
3:4,
3:2,
2:3,
21:9
num_images
integer
default:1

Number of images to generate (each one is billed).

Required range: 1 <= x <= 4
reference_images
string[]

Optional reference images (up to 10) to edit or combine. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. Each reference image bills 4 credits per generated image. An image under 300 px on a side is scaled up; its shape must be between 2:5 and 5:2.

Maximum array length: 10
size
enum<string>
default:2K

Output size: 2K is about 4 MP (2048x2048, or 2496x1664 at 3:2) and bills 75 credits per image; 4K is about 16 MP (5440x3072 at 16:9) and bills 115. Reference images add 4 each.

Available options:
2K,
4K

Response

Job accepted.

characters
object[]

The characters the prompt cast with @handle mentions. Absent when none.

id
string

Opaque job id — use it to poll status.

Example:

"img_a1b2c3d4e5f6"

message
string
model
string
status
enum<string>

Lifecycle state. succeeded/failed/timeout are terminal.

Available options:
pending,
starting,
processing,
completing,
succeeded,
failed,
timeout