Kling 4.0 API (kling-v4) unifies text-to-video, image-to-video, multimodal references, video editing and extension. Generate 3–30s clips in 720p or 1080p, always with stereo audio.
Service Highlights
Every video includes a stereo soundtrack.
Transparent pricing with no hidden fees. Pay only for what you use.
| Variant | Tier | GoldCurrent price | Platinum | Diamond | Official | Your savings |
|---|---|---|---|---|---|---|
kling-v4 | 720P-input | 0.84Credits(~$0.084)/sec | 0.798Credits(~$0.0798)/sec | 0.756Credits(~$0.0756)/sec | 1.05Credits(~$0.105)/sec | 20% |
| 1080P-input | 1.26Credits(~$0.126)/sec | 1.197Credits(~$0.1197)/sec | 1.134Credits(~$0.1134)/sec | 1.575Credits(~$0.1575)/sec | 20% | |
| 720P | 1.4Credits(~$0.14)/sec | 1.33Credits(~$0.133)/sec | 1.26Credits(~$0.126)/sec | 1.75Credits(~$0.175)/sec | 20% | |
| 1080P | 2.1Credits(~$0.21)/sec | 1.995Credits(~$0.1995)/sec | 1.89Credits(~$0.189)/sec | 2.625Credits(~$0.2625)/sec | 20% |
* Actual costs are subject to final output.
Kling 4.0 API (kling-v4) unifies text-to-video, image-to-video, multimodal references, video editing and extension. Generate 3–30s clips in 720p or 1080p, always with stereo audio.
50K+
Active Users
99.9%
Uptime
2x
Faster
—
Cost Savings
Use model kling-v4 for all five workflows. Submit a video task, then query its video-generation endpoint to obtain the result.
Save the key you created above in the APIMART_API_KEY environment variable and send it as Authorization: Bearer <key> on every Kling API request.
POST /v1/videos/generations with model kling-v4, the prompt and workflow-specific media. Save the returned task ID. The example.com URLs are placeholders: replace them with your own publicly accessible files.
Poll GET /v1/tasks/{task_id} until status is completed, then read the video URL from data.result.videos[0].url[0] and the final charge from cost. APIMart keeps results for 72 hours, so download the videos you want to keep.
Check the APIMart documentation for integration updates.
curl -X POST https://api.apimart.ai/v1/videos/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v4",
"prompt": "A cinematic tracking shot of a cyclist riding through a sunlit coastal road, gentle ocean breeze and natural motion",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9"
}'import os
import time
import requests
API_BASE = "https://api.apimart.ai"
headers = {"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}"}
# 1. Submit the generation task
payload = {
"model": "kling-v4",
"prompt": "A cinematic tracking shot of a cyclist riding through a sunlit coastal road, gentle ocean breeze and natural motion",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9"
}
resp = requests.post(f"{API_BASE}/v1/videos/generations", headers=headers, json=payload, timeout=60)
resp.raise_for_status()
task_id = resp.json()["data"][0]["task_id"]
# 2. Poll the task until it finishes
for _ in range(200):
task_resp = requests.get(f"{API_BASE}/v1/tasks/{task_id}", headers=headers, timeout=30)
task_resp.raise_for_status()
task = task_resp.json()["data"]
if task["status"] == "completed":
print(task["result"]["videos"][0]["url"][0])
break
if task["status"] == "failed":
raise RuntimeError(task.get("error", {}).get("message", "generation failed"))
time.sleep(10)
else:
raise TimeoutError(f"task {task_id} did not finish in time; continue GET polling with this task ID")curl -X POST https://api.apimart.ai/v1/videos/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v4",
"prompt": "Animate this scene with a slow camera push-in, subtle natural movement and consistent composition",
"resolution": "720p",
"duration": 5,
"image_urls": [
"https://example.com/first-frame.jpg"
]
}'TASK_ID="task_xxx" # replace with the task_id returned by the POST request
curl "https://api.apimart.ai/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $APIMART_API_KEY"| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Required | Default: kling-v4 | Fixed model ID: kling-v4. |
prompt | string | Optional | Default: — | Required except for image-to-video, where it may be omitted. |
duration | integer | Optional | Default: 5 | 3–30 whole seconds; default 5. For editing, omission follows the input duration. For extension, this is the new clip length. |
resolution | string | Optional | Default: 720p | 720p or 1080p; default 720p. |
aspect_ratio | string | Optional | Default: — | 16:9, 9:16, 1:1 or 21:9; reference mode also accepts auto. Defaults: text 16:9, image follows first frame, reference auto, edit follows source. Omit for extension. |
image_urls | string[] | Optional | Default: — | Image mode: first frame then optional last frame, at most two. Explicit reference mode and editing: up to ten reference images. |
image_with_roles | object[] | Optional | Default: — | Objects with url and role: first_frame, last_frame, keyframe or reference_image. Up to eight keyframes and ten frame images total; middle_frame is also accepted. |
first_frame_image | string | Optional | Default: — | First-frame image URL for image-to-video. |
last_frame_image | string | Optional | Default: — | Last-frame image URL; in extension, the target end frame. |
video_urls | string[] | Optional | Default: — | Reference videos: up to five and 30 seconds in total. Editing or extension also accepts one entry instead of video_url. |
video_url | string | Optional | Default: — | One source video for edit or extend; set omni_reference_task_type explicitly. Editing requires at least 3 seconds and trims beyond 30. |
audio_urls | string[] | Optional | Default: — | Up to three reference audio clips, each 5–30 seconds. Images, videos and audio together must not exceed 15 files. |
omni_reference_task_type | string | Optional | Default: auto | auto, reference, edit or extend. A standalone video_url requires edit or extend. Explicit reference treats image_urls as reference images. |
audio_setting | string | Optional | Default: — | origin keeps source audio; auto regenerates it. Available for editing and reference mode with video. Editing defaults to origin, reference to auto. Omit for extension. |
Compare Kling video models on APIMart. Check each model’s availability, capabilities and pricing on its own page.
| Model | Best for | Resolution | Duration |
|---|---|---|---|
| Kling 4.0 APIThis page | Text, frame and multimodal generation, video editing and extension, always with stereo audio | 720P / 1080P | 3–30 s |
| Kling 4.0 Flash API | Faster 720p text, first-frame and reference generation, video editing and extension, always with audio | 720P | 3–20 s |
| Kling 3.0 API | Cinematic text-to-video and image-to-video with first/last-frame control and multi-shot prompts | 720P / 1080P / 4K | 3–15 s |
| Kling 3.0 Omni API | All-in-one generation from text, images and video, with reference roles and video editing | 720P / 1080P / 4K | 3–15 s |
| Kling 3.0 Turbo API | Speed-optimized text-to-video and first-frame image-to-video | 720P / 1080P | 3–15 s |
| Kling Video O1 API | One model for text-to-video, image references, first/last frames and video editing | 720P / 1080P | 5 s / 10 s |
| Kling 2.6 API | Native audio (pro mode), dynamic masks and camera control | 720P / 1080P | 5 s / 10 s |
| Kling Motion Control 2.6 API | Transfer motion from a reference video onto the subject of your image | 720P / 1080P | Follows reference video |
| Kling 3.0 Motion Control API | Newer Kling 3.0 generation of reference-video motion transfer | 720P / 1080P | Follows reference video |
Five video workflows share one kling-v4 model ID, with frame control, multimodal references and resolution-based pricing.
Create, adapt and continue videos with the five Kling 4.0 workflows.
Create a key, select a workflow and submit your first video task.
Sign in to APIMart, create an API key and fund your balance before paid requests.
Choose text, image, reference, edit or extend; add the required prompt and media, then review the live price.
Submit to POST /v1/videos/generations and query GET /v1/tasks/{task_id} until the task finishes.
Modes, reference limits, pricing, audio and API integration.
Kling 4.0, also called Kling AI 4.0 or Kling4.0, uses model ID kling-v4. Text-only requests generate from text; a first frame selects image mode; reference images, video_urls or audio_urls select reference mode. Set omni_reference_task_type to edit or extend with video_url for those workflows. Kling 4.0 Flash has a separate page.
According to reports of Kuaishou's announcement, Kling 4.0 officially launched on October 15, 2026, after a Kling 4.0 Flash preview opened to some subscribers on September 28, 2026. On APIMart the full model is available as kling-v4; Kling 4.0 Flash has its own page.
Kling 4.0 extends clips to 3–30 seconds, always adds stereo audio, supports 21:9, up to 8 intermediate keyframes, references with video and audio, video editing and extension, all under one model ID. Kling 3.0 stops at 15 seconds but offers 4K, negative prompts and multi-shot parameters, which kling-v4 does not support.
Image mode requires one first frame and allows one last frame plus up to eight keyframes, with ten frame images total. Reference mode allows ten images, five videos totaling 30 seconds, and three audio clips of 5–30 seconds each, up to 15 files combined. Address them as @Image1, @Video1 and @Audio1 in the prompt.
Text, image, image/audio-only reference generation and extension use output seconds; extension counts only newly generated footage. Editing and reference generation with video use output + max(output, input) at the video-input rate. Input duration is summed, rounded up and capped at 30 seconds. Editing a 3.04-second video without duration produces 4 seconds and bills 8 seconds. Check the live rates on this page. Failed generations are fully refunded; input-duration probe failures return 400 without charge.
Standard generation is billed per output second at the 720p or 1080p rate shown on this page, so a 5-second 720p clip costs five times the 720p rate. Editing and reference generation with video use the video-input rate described above. You only pay for successful requests.
Yes. Prices on this page are Gold member prices, 20% off. Platinum and Diamond members save more, up to 28%, and you only pay for successful requests.
No. There is no free quota for the Kling 4.0 API on APIMart. Billing is pay-as-you-go per second, you only pay for successful requests, and member prices start at 20% off.
Sign up for APIMart, open the API Keys page in your dashboard and create a key. The same key calls kling-v4 and every other model on APIMart, with pay-as-you-go billing and no subscription.
Outputs are 720p or 1080p, 3–30 seconds, and always include stereo audio. Text defaults to 16:9, image to the first-frame ratio, reference to auto and editing to the source ratio. Explicit ratios are 16:9, 9:16, 1:1 and 21:9; auto is reference-only. Editing keeps original sound by default; audio_setting auto regenerates it. Reference mode with video can use origin to keep its sound.
Submit POST /v1/videos/generations with model kling-v4, then query GET /v1/tasks/{task_id}. Media must be publicly accessible. Use resolution instead of mode; V3 fields such as multi_shot, multi_prompt, element_list and negative_prompt are unsupported, as is audio false.
No. Extension adds 3–30 seconds after the input’s last frame and returns the original video joined to the new footage. Only new output seconds are billed. You can specify a target last_frame_image or last_frame role. Do not send aspect_ratio or audio_setting; framing is inherited, original audio is preserved and new audio is generated.
Explore more models in the same category.

ViduQ 4 Preview
Vidu Q4 Preview is ShengShu's image-to-video and reference-to-video model. Animate one first frame or combine up to 15 reference images and 3 audio clips into 3–16 second videos at up to 4K, with audio generated by default.

Wan 3.0 Video Prime
Wan 3.0 Prime is the Prime version of Alibaba Cloud's all-in-one Wan 3.0 video model, with general, first-and-last-frame and file or webpage modes and 2–30 second output.

Gemini Omni 1.1 Flash
Gemini Omni 1.1 Flash is a multimodal video model officially released by Google that supports rapid generation, natural language editing, and cinematic-quality visual control. This page connects to the official service through APIMart’s unified video API and uses separate pricing and task logs.

MiniMax H3 Max
MiniMax H3 Max generates video from text and images at 480P, 768P or 1080P with 5–15 second clips, first/last frames, multimodal references and synced audio.