
01 · Image to video
Bring a street-fashion portrait to life
Load a still photo as the first frame and add subtle movement with a slow camera push, keeping the person, outfit and scene layout unchanged. See the video in the output area.
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.
Transparent pricing with no hidden fees. Pay only for what you use.
Featured examples
Pick an example to load the model, prompt and full settings, then adjust it your way.

01 · Image to video
Load a still photo as the first frame and add subtle movement with a slow camera push, keeping the person, outfit and scene layout unchanged. See the video in the output area.

02 · Dialogue with native audio
Write the exact line and the ambient sound to get a clip with native synchronized speech: one barista says a single clear line with natural lip motion, over rain and room ambience, with no subtitles.
Reference03 · Video continuation
Load a source clip and continue from its last frame, keeping the subject, camera direction, lighting and motion consistent at the seam without jumping to a new scene. See the continuation in the output area.
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.
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.
Generate from a text prompt or a first frame with an optional last frame. Image-to-video can omit the prompt; other modes require it.
Add up to eight intermediate keyframes in array order. First frame, last frame and keyframes together allow up to ten images.
Combine up to ten images, five videos totaling at most 30 seconds, and three audio clips of 5–30 seconds each; at most 15 reference files overall.
Edit one input video with up to ten reference images. Input must be at least 3 seconds; content beyond 30 seconds is trimmed. Omitted duration and ratio follow the input.
Continue from the last frame for 3–30 new seconds, optionally targeting an end frame. The result combines the original and new clip; only new seconds are billed.
Choose 720p or 1080p and 3–30 whole seconds. Defaults are 720p and 5 seconds. Every output includes a stereo audio track.
Use 16:9, 9:16, 1:1 or 21:9. Reference generation also accepts auto; image generation inherits the first frame by default, while extension keeps the source ratio.
Standard generation bills output seconds. Editing and video references bill output + max(output, input); input seconds are summed, rounded up and capped at 30.
Create, adapt and continue videos with the five Kling 4.0 workflows.
Animate a product image with first- and last-frame control and synchronized sound.
Use ordered keyframes to guide the visual progression of a short scene.
Create portrait or landscape clips, or extend an existing video while keeping its framing.
Connect asynchronous kling-v4 generation, status queries and result handling to your application.
Combine product images, camera-motion references and audio, or edit an existing advertisement.
Turn lesson scripts into narrated scenes and extend demonstrations with new footage.
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.

Vidu Q4 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.