Skip to content

Kling 4.0 API

Strong motion and 1080p output.

Pricing
ResolutionText or imagesWith video input
720pText or images31.4 Credits/s ($0.157/s)With video input18 Credits/s ($0.09/s)
1080pText or images47 Credits/s ($0.235/s)With video input27 Credits/s ($0.135/s)

With reference or editing video, billed seconds = max(input + output, 2 × output).

Full pricing ↓
Resolution
Between 3 and 30 seconds.
The model picks the length, up to 30 s. You pay for the length it makes.
Aspect ratio
Text only: 16:9 when left empty; Auto is not available. With images: leave it empty to keep their shape, or pick Auto to match them.

Checking whether you’re signed in.

Sign in to generate. What you enter here, including chosen files, is kept for when you come back.

Your result appears here

Pricing

Prices as of 2026-11-09

TierPrice
720p
31.4 Credits/s ($0.157/s)Note 13–30 s
1080p
47 Credits/s ($0.235/s)Note 13–30 s
720p with video input
720p-video
18 Credits/s ($0.09/s)Notes 2, 33–30 s
1080p with video input
1080p-video
27 Credits/s ($0.135/s)Notes 2, 33–30 s
  1. Holds Credits for up to 30 seconds and charges the actual length.
  2. The rate applies to input and output seconds.
  3. Holds Credits for up to 30 seconds of output plus up to 30 seconds of input, and charges the actual length.

1 Credit ≈ $0.005. At the standard pack price. Larger packs include bonus Credits, so each Credit costs less.

Delivery and billing

Output
Finished files are listed in the task result with an asset ID and type for each.
Download
Files are kept for 7 days and downloaded through short-lived signed links. You can delete them any time.
Billing
Credits are held when a task is accepted and charged on delivery. If generation fails, or nothing is delivered within 24 hours, the held Credits are released in full.
Notifications
Poll the task by ID, or use signed webhooks and deduplicate by event_id.
How is it billed?
By output second.

API reference

Create the task once, then poll it by its ID. Full script with upload and download · API reference

Request
API=https://api.vizoapi.com/v1
AUTH="Authorization: Bearer $VIZO_API_KEY"

# Create the task once and keep its ID.
ID=$(curl -fsS $API/generations -H "$AUTH" -H "Content-Type: application/json" \
  -d '{
  "model": "kling-4-0",
  "input": {
    "prompt": "A slow dolly shot through a rainy neon street",
    "settings": {
      "resolution": "720p",
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  },
  "metadata": {
    "client_reference": "my-unique-reference-1"
  }
}' | jq -r .id)

# Poll until the task closes, then read its status and result.
until curl -fsS $API/generations/$ID -H "$AUTH" | jq -e '.closed_at != null' > /dev/null; do sleep 5; done
curl -fsS $API/generations/$ID -H "$AUTH" | jq '{status, result}'
All fields

Send these fields in input. A field the table does not list is refused with HTTP 422 invalid_input.

  • Send either prompt for text-only generation or contents for images and videos, never both.
  • Exactly one prompt, up to 10 images and 5 videos (at most one base_video). Videos must be MP4/MOV, at most 300 MB each, 3–30 seconds each and at most 30 seconds total. Repeated feature_video, refer_image or middle_frame items require unique ids.
  • Repeated middle_frame, refer_image or feature_video entries require unique ids, cited in the prompt as @id.
  • aspect_ratio adaptive follows your input images, so it needs contents; a text-only request without aspect_ratio is 16:9.
Request parameters
FieldDescription
promptstring

Required: exactly one of prompt or contents

Text-only generation. Up to 26000 Latin or 11000 other characters, counted together.

At most 26,000 characters

contentsarray of objects

Required: exactly one of prompt or contents

Exactly one prompt, up to 10 images and 5 videos (at most one base_video). Videos must be MP4/MOV, at most 300 MB each, 3–30 seconds each and at most 30 seconds total. Repeated feature_video, refer_image or middle_frame items require unique ids.

At least 1 items · At most 16 items

contents[].typestringRequired

Item kind.

Allowed valuespromptfirst_framemiddle_framelast_framerefer_imagefeature_videobase_video
Items where type is prompt
contents[].textstringRequired

Prompt text. Up to 26000 Latin or 11000 other characters, counted together.

At most 26,000 characters

Items where type is first_frame, middle_frame, last_frame, refer_image, feature_video, base_video
contents[].urlstringRequired

An https URL or an uploaded asset id (ast_...).

At most 4000 characters · Pattern^(https://|ast_)

contents[].idstringOptional

Name cited in the prompt as @id. Unique within contents.

At most 128 characters

settingsobjectOptional
settings.resolutionstringOptional

Output resolution. Defaults to 1080p.

Allowed values720p1080p

Default 1080p

settings.durationintegerOptional

Output seconds, 3 to 30. Omit for automatic length: holds 30 seconds and settles delivered duration.

Minimum 3 · Maximum 30

settings.aspect_ratiostringOptional

Output aspect ratio. A prompt request is 16:9 when this is left out and does not accept adaptive. With contents, leave it out to keep the shape of your frame images, or send adaptive to match your input images.

Allowed values21:916:99:161:1adaptive
Full example request and response

A complete create request, the 202 answer and the task once it has succeeded. This input selects the 720p tier at 31.4 Credits per second. For 5 seconds the API holds 157.000 Credits.

Request

{
  "model": "kling-4-0",
  "input": {
    "prompt": "A paper boat drifting on a pond at dawn, slow dolly in",
    "settings": {
      "resolution": "720p",
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  },
  "metadata": {
    "client_reference": "my-unique-reference-1"
  }
}

202 Accepted

{
  "id": "gen_01JD8Z5QW3XR",
  "model": "kling-4-0",
  "source": "api",
  "created_at": "2026-11-08T09:00:00Z",
  "customer_resolution_deadline": "2026-11-09T09:00:00Z",
  "late_result_available": false,
  "metadata": {
    "client_reference": "my-unique-reference-1"
  },
  "status": "processing",
  "execution_status": "processing",
  "delivery_status": "pending",
  "billing_status": "pending",
  "version": 1,
  "price": {
    "unit": "credit",
    "estimated": "157.000",
    "reserved": "0.000",
    "charged": "0.000",
    "refunded": "0.000"
  },
  "allowed_actions": [],
  "closed_at": null,
  "error": null,
  "result": null
}

200 Succeeded

{
  "id": "gen_01JD8Z5QW3XR",
  "model": "kling-4-0",
  "source": "api",
  "created_at": "2026-11-08T09:00:00Z",
  "customer_resolution_deadline": "2026-11-09T09:00:00Z",
  "late_result_available": false,
  "metadata": {
    "client_reference": "my-unique-reference-1"
  },
  "status": "succeeded",
  "execution_status": "succeeded",
  "delivery_status": "ready",
  "billing_status": "settled",
  "version": 4,
  "price": {
    "unit": "credit",
    "estimated": "157.000",
    "reserved": "0.000",
    "charged": "157.000",
    "refunded": "0.000"
  },
  "allowed_actions": [],
  "closed_at": "2026-11-08T09:01:31Z",
  "error": null,
  "result": {
    "asset_id": "ast_01JD8Z9M2C4V",
    "outputs": [
      {
        "index": 0,
        "asset_id": "ast_01JD8Z9M2C4V",
        "content_type": "video/mp4"
      }
    ]
  }
}

Full API reference for Kling 4.0