Kling 4.0 API

Generate Kling 4.0 videos from your own code. Three endpoints cover text-to-video, image-to-video with up to 10 keyframes, and reference-to-video, any whole-second duration from 3 to 30 seconds with native audio at 720p or 1080p. Kling 4.0 is resold by several providers; every request is priced across them and runs on the cheapest one that supports your settings.

$0.6per video, default settings(~600 credits)Best price

24% less than the priciest provider (7 compared). Same model, same output.

As of , Kling 4.0 costs from $0.12 per second on Scenetra, billed at provider cost with no markup. Each run is priced across 12 providers and runs on the cheapest one that supports your settings.

720p
$0.12/s
1080p
$0.19/s

Quickstart

Async by design: submit a generation, get a run id back instantly, poll until it completes (or pass a callbackUrl). Each mode is its own endpoint.

Kling 4.0 Text to Video API

POST /api/v1/generate/kling-4-t2vGet your API key →

1 — Start a generation

curl -X POST https://app.scenetra.com/api/v1/generate/kling-4-t2v \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A lone astronaut walks across red dunes at sunrise, boots crunching, wind howling, wide 21:9 tracking shot","aspect_ratio":"21:9","duration":"10"}'

Response (202)

{
  "runId": "run_abc123",
  "status": "PENDING",
  "model": "kling-4-t2v",
  "estimatedCredits": 600,
  "statusUrl": "/api/v1/runs/run_abc123"
}

2 — Poll until COMPLETED (every 2-5 seconds)

curl https://app.scenetra.com/api/v1/runs/run_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "runId": "run_abc123",
  "status": "COMPLETED",
  "progress": { "completed": 1, "total": 1 },
  "outputs": [
    { "type": "video", "url": "https://images.scenetra.com/..." }
  ],
  "error": null,
  "estimatedCredits": 600
}

Request fields

FieldTypeDescriptionDefault
prompt*stringDescribe the scene, action and camera, and any sound. Audio is generated natively.—
aspect_ratiostring16:9, 9:16, 1:1 or 21:9 widescreen.16:9 · 9:16 · 1:1 · 21:916:9
resolutionstring720p or 1080p.720p · 1080p720p
durationstringLength of the video in seconds (3-30). Billed per second.3 · 4 · 5 · 6 · 7 · 8 · 9 · 10 · 11 · 12 · 13 · 14 · 15 · 16 · 17 · 18 · 19 · 20 · 21 · 22 · 23 · 24 · 25 · 26 · 27 · 28 · 29 · 305
callbackUrlstring (https URL)Optional. When the run finishes (completed or failed), we POST the final run status to this URL — same shape as the poll response, plus model, params, and chargedCredits. Best-effort; polling remains the source of truth.

Unknown fields are rejected with a helpful 400. Media fields take https URLs. There is no provider parameter — every run is routed to the cheapest capable provider automatically.

Good to know

Billing

Runs bill your account credits at provider cost with 0% markup. The submit response includes the credit estimate; failed generations are refunded automatically. Add ?dryRun=1 to get the estimate without running anything.

Errors

Errors are always { "error": { "code", "message" } } with stable codes: unauthorized, model_not_available, invalid_parameter, insufficient_credits, rate_limited. A failed run is not an HTTP error — poll responses report status: "FAILED" with the reason.

Kling 4.0 API FAQ

How do I pass keyframes?+

On kling-4-i2v send first_frame_url, optional keyframe_urls (up to 8) and optional last_frame_url, and mention them in the prompt as @first_frame, @keyframe_1 and @last_frame. The total number of frames can't exceed 10 or the duration plus one.

Are reference videos billed?+

Yes. On kling-4-ref2v, reference clips (up to 30 seconds combined) add their seconds to the price at some providers. The submit response returns the credit estimate for your exact request, and ?dryRun=1 prices it without running.

Is this the official Kling API?+

No. Scenetra routes each call to a provider that serves Kling 4.0 (the same model and output) and bills you in Scenetra credits from one balance.

How much does the Kling 4.0 API cost?+

As of November 4, 2026, Kling 4.0 costs from $0.12 per second on Scenetra, billed at provider cost with no markup. Each run is priced across 12 providers and runs on the cheapest one that supports your settings. Rates: 720p $0.12/s; 1080p $0.19/s. With default settings (720p, 5 seconds), a text to video run is estimated at about 600 credits. The submit response returns the estimate for your exact settings, and adding ?dryRun=1 prices a request without running it.

Which provider runs my request?+

The cheapest one that supports your settings, chosen per request. There is no provider parameter: the same Kling 4.0 request is priced across every provider we route to and runs on the lowest quote.

Do failed generations cost credits?+

No. Credits are reserved when you submit and refunded automatically if the run fails. A failed run is not an HTTP error: polling returns status FAILED with the reason.

Do I have to poll, or can I get a webhook?+

Both work. Pass callbackUrl and we POST the final run status to it when the run completes or fails. Delivery is best-effort, so polling GET /api/v1/runs/{runId} remains the source of truth.