Kling Image 4.0 API reference
Native 2K, 4K or 8K stills with readable lettering, plus edits from up to ten references
Call Kling Image 4.0 from your own code with one PopNow API key. Below are the exact model IDs to send, every input field the model accepts, what each request costs in USD, and a request you can paste into a terminal.
At a glance
- Made by
- Kuaishou
- Output
- Image
- From
- $0.063 USD per image
- Typical time
- about 51 s
Prices are in USD, charged to your PopNow balance. A task reserves the maximum possible charge when accepted and settles actual usage on completion; any remainder is released. Failed tasks are not charged. Call POST /api/v1/jobs/quote for an exact quote before running.
Create Image
kling/image-4.0/text-to-image
Price
| Option | USD |
|---|---|
2k | $0.063 per image |
4k | $0.094 per image |
8k | $0.157 per image |
Parameters
| Field | Type | Default | Allowed | What it does |
|---|---|---|---|---|
promptRequired | string | — | up to 21,000 characters | Describe the subject, setting, lighting, and any exact words to render. |
num_outputsOptional | integer | 1 | 1 to 9 | How many independent images to generate. |
resolutionOptional | string | 2k | 2k, 4k, 8k | Output resolution tier; the price follows this choice. |
aspect_ratioOptional | string | auto | auto, 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9 | Output aspect ratio; auto lets the model choose from the prompt and any reference images. |
Example request
This request runs as it is; any field you leave out uses its default. Put your key in POPNOW_API_KEY first.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "kling/image-4.0/text-to-image",
"input": {
"prompt": "A cozy reading nook beside a rain-streaked window, warm lamp light, a sleeping orange cat on a knitted blanket, soft film grain",
"resolution": "2k",
"num_outputs": 1
}
}'The response carries a taskId straight away. Read the result with GET /api/v1/jobs/recordInfo, or add callBackUrl to be notified.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Edit Image
kling/image-4.0/edit
Price
| Option | USD |
|---|---|
2k | $0.063 per image |
4k | $0.094 per image |
8k | $0.157 per image |
Parameters
| Field | Type | Default | Allowed | What it does |
|---|---|---|---|---|
promptRequired | string | — | up to 21,000 characters | Say what each reference supplies, what should change, and what must stay the same. Cite references as @image_1, @image_2. |
image_urlsRequired | array<string (uri)> | — | up to 10 items | Reference images in the order they are cited. JPG or PNG, up to 30 MB, at least 300 px per side, ratio between 2:5 and 5:2. |
num_outputsOptional | integer | 1 | 1 to 9 | How many independent images to generate. |
resolutionOptional | string | 2k | 2k, 4k, 8k | Output resolution tier; the price follows this choice. |
aspect_ratioOptional | string | auto | auto, 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9 | Output aspect ratio; auto lets the model choose from the prompt and any reference images. |
Example request
This request runs as it is; any field you leave out uses its default. Put your key in POPNOW_API_KEY first.
The example uses PopNow sample files in image_urls. Replace them with your own public HTTPS links, uploads or saved assets.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "kling/image-4.0/edit",
"input": {
"prompt": "Change the orange jacket to deep forest green and add soft golden-hour light; keep the face, pose and background unchanged",
"image_urls": [
"https://media.popnow.ai/influencer/examples/marco.webp"
],
"resolution": "2k",
"num_outputs": 1
}
}'The response carries a taskId straight away. Read the result with GET /api/v1/jobs/recordInfo, or add callBackUrl to be notified.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
