Kling 4.0 Flash API, MCP Server, CLI: Pricing per Second, Speed, Setup Guide
Complete developer guide to the Kling 4.0 Flash API, official MCP Server, and CLI released on November 4, 2026, including per-second pricing vs Standard Kling 4.0, Seedance 2.5.
Summary
- Kling 4.0 Flash opened full developer access across the REST API, official MCP Server, and CLI on November 4, 2026.
- Standard Kling 4.0 (kling-v4-0) costs $0.154/second at 720p and $0.230/second at 1080p on official developer packs as of 2026-11-05.
- Includes working setup examples for the async REST API, official CLI, and MCP Server, plus workarounds for Flash's unprompted background music, jump cuts.
On November 4, 2026, Kuaishou opened full developer access to Kling 4.0 Flash across its REST API, official Model Context Protocol (MCP) Server, and command-line interface (CLI). While the base Kling 4.0 model rolled out to the web app and initial MCP/CLI hooks in mid-October, programmatic Flash access was previously locked behind web early access. Now that the endpoints are live for all developer accounts, you can run automated text-to-video and image-to-video pipelines at roughly half the cost and three times the speed of standard Kling 4.0.
If you are evaluating whether to switch your video generation pipeline to kling-v4-flash or keep paying for standard kling-v4-0, the decision comes down to per-second unit math and whether your workflow relies on end-frame keyframes. Here is how the two tiers compare in production right now.
| Metric / Capability | Kling 4.0 Flash (kling-v4-flash) |
Kling 4.0 Standard (kling-v4-0) |
|---|---|---|
| Full API, MCP & CLI Release | November 4, 2026 | October 15, 2026 (Web/MCP), Nov 2026 (API) |
| Official API Price (720p) | ~$0.077 / sec ($0.38 per 5s clip) | $0.154 / sec ($0.77 per 5s clip) |
| Official API Price (1080p) | ~$0.115 / sec ($0.58 per 5s clip) | $0.230 / sec ($1.15 per 5s clip) |
| Subscription Credit Equivalent (720p) | ~22.5 credits / 5s ($0.23–$0.25) | 45 credits / 5s ($0.46–$0.49) |
| Subscription Credit Equivalent (1080p) | ~35 credits / 5s ($0.34–$0.38) | 67.5 credits / 5s ($0.68–$0.73) |
| Supported Clip Duration | 3 to 30 seconds | 3 to 30 seconds |
| Average Latency (5s 720p) | 20–35 seconds | 90–150 seconds |
| Average Latency (5s 1080p) | 45–65 seconds | 140–220 seconds |
| Keyframe Control | Start frame only (or Omni v4 multi-image) | Full Start + End frame (image_tail) |
| Visual & Audio Behavior | Fast motion, prone to auto-music & jump cuts | Higher photorealism, cleaner lip-sync |
On this page
Hidden Billing Rules and Model String 404s
Before you wire Kling 4.0 Flash into a backend service, you need to account for how Kuaishou structures developer billing and model identifiers. On the official Kling Developer Platform, direct API access requires purchasing prepaid resource packs starting at $500 as of 2026-11-05. When you calculate unit costs from those packs, standard Kling 4.0 comes out to $0.77 for a 5-second 720p video and $1.15 for a 5-second 1080p video, while Flash cuts that to roughly $0.38 and $0.58 respectively as of 2026-11-05.
If you do not want to commit $500 upfront, two alternative routes exist. Some developers route through third-party subscription wrappers that consume monthly web credits—where a Pro plan ($32.56/month for 3,000 credits) or Premier plan ($80.96/month for 8,000 credits) drops the effective 5-second 720p rate to $0.46–$0.49 on standard 4.0 and under $0.25 on Flash. Others use per-second API relays that bill around ¥0.30/second ($0.042) for 720p and ¥0.40/second ($0.056) for 1080p as of 2026-11-05.
Regardless of which billing channel you use, watch out for the reference video billing rule. Whenever you call an Omni reference or video-edit endpoint that accepts an input video alongside your prompt, the platform bills you for the sum of the output video duration and the reference video duration. Sending a 5-second reference clip to generate a 10-second output bills you for 15 seconds of compute. Even a few test runs at 1080p will burn through your balance faster than expected if you treat video endpoints like text token calls.
The second trap is guessing the model parameter string. Because different providers expose Kling 4.0 under slightly different schemas, passing an unverified string like kling-v4.0-flash, kling-v4.0-pro, or kling-video-o4 returns an immediate HTTP 404 Not Found. On the official Kling API, the model family uses hyphens without the trailing decimal on the Flash tier (kling-v4-flash), while standard 4.0 uses kling-v4-0 (and Omni calls require setting "omni_version": "v4"). If you are calling through an aggregator schema like WaveSpeed, the endpoint path itself namespaces the model as kwaivgi/kling-v4.0/text-to-video or kwaivgi/kling-v4.0/image-to-video, and passing a guessed -flash suffix in the URL will fail until the upstream catalog explicitly maps the route.
Calling Kling 4.0 Flash via the REST API
The official Kling REST API is asynchronous. You submit a generation job via POST, receive a task_id, and either poll the task status endpoint or register a callback_url webhook to receive the finished MP4 link.
Authentication on the official developer portal uses an AccessKey and SecretKey pair encoded into a short-lived HS256 JSON Web Token (JWT), passed in the Authorization: Bearer <token> header. Below is a complete Python implementation that signs the JWT, submits both a text-to-video job and an image-to-video job using kling-v4-flash, and polls until completion.
import time
import jwt
import requests
ACCESS_KEY = "your_kling_access_key"
SECRET_KEY = "your_kling_secret_key"
BASE_URL = "https://api.klingai.com/v1"
def generate_jwt(ak: str, sk: str) -> str:
now = int(time.time())
payload = {
"iss": ak,
"exp": now + 1800,
"nbf": now - 5
}
headers = {"alg": "HS256", "typ": "JWT"}
return jwt.encode(payload, sk, algorithm="HS256", headers=headers)
def create_flash_t2v_task(prompt: str, duration: int = 5, resolution: str = "720p") -> str:
token = generate_jwt(ACCESS_KEY, SECRET_KEY)
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
}
payload = {
"model_name": "kling-v4-flash",
"prompt": prompt,
"negative_prompt": "jump cut, camera switch, background music, blurry",
"cfg_scale": 0.5,
"mode": "std",
"aspect_ratio": "16:9",
"resolution": resolution,
"duration": str(duration),
"enable_audio": False
}
resp = requests.post(f"{BASE_URL}/videos/text2video", json=payload, headers=headers, timeout=30)
resp.raise_for_status()
return resp.json()["data"]["task_id"]
def create_flash_i2v_task(image_url: str, prompt: str, duration: int = 5) -> str:
token = generate_jwt(ACCESS_KEY, SECRET_KEY)
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
}
payload = {
"model_name": "kling-v4-flash",
"image": image_url,
"prompt": prompt,
"duration": str(duration),
"resolution": "720p"
}
resp = requests.post(f"{BASE_URL}/videos/image2video", json=payload, headers=headers, timeout=30)
resp.raise_for_status()
return resp.json()["data"]["task_id"]
def wait_for_video(task_id: str, task_type: str = "text2video") -> str:
while True:
token = generate_jwt(ACCESS_KEY, SECRET_KEY)
headers = {"Authorization": f"Bearer {token}"}
resp = requests.get(f"{BASE_URL}/videos/{task_type}/{task_id}", headers=headers, timeout=15)
resp.raise_for_status()
data = resp.json()["data"]
status = data["task_status"]
if status == "succeed":
return data["task_result"]["videos"][0]["url"]
elif status == "failed":
raise RuntimeError(f"Task {task_id} failed: {data.get('task_status_msg')}")
time.sleep(4)
if __name__ == "__main__":
tid = create_flash_t2v_task(
prompt="Single continuous tracking shot following a yellow autonomous delivery rover rolling down a wet Tokyo alley at dusk, ambient tire spray sounds only.",
duration=5,
resolution="720p"
)
print(f"Submitted task: {tid}")
video_url = wait_for_video(tid, "text2video")
print(f"Download MP4: {video_url}")
If you run a multi-person studio or an AI comic team and want to share a single official Kling API account across several seats without leaking the master SecretKey, do not waste time trying to stuff Kling's endpoints into standard LLM gateways like One-API or New-API. Those gateways are architected around synchronous /v1/chat/completions token streaming and often break or lose billing state when tracking asynchronous video task_id polling loops and webhook callbacks. The reliable way to manage team quotas is a thin internal FastAPI wrapper that authenticates your team members, logs the requested duration and resolution per project ID in Postgres before forwarding the request to Kling, and deducts the exact seconds only when the webhook returns succeed.
Setting Up the Official Kling CLI and MCP Server
For developers building agentic pipelines or batch-rendering storyboards from local markdown scripts, the November 4 release includes official support for kling-v4-flash in the Kling CLI and MCP Server. Similar to what we saw with the official Suno MCP Server setup, having a first-party MCP server eliminates the need to maintain fragile community wrappers.
To use the official CLI for rapid terminal batching, install the package globally via npm and export your credentials:
npm install -g @klingai/cli
export KLING_ACCESS_KEY="your_kling_access_key"
export KLING_SECRET_KEY="your_kling_secret_key"
Once configured, you can trigger a 720p Flash generation and automatically download the resulting MP4 into your working directory with the --wait flag:
# Text-to-video at 720p using Kling 4.0 Flash
kling video create \
--model kling-v4-flash \
--prompt "Close-up studio shot of clockwork gears turning smoothly, macro lens, shallow depth of field" \
--duration 5 \
--resolution 720p \
--no-audio \
--wait \
--output ./gears_preview.mp4
# Image-to-video from a local starting frame
kling video i2v \
--model kling-v4-flash \
--image ./frames/scene_01_start.png \
--prompt "The character turns slowly toward the window as rain streaks down the glass" \
--duration 5 \
--resolution 720p \
--wait \
--output ./scene_01_take1.mp4
To expose Kling 4.0 Flash directly to Claude Code, Claude Desktop, or Cursor as a native tool, add the official MCP server to your claude_desktop_config.json or .mcp.json file:
{
"mcpServers": {
"kling-ai": {
"command": "npx",
"args": ["-y", "@klingai/mcp-server"],
"env": {
"KLING_ACCESS_KEY": "your_kling_access_key",
"KLING_SECRET_KEY": "your_kling_secret_key",
"KLING_DEFAULT_MODEL": "kling-v4-flash",
"KLING_DEFAULT_RESOLUTION": "720p"
}
}
}
}
Setting KLING_DEFAULT_MODEL to kling-v4-flash is critical inside an MCP workflow. Standard Kling 4.0 takes up to two and a half minutes to finish a clip, which regularly causes MCP client tool-execution timeouts if the agent tries to await the final URL in a single turn. Because Flash finishes 720p clips in 20 to 35 seconds, the MCP server's generate_video and check_video_task tools can complete within a normal coding or storyboard agent loop.
Three Kling 4.0 Flash Pitfalls and How to Work Around Them
Cutting generation latency by two-thirds came with real model behavioral trade-offs. When I ran batch prompts through Kling 4.0 Flash, three recurring issues showed up that do not happen as severely on standard Kling 4.0 or competing models.
1. Random Background Music Even When Prompted for Silence
Kling 4.0 Flash has an aggressive native audio generation head. If you leave audio generation enabled on the web interface or omit audio suppression in your API payload, Flash frequently injects random background music into the video—even when your prompt explicitly states "no music, silent room" or specifies only environmental sound effects. Do not waste credits trying to prompt-engineer the music away. Instead, either pass explicit audio suppression ("enable_audio": false / --no-audio) when you only need visuals, or write the exact ambient sound effect you want in the prompt and strip unwanted tracks locally in post-processing with ffmpeg -i input.mp4 -c copy -an output_silent.mp4.
2. Unsolicited Camera Cuts and Missing End Frames
If you prompt Flash for a complex multi-action scene, it has a strong tendency to insert hard jump cuts or switch camera angles mid-clip, even when you ask for a single continuous shot. Furthermore, the standard image2video endpoint on Kling 4.0 Flash only respects a starting frame (image) and does not support locking an ending keyframe (image_tail).
To stop random camera switches, restrict each Flash prompt to one scene, one primary subject action, and one camera movement vector, prototyping a 5-second 720p clip first before extending the duration. If you are building a longer 15-to-20-second narrative and need keyframe continuity that Flash's single-image input fails to hold, you have two working options:
- Sequential Multi-Image Omni Prompting: Instead of relying on two start/end frames, pass a sequence of 8 to 10 ordered reference images via the Omni v4 endpoint (
"omni_version": "v4") paired with a long, step-by-step sequential prompt that describes each beat in order. In testing, feeding a structured 8-image sequence turns chaotic Flash generations into coherent 20-second shorts. - Bridge Clips: Generate your fast primary shots in 4.0 Flash, then use a 3-second standard Kling 4.0 or Kling 3.0 task (which supports strict start-and-end frame interpolation) to stitch the end frame of Shot A to the start frame of Shot B.
3. Facial Realism and Lip-Sync Degradation
Flash sacrifices fine-grained facial micro-expressions and lip-sync accuracy for speed. For wide cinematic shots, claymation styles, product B-roll, or environment flythroughs, Flash looks nearly indistinguishable from standard 4.0 at 720p. For tight close-ups of speaking characters, however, Flash produces noticeable mouth warping that no parameter tweak fixes.
Per-Second Cost Comparison: Kling 4.0 Flash vs. Seedance 2.5 vs. Veo 3.1 Lite
Many developers testing Kling 4.0 Flash right now are weighing it against ByteDance's Seedance 2.5 and Google's Veo 3.1 Lite. If you read our earlier breakdown of Wan 3.0, Hyperflow H3, and Seedance 2.5 video API pricing, you already know that headline per-second prices only tell half the story—what actually determines your monthly bill is how many times you have to re-roll a prompt to get a usable clip.
| Model & Tier | 720p Price / Sec (as of 2026-11-05) | 1080p Price / Sec | 5s Clip Cost (720p / 1080p) | Max Clip Length | Best Production Use Case |
|---|---|---|---|---|---|
| Kling 4.0 Flash | ~$0.077 | ~$0.115 | $0.38 / $0.58 | 30 sec | Fast 720p storyboards, MCP/CLI agents, 8-image sequential shorts |
| Kling 4.0 Standard | $0.154 | $0.230 | $0.77 / $1.15 | 30 sec | Long 10–30s continuous takes requiring start + end frames |
| Seedance 2.5 | ~$0.095 | ~$0.165 | $0.48 / $0.83 | 12 sec | Hero shots, realistic human motion, high first-try keyframe accuracy |
| Veo 3.1 Lite | $0.100 | $0.200 | $0.50 / $1.00 | 8 sec | Low-latency GCP/Vertex AI pipelines needing clean physics |
When you compare the raw numbers, Kling 4.0 Flash is the cheapest way to generate 720p and 1080p video per second among the major commercial APIs, and its 30-second maximum duration ceiling beats both Seedance 2.5 and Veo 3.1 Lite.
However, your effective cost per usable clip depends on the subject matter. On human character acting, lip-sync, and two-frame keyframe transitions, Seedance 2.5 delivers noticeably higher physical realism and prompt adherence on the first or second attempt. If Kling 4.0 Flash takes four retries to nail a complex character interaction because of random camera cuts or facial distortion, your effective cost jumps from $0.38 to $1.52 (as of 2026-11-05)—making Seedance 2.5 cheaper in practice. Use Kling 4.0 Flash via the CLI and MCP Server for high-volume 720p pre-visualization, B-roll, and multi-image sequential drafts, and route your close-up character hero shots to Seedance 2.5 or standard Kling 4.0.