All models

Kling V4 Image

klingai/kling-v4-image

Quick start

# Inspect the price — a plain request returns the 402 challenge:
curl -i https://api.glianalabs.com/v1/infer \
  -H "content-type: application/json" \
  -d '{
    "model": "klingai/kling-v4-image",
    "prompt": "<your prompt>"
  }'

# Pay + run in one step with the mppx CLI (create a wallet: npx mppx account create):
npx mppx https://api.glianalabs.com/v1/infer \
  -J '{"model": "klingai/kling-v4-image", "prompt": "<your prompt>"}'

Examples

example

Parameters

Input
prompt string required

Text prompt describing the image, up to 50,000 English characters. Refer to reference images as @image_1, @image_2, and so on.

aspect_ratio string optional default: "auto"

Aspect ratio of the generated image; auto picks one from the input

images array optional

Reference images for image-to-image: https URLs, data URIs or raw base64 (JPG or PNG, up to 30 MB, at least 300 px per side, aspect ratio between 2:5 and 5:2) Pass a public URL; to use a local file, upload it (free) via POST /v1/media (≤40MB) and pass the returned url.

n integer optional default: 1

Number of images to generate

resolution string optional default: "2k"

Output resolution

Output