New: Nano Banana 2.1Try the model
API Stock
/VIDEO/kling-4.0
Video
Kling

Kling 4.0 API

Generate 3–30 second videos with stereo audio, references, keyframes and video editing at 720p or 1080p.

  • Text to video
  • Image to video

Starting at

$0.171

per second of output

15 parameters · 4 price options

Kling 4.0 playground

Input

Describe the scene. Use @Image1 / @Element1 for references. Required unless multiShots is supplied; mutually exclusive with multiShots.

Raw references (up to 10); address as @Image1, @Image2. Requires elements, transform or video_reference mode.

Required first frame in start_end_frame mode

Ordered middle frames (up to 8) in start_end_frame mode; at most 10 total frames

Optional last frame in start_end_frame mode

Source video for transform / video_reference. Duration is probed before charging; 3–10 seconds for transform, 3–30 for video_reference. Transform needs a short side of at least 700px.

Sign in to run

Runs are charged to your balance.

Output

Output will appear here.

Fill in the fields, review the cost and run the model. Your result will appear here; you do not need a separate API key to try it in your browser.

Kling 4.0 API pricing

OptionPrice per second
Resolution: 720p · Source Video: no$0.171
Resolution: 720p · Source Video: yes$0.229
Resolution: 1080p · Source Video: no$0.256
Resolution: 1080p · Source Video: yes$0.343
1curl -X POST https://api.api-stock.com/api/v1/generation/create \
2 -H "Authorization: Bearer $API_STOCK_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "kling-4.0",
6 "input": {
7 "resolution": "720p",
8 "duration": 3,
9 "generateAudio": true,
10 "keepAudio": true
11 }
12 }'

Parameters

NameTypeRequiredDefaultDescription
promptstringNo—Describe the scene. Use @Image1 / @Element1 for references. Required unless multiShots is supplied; mutually exclusive with multiShots.
videoModestringNo—Omit for pure text-to-video. Use elements for references, start_end_frame for keyframes, transform or video_reference for a source video.One of: elements, start_end_frame, transform, video_reference
resolutionstringNo720pOutput resolution (4K is not available)One of: 720p, 1080p
durationnumberNo3Output seconds, 3–30. Ignored with source video (its probed duration is billed) or multiShots (shot durations are summed).
aspectRatiostringNo—Aspect ratio; must be auto with a source video. Keyframes determine their own ratio.One of: auto, 16:9, 9:16, 1:1, 21:9
generateAudiobooleanNotrueGenerate native stereo audio (included in the price)
keepAudiobooleanNotruePreserve source video audio
imageUrlsstring[]No—Raw references (up to 10); address as @Image1, @Image2. Requires elements, transform or video_reference mode.
startImageIndexnumberNo—1-based imageUrls index anchoring the first frame (elements mode)
elementsobject[]No—Subject elements: { description?: string, type?: image | video, imageUrls?: string[1..4], videoUrl?: string }. Up to 7, at most 3 video elements. Images and elements together: at most 15, or 14 with source video.
startFrameUrlstringNo—Required first frame in start_end_frame mode
keyframeUrlsstring[]No—Ordered middle frames (up to 8) in start_end_frame mode; at most 10 total frames
endFrameUrlstringNo—Optional last frame in start_end_frame mode
videoUrlstringNo—Source video for transform / video_reference. Duration is probed before charging; 3–10 seconds for transform, 3–30 for video_reference. Transform needs a short side of at least 700px.
multiShotsobject[]No—2–6 scenes totalling 3–30 seconds; replaces prompt and duration. Only text-to-video and elements modes.

Frequently asked questions

How much does Kling 4.0 cost?

Kling 4.0 starts at $0.171 per second of output through the API Stock API. You pay per use from a single prepaid balance — there is no subscription — and the final price scales with parameters such as resolution or duration.

When was Kling 4.0 released?

Kling 4.0 was released on October 15, 2026. It is available through the API Stock API with the same key and prepaid balance as every other model.

How do I get an API key for Kling 4.0?

Sign up for API Stock, top up your balance using an available payment method and create an API key in the dashboard — it takes a couple of minutes and needs no contract. The same key works with every model in the catalog, so there is no separate key to obtain for Kling 4.0.

How do I call the Kling 4.0 API?

Send a POST request to https://api.api-stock.com/api/v1/generation/create with your API key and the model id "kling-4.0". The call returns a task id you poll, or a webhook callback when the result is ready. A ready-to-run example is in the quick start above.

What input parameters does Kling 4.0 accept?

Kling 4.0 accepts 15 input parameters. Their types, defaults and allowed values are listed in the parameters table above.

What happens if a Kling 4.0 request fails?

API Stock automatically retries the request on a reserve provider. If every provider fails, the charge is refunded to your balance.

Can I use Kling 4.0 with the same API key as other models?

Yes. Every model on API Stock — video, image, music and chat — shares one API key and one prepaid balance, so you can switch to Kling 4.0 without new credentials.