Skip to main content
POST
Generate video with Kling 4.0

Kling 4.0 on BudgetPixel

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 video, including the sound you want, or the change to make when editing a video. Name inputs by position: @image_1, @image_2, ... (first frame, last frame, then reference images) and @video_1, @video_2, ... (the video to edit, then reference videos). Write @handle to cast a character: a BudgetPixel AI influencer or one of your own (GET /v1/characters).

aspect_ratio
enum<string>
default:16:9

Aspect ratio for text-to-video and reference-only jobs. A first frame or a video to edit sets the shape and this is ignored.

Available options:
16:9,
9:16,
1:1,
21:9
end_image
string

Optional last frame, used together with image: the video moves from the first frame to this one. Same input forms and limits as image.

image
string

Optional first frame (@image_1): the video starts from it and takes its shape. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. JPG or PNG, at least 300px on each side, aspect ratio between 2:5 and 5:2. Can't be combined with video.

length_seconds
integer
default:5

Video length in seconds, any whole number from 3 to 30. Ignored when editing a video (the output keeps its length).

Required range: 3 <= x <= 30
reference_images
string[]

Optional reference images of characters, products, places or styles, named in the prompt as @image_N (numbered after image and end_image). Up to 10 images in all, counting image and end_image. Same input forms and limits as image. No extra charge.

Maximum array length: 10
reference_videos
string[]

Optional reference videos to take motion, camera work or style from, named in the prompt as @video_N (numbered after video). MP4 or MOV, 3-30 seconds each, 700-4553 pixels on each side, aspect ratio between 2:5 and 5:2, up to 100MB each; up to 5 videos and 30 seconds in all, counting video. Each item is a public video URL or an uploaded-file URL from POST /v1/uploads. Any input video moves the job to the video-input rate, billed for the output plus the longer of the input videos and the output: see POST /v1/cost.

Maximum array length: 5
resolution
enum<string>
default:720p

Output resolution, 720p or 1080p. Sets the price per second: see resolution_pricing in GET /v1/models.

Available options:
720p,
1080p
video
string

Optional video to EDIT (@video_1): describe the change in prompt. The output keeps the clip's length and aspect ratio, so length_seconds and aspect_ratio are ignored. Same limits as reference_videos; can't be combined with image or end_image. Billed at the video-input rate for twice the clip's length in whole seconds (plus any reference videos).

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.

message
string
model
string
status
enum<string>

Lifecycle state. succeeded/failed/timeout are terminal.

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