PopNowAPI Docs
Main content

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

OptionUSD
2k$0.063 per image
4k$0.094 per image
8k$0.157 per image

Parameters

FieldTypeDefaultAllowedWhat it does
promptRequiredstring—up to 21,000 charactersDescribe the subject, setting, lighting, and any exact words to render.
num_outputsOptionalinteger11 to 9How many independent images to generate.
resolutionOptionalstring2k2k, 4k, 8kOutput resolution tier; the price follows this choice.
aspect_ratioOptionalstringautoauto, 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9Output 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.

POST /api/v1/jobs/createTask
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.

GET /api/v1/jobs/recordInfo
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

OptionUSD
2k$0.063 per image
4k$0.094 per image
8k$0.157 per image

Parameters

FieldTypeDefaultAllowedWhat it does
promptRequiredstring—up to 21,000 charactersSay what each reference supplies, what should change, and what must stay the same. Cite references as @image_1, @image_2.
image_urlsRequiredarray<string (uri)>—up to 10 itemsReference 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_outputsOptionalinteger11 to 9How many independent images to generate.
resolutionOptionalstring2k2k, 4k, 8kOutput resolution tier; the price follows this choice.
aspect_ratioOptionalstringautoauto, 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9Output 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.

POST /api/v1/jobs/createTask
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.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Next steps

On this page