Kling Image 4.0 API Pricing, Reference Images, and Series

Complete Kling Image 4.0 API pricing guide: 2K vs 4K per-image rates, reference-image fees from the first photo, single vs series limits, and Python code.

Read as Markdown

If you search for Kling 4.0 API pricing today, most results quote per-second video rates ($0.157/s at 720p or $0.235/s at 1080p) and skip the still-image model altogether. Kling Image 4.0 is a separate API model (kling-image-4-0) released on November 17, 2026, billed per output image plus a small flat charge for each input reference photo. It is also distinct from Kling Image 4.0 Long Image, which targets tall scrolling ecommerce and webpage layouts.

Unlike token-billed image generators such as GPT Image 2.6, where image cost depends on aspect-ratio grid math and quality multipliers, kling-image-4-0 uses a predictable additive formula. You know the exact dollar cost of any request before calling POST /v1/images/generations, as long as you account for resolution, output count, and reference count.

This guide documents the verified billing formula, live TokLab rates, the differences between single and series modes, the stricter validation rules for 5-to-10-image sets, and working request code.

Exact billing formula and live rates

Every completed kling-image-4-0 task on TokLab follows one formula:

total_cost = (output_count × resolution_rate) + (reference_image_count × reference_rate)

Three billing rules prevent surprise overruns in production:

  1. Reference images bill from the first photo. There is no free included reference slot. Sending one refer_image adds one reference charge; sending ten adds ten.
  2. Reference images bill once per request, not per output. If you pass 2 reference photos and request a 6-image series at 4K, you pay for 6 outputs plus 2 references—never 12 references.
  3. Failed tasks cost $0. Requests rejected by validation (HTTP 400) or tasks that terminate with status failed do not charge your balance.

Here are the live TokLab gateway rates for Kling Image 4.0, pulled directly from the active pricing table:

What Kling Image 4.0 costs

CategoryPricing (USD)
2K output image$0.0571432
4K output image$0.0857144
Reference image$0.0028568
Night Garden series · 2K · three images · no references$0.1714296

At the rates verified on https://api.toklab.ai/v1/pricing on November 20, 2026, 2K output is $0.0571432 per image, 4K output is $0.0857144 per image (exactly 1.5x the 2K rate), and each input reference image adds $0.0028568 (roughly 5% of a single 2K image). Note that while Kling AI's web Creative Studio advertises native 8K stills, the current TokLab API endpoint exposes 2k (default) and 4k resolutions only; passing 8k returns a validation error.

Worked budget examples from 1 still to a 10-shot series

Because the reference surcharge is tiny compared to the output rate, batching variations or connected shots into one multi-output request amortizes reference input cost across the entire set.

ScenarioMode & settingsReference imagesOutputsFormula breakdown (Nov 20, 2026 rates)Total cost
Single 2K conceptsingle, n: 1, 2k011 × $0.0571432$0.05714
Single 4K hero stillsingle, n: 1, 4k111 × $0.0857144 + 1 × $0.0028568$0.08857
4-angle product packseries, series_amount: 4, 2k244 × $0.0571432 + 2 × $0.0028568$0.23429
4-shot 4K lookbookseries, series_amount: 4, 4k344 × $0.0857144 + 3 × $0.0028568$0.35143
10-frame 4K campaignseries, series_amount: 10, 4k41010 × $0.0857144 + 4 × $0.0028568$0.86857

At 1,000 generated images per month with an average of 2 reference photos per 4-image batch (250 tasks), switching from 4K to 2K saves $28.57 per thousand images ($58.57 at 2K vs $87.14 at 4K). A practical pipeline is to iterate layout and prompt wording at 2k with n: 2, then re-run only approved briefs at 4k.

Kling Image 4.0 4K botanical glasshouse sample rendered via TokLab

Single mode vs series mode: parameters and hard limits

Both single-image generation and multi-frame connected sets share one endpoint (POST https://api.toklab.ai/v1/images/generations) and return one task ID whose completed output.data[] array holds every generated image URL in order. The settings.result_type field controls how the outputs relate to one another:

  • result_type: "single" (default): Generates settings.n independent images (1 to 9, default 1) from the same prompt and references. Use this for A/B variations, hero explorations, or independent icon candidates. In single mode, series_amount is ignored.
  • result_type: "series": Generates settings.series_amount visually coherent images (2 to 10, default 4) that preserve subject identity, lighting, palette, and styling across frames—ideal for storyboards, product detail galleries, or multi-angle ecommerce shoots.

The 5-to-10-image series validation trap

Most API integration failures on kling-image-4-0 happen when teams scale series_amount from 4 to 5 or higher. Requests with series_amount between 5 and 10 enforce three stricter rules than smaller sets:

  1. Every reference image must be explicitly mentioned in the prompt. If you attach three refer_image objects (lamp, desk, fabric) and only cite @lamp and @desk in contents[].text, the request fails validation when series_amount >= 5.
  2. Tighter prompt length limit (20,000 characters). Standard requests accept up to 50,000 English characters (or 21,000 non-English characters, with mixed-language prompts constrained so english / 50000 + non_english / 21000 <= 1). For 5–10 image series, the prompt must stay at or below 20,000 characters after @id tags are expanded internally to positional references.
  3. Smaller reference file cap (20 MB vs 30 MB). Standard refer_image inputs allow JPEG or PNG files up to 30 MB (minimum 300 px per side, aspect ratio between 2:5 and 5:2). When series_amount is 5–10, each reference file must be readable and at most 20 MB.

Checking these three constraints on your server before dispatching a request avoids avoidable 400 errors and keeps queue workers clean.

Kling Image 4.0 botanical specimen typography and detail test

Reference image syntax and aspect-ratio rules

You can pass between 0 and 10 refer_image items inside contents, alongside exactly one prompt item. Giving each reference a short, unique id lets you bind specific subjects, materials, or palettes directly inside your prompt text using @id:

  • Valid aspect ratios: auto (default), 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, and 21:9.
  • No negative_prompt field: Unlike older Kling Image 3.0 wrappers, kling-image-4-0 does not take a separate negative_prompt parameter. Write exclusions directly in natural language inside the prompt text (for example, "plain matte paper backdrop with no extra text or props").
  • Watermark control: Optional options.watermark_info.enabled supports false only.
  • Duplicate IDs fail fast: Every contents[].id must be unique within the request, and every reference URL must be publicly reachable over HTTP(S) without login cookies.

When combining multiple references, clarity about role assignment matters more than adjective density. Tell the model explicitly what visual attribute each @id contributes—for example, "use the bottle silhouette and label typography from @bottle, place it on the brushed limestone surface from @stone, and match the warm directional window lighting from @mood." Leaving an attached reference unmentioned forces the model to guess whether to copy its geometry, its color palette, or its background, which increases inconsistency across frames and fails validation altogether once series_amount reaches five or more.

Pay-as-you-go API vs web credit subscriptions

Developers moving from Kling's web studio to automation frequently ask on community forums why official API quotes look different from monthly web plans. Monthly consumer subscriptions bundle fixed credit pools that expire every billing cycle, cap concurrent jobs per account, and require manual browser workflows or brittle third-party session wrappers. A direct pay-as-you-go API such as TokLab removes seat fees, monthly credit expiration, and per-account slot queues.

For bursty production workloads—such as generating 300 seasonal catalog angles during a two-day product drop and zero images for the rest of the month—pay-as-you-go billing is usually cheaper than carrying an unused Pro or Ultra subscription tier. You pay only for completed outputs and their input references, and any task that fails upstream or rejects malformed parameters costs nothing. Teams running steady daily volume can still control spend tightly by locking drafts to 2k with n: 1 or n: 2, auditing prompt adherence on a small sample, and promoting only approved briefs to 4k or multi-frame series runs.

Production batching, retries, and idempotency

Because kling-image-4-0 runs asynchronously, reliable automation depends on separating submission from retrieval. Never treat a client-side HTTP timeout during polling as a reason to resubmit POST /v1/images/generations. Once the gateway returns a task ID, that job is already queued and will bill upon completion even if your worker disconnects before reading the final payload.

A clean production worker persists three fields to its own database immediately after submission: the TokLab task_id, the exact request hash, and the local job state. If the worker restarts or encounters a transient network error while polling GET /v1/tasks/:id, it resumes polling the stored task_id rather than opening a duplicate task. When status becomes completed, download every URL in output.data[] into your own object storage (such as S3 or Cloudflare R2) right away rather than hotlinking temporary generation URLs in customer-facing storefronts. For multi-image sets, preserve the array order from output.data[] because series tasks return frames in the exact narrative sequence requested by the prompt.

End-to-end Python example: submit and poll a 4K series

The script below submits a 3-shot connected series with two named references, polls GET /v1/tasks/:id until completion, and prints every output URL from output.data.

import os
import time
import requests

API_KEY = os.environ["TOKLAB_API_KEY"]
HEADERS = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "model": "kling-image-4-0",
    "contents": [
        {"type": "refer_image", "url": "https://example.com/kettle.jpg", "id": "kettle"},
        {"type": "refer_image", "url": "https://example.com/slate-table.jpg", "id": "table"},
        {
            "type": "prompt",
            "text": (
                "Three connected editorial product photos of @kettle resting on @table. "
                "Frame 1: wide morning kitchen scene with soft side light. "
                "Frame 2: close-up of the matte spout pouring hot water into a ceramic dripper. "
                "Frame 3: overhead flat-lay showing the kettle beside two stoneware cups."
            ),
        },
    ],
    "settings": {
        "result_type": "series",
        "series_amount": 3,
        "resolution": "4k",
        "aspect_ratio": "3:2",
    },
}

create = requests.post(
    "https://api.toklab.ai/v1/images/generations",
    headers=HEADERS,
    json=payload,
    timeout=60,
)
create.raise_for_status()
task_id = create.json()["id"]

while True:
    poll = requests.get(
        f"https://api.toklab.ai/v1/tasks/{task_id}",
        headers={"Authorization": f"Bearer {API_KEY}"},
        timeout=30,
    )
    poll.raise_for_status()
    body = poll.json()
    status = body.get("status")
    if status == "completed":
        for idx, item in enumerate(body["output"]["data"], start=1):
            print(f"Frame {idx}: {item['url']}")
        break
    if status == "failed":
        raise RuntimeError(f"Task {task_id} failed: {body}")
    time.sleep(3)

Always persist task_id before entering the polling loop. If your worker restarts mid-poll, re-query GET /v1/tasks/:id with the saved ID instead of resubmitting POST /v1/images/generations, which would create and bill a duplicate job.

When to use Kling Image 4.0 vs Long Image

Use Kling Image 4.0 when you need discrete 2K or 4K stills, multi-reference compositing (up to 10 inputs), or coherent 2-to-10-frame visual series in standard aspect ratios. Switch to Kling Image 4.0 Long Image when the deliverable is a single tall vertical ecommerce product detail page or a full scrolling webpage design—those layouts use dedicated ecommerce and webpage skills with fixed 1K/2K widths and adaptive height rather than standard aspect ratios.

Sources

Related guides