Generate a video with Kling 4.0
Generate a video from a text prompt with Kling 4.0, at up to 1080p and 30 seconds. Every other input is optional and they combine freely:
- Frames: up to 10
framesin timeline order. The first opens the video, the last of two or more closes it, and the video passes through the rest in between. - References: up to 10
reference_imagesand 5 reference videos the prompt refers to as[Image1],[Video1], and so on.
Upload images using multipart/form-data, or pass stored assets by
identifier. Returns a generation_id; poll
GET /v2/generations/{generation_id} or supply a webhook_url.
Authentication
API key for access control. Use in the header with the name “Api-Key”
Query parameters
When true, the request is validated and priced but not run: nothing is
generated, stored, or billed, and no safety review is performed. The
response is a PriceQuote object instead of the usual response for this
endpoint. Send exactly the request you would send to generate, so the
quote reflects the same options.
Request
A request to generate a video with Kling 4.0. Upload images using multipart/form-data.
A natural-language prompt describing the video to generate. Refer to references by position, as in “[Image1] walks toward the camera”.
HTTPS URL that Ideogram delivers the generated result to. Ideogram sends a
JSON POST to this URL once all images for the request have finished
generating. The body mirrors the synchronous generate response:
request_id, created, and a data array
containing every generated image (url, prompt, resolution, seed,
is_image_safe). Each delivery is signed with Ed25519 and verifiable
against the public keys at https://api.ideogram.ai/v1/.well-known/jwks.json. Must be HTTPS;
private and loopback hosts and the cloud metadata service are rejected.
Response
An acknowledgement to poll with GET /v2/generations/{generation_id}.
The generation ID to poll with GET /v2/generations/{generation_id}.