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
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.
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
| Option | Price 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 |
Quick start
Full API reference →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": true11 }12 }'
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | No | — | Describe the scene. Use @Image1 / @Element1 for references. Required unless multiShots is supplied; mutually exclusive with multiShots. |
videoMode | string | No | — | 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 |
resolution | string | No | 720p | Output resolution (4K is not available)One of: 720p, 1080p |
duration | number | No | 3 | Output seconds, 3–30. Ignored with source video (its probed duration is billed) or multiShots (shot durations are summed). |
aspectRatio | string | No | — | 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 |
generateAudio | boolean | No | true | Generate native stereo audio (included in the price) |
keepAudio | boolean | No | true | Preserve source video audio |
imageUrls | string[] | No | — | Raw references (up to 10); address as @Image1, @Image2. Requires elements, transform or video_reference mode. |
startImageIndex | number | No | — | 1-based imageUrls index anchoring the first frame (elements mode) |
elements | object[] | 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. |
startFrameUrl | string | No | — | Required first frame in start_end_frame mode |
keyframeUrls | string[] | No | — | Ordered middle frames (up to 8) in start_end_frame mode; at most 10 total frames |
endFrameUrl | string | No | — | Optional last frame in start_end_frame mode |
videoUrl | string | No | — | 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. |
multiShots | object[] | 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.
Other Video models
- Wan 3.0 ProAlibaba$0.086/ second
- Seedance 2.0ByteDance$0.091/ second
- Kling 3.0Kling$0.096/ second
- Veo 3.1 LiteGoogle$0.1/ generation
- Seedance 2.5ByteDance$0.137/ second
- Seedance 2.5 SpicyByteDance$0.143/ second
- Veo 3.1 FastGoogle$0.2/ generation
- Gemini Omni 1.1 FlashGoogle$0.279/ generation
- Veo 3.1 QualityGoogle$1.43/ generation
Guides
- Text to videoWhich text-to-video model fits the shot you have in mind, prompts that actually work, and the full API run from create to finished file.9 min read
- Image to videoTurning a still into a shot — which model to animate it with, first and last frame control, motion transfer, and the prompts that keep the subject intact.8 min read
- Going to productionKey handling, webhooks over polling, idempotency, terminal states, retry policy by error code, balance monitoring, rate limits and media storage.10 min read
