# Kling 4.0 API pricing for AI agents

Source: https://corespeed.io/models/kling-4-0

Kling 4.0 is Kling AI's video model for clips of 3 to 30 seconds in one pass, at 720p, 1080p or native 4K, with optional 10-bit HDR and a prompt for each shot. Through CoreSpeed, Claude Code, Codex, Cursor or any MCP agent runs it and its Flash tier with no Kling account, from one credit balance.

## What it costs, per billed unit

Read from the CoreSpeed catalog for this answer. Rates are in credits, and 1,000 credits are $1.

| Variant | Name in the catalog | Rate | In dollars |
| --- | --- | --- | --- |
| Text to video | Kling 4.0 Text to Video | 235 credits per billed second | $0.235 |
| Image to video | Kling 4.0 Image to Video | 235 credits per billed second | $0.235 |
| From image or video references | Kling 4.0 Reference to Video | 235 credits per billed second | $0.235 |
| Edit a video | Kling 4.0 Video Editing | 235 credits per billed second | $0.235 |
| Text to video, Flash | Kling 4.0 Flash Text to Video | 141 credits per billed second | $0.141 |
| Image to video, Flash | Kling 4.0 Flash Image to Video | 141 credits per billed second | $0.141 |
| From references, Flash | Kling 4.0 Flash Reference to Video | 141 credits per billed second | $0.141 |
| Edit a video, Flash | Kling 4.0 Flash Video Editing | 141 credits per billed second | $0.141 |

A run is billed once, after it succeeds: the rate times the units the model reports for that run. Settings such as resolution, length, count or sound change how many units a run counts. A failed, cancelled or expired run costs nothing.

Every model in Video generation, with its rate: https://corespeed.io/catalog/video-generation

## What it does well

- Long takes: up to 30 seconds in one generation.
- Several shots in one clip, each with its own prompt and length.
- Native 4K and 10-bit HDR for footage that goes on to editing.

## Facts

- Takes: A prompt, or a prompt per shot; an image or video to start from or edit.
- Length: 3 to 30 seconds; Flash, 3 to 20 seconds.
- Resolution: 720p, 1080p or 4K; Flash, 720p.
- HDR: 10-bit HDR at 1080p and 4K, billed on top of the base rate.
- Aspect ratio: 16:9, 9:16, 1:1, 4:3, 3:4 or 21:9.

From Kling's own page: [Kling 4.0, on Kling AI's site](https://kling.ai/feature/kling-4-ai-video-generation)

## How your agent runs it

Paste this line into Claude Code, Codex or Cursor:

```text
set up https://corespeed.io/SKILL.md (read it raw, e.g. with curl), then make a 10-second 1080p clip of a detective on a rainy rooftop with Kling 4.0, and tell me the rate before you run it
```

It starts with the setup line, so it works on a machine without CoreSpeed: the agent fetches https://corespeed.io/SKILL.md, adds the MCP server and signs you in. Then it runs Kling 4.0 through the media tools:

1. `media__list_models`: search the catalog for Kling 4.0 and pick the variant that fits.
2. `media__get_model`: read the rate and the inputs the model takes, before anything runs.
3. `media__generate`: run it. The file comes back as a link and lands in your Drive for 7 days.

## Questions

### What is the difference between Kling 4.0 and Kling 4.0 Flash?

Flash is the quicker tier: up to 20 seconds at 720p. The full model goes to 30 seconds and 4K.

### Does HDR cost more?

Yes. 10-bit HDR at 1080p or 4K is billed on top of the base rate.

### Do I need a Kling account or API key to use Kling 4.0?

No. CoreSpeed runs Kling 4.0 for your agent. You sign in to CoreSpeed once, and each run comes out of your one credit balance.

### Am I charged if a generation fails?

No. A generation is billed once, after it succeeds. Failed, cancelled and expired generations are never charged. How media billing works: https://corespeed.io/docs/media

### Do I have to switch agents?

No. CoreSpeed adds tools to the agent you already use: Claude Code, Codex, Cursor, or another MCP client. Each one signs in once.

All model prices: https://corespeed.io/models (Markdown: https://corespeed.io/models.md)

## Related pages

- [Grok Imagine Video API pricing for AI agents](https://corespeed.io/models/grok-imagine-video): Grok Imagine Video API pricing on CoreSpeed: the rate for 1.5 and the first release, read live, with no xAI account or key.
- [Kling 3.0 API pricing for AI agents](https://corespeed.io/models/kling-3-0): Kling 3.0 API pricing on CoreSpeed: the rate, read live from the catalog, for Standard, Pro, 4K and Motion Control, with no Kling account.
- [Kling O1 API pricing for AI agents](https://corespeed.io/models/kling-o1): Kling O1 API pricing on CoreSpeed: the rate, read live from the catalog, for frames, references and video edits, with no Kling account.
- [LTX-2.3 API pricing for AI agents](https://corespeed.io/models/ltx-2-3): LTX-2.3 API pricing on CoreSpeed: the rate for Pro and Fast, read live, and how your agent runs it with no Lightricks account or key.
- [Ray3.2 API pricing for AI agents](https://corespeed.io/models/luma-ray-3-2): Luma Ray3.2 API pricing on CoreSpeed: the rate for image to video and video to video, read live, with no Luma AI account or key.
- [Seedance 2.0 API pricing for AI agents](https://corespeed.io/models/seedance-2-0): Seedance 2.0 API pricing on CoreSpeed: each variant's rate, read live from the catalog, and how your agent runs it with no ByteDance account.
- [Video generation for AI agents](https://corespeed.io/integrations/video-generation): Give your agent hundreds of text to video and image to video models, with no API keys. It reads the rate first, and long renders finish as jobs.

## Sources

- Kling 4.0, on Kling AI's site: https://kling.ai/feature/kling-4-ai-video-generation
- Media docs: https://corespeed.io/docs/media

Reviewed 2026-11-24.

## Links

- Product overview: https://corespeed.io/ (Markdown: https://corespeed.io/index.md)
- Documentation: https://corespeed.io/docs
- Pricing: https://corespeed.io/pricing (Markdown: https://corespeed.io/pricing.md)
