KlingAI 2.1 Master
KlingAI 2.1 Master is the flagship Kling video model. It targets professional pipelines that need tight motion control, strong semantic fidelity, and multi image reference for character consistency. Generate short 1080p clips that stay coherent across shots and complex prompts.
API Options
Platform-level options for task execution and delivery.
-
taskType
string required value: videoInference -
Identifier for the type of task being performed
-
taskUUID
string required UUID v4 -
UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.
-
outputType
string default: URL -
Video output type.
Allowed values 1 value
-
outputFormat
string default: MP4 -
Specifies the file format of the generated output. The available values depend on the task type and the specific model's capabilities.
- `MP4`: Widely supported video container (H.264), recommended for general use.
- `WEBM`: Optimized for web delivery.
- `MOV`: QuickTime format, common in professional workflows (Apple ecosystem).
Allowed values 3 values
-
outputQuality
integer min: 20 max: 99 default: 95 -
Compression quality of the output. Higher values preserve quality but increase file size.
-
webhookURL
string URI -
Specifies a webhook URL where JSON responses will be sent via HTTP POST when generation tasks complete. For batch requests with multiple results, each completed item triggers a separate webhook call as it becomes available.
Learn more 1 resource
- Webhooks PLATFORM
- Webhooks
-
deliveryMethod
string default: async -
Determines how the API delivers task results.
Allowed values 1 value
- Returns an immediate acknowledgment with the task UUID. Poll for results using getResponse. Required for long-running tasks like video generation.
Learn more 1 resource
- Task Polling PLATFORM
-
uploadEndpoint
string URI -
Specifies a URL where the generated content will be automatically uploaded using the HTTP PUT method. The raw binary data of the media file is sent directly as the request body. For secure uploads to cloud storage, use presigned URLs that include temporary authentication credentials.
Common use cases:
- Cloud storage: Upload directly to S3 buckets, Google Cloud Storage, or Azure Blob Storage using presigned URLs.
- CDN integration: Upload to content delivery networks for immediate distribution.
// S3 presigned URL for secure upload https://your-bucket.s3.amazonaws.com/generated/content.mp4?X-Amz-Signature=abc123&X-Amz-Expires=3600 // Google Cloud Storage presigned URL https://storage.googleapis.com/your-bucket/content.jpg?X-Goog-Signature=xyz789 // Custom storage endpoint https://storage.example.com/uploads/generated-image.jpgThe content data will be sent as the request body to the specified URL when generation is complete.
-
safety
object -
Content safety checking configuration for video generation.
Properties 2 properties
-
safety»checkContentcheckContent
boolean default: false -
Enable or disable content safety checking. When enabled, defaults to
fastmode.
-
safety»modemode
string default: none -
Safety checking mode for video generation.
Allowed values 3 values
- Disables checking.
- Checks key frames.
- Checks all frames.
-
-
ttl
integer min: 60 -
Time-to-live (TTL) in seconds for generated content. Only applies when
outputTypeisURL.
-
includeCost
boolean default: false -
Include task cost in the response.
-
numberResults
integer min: 1 max: 4 default: 1 -
Number of results to generate. Each result uses a different seed, producing variations of the same parameters.
Inputs
Input resources for the task (images, audio, etc). These must be nested inside the inputs object.
inputs object.-
inputs»frameImagesframeImages
array of strings or objects items: 1 -
An array of frame-specific image inputs to guide video generation. Each item can be either a plain image input (UUID, URL, Data URI, or Base64) or an object that pairs an image with a target frame position.
The
frameImagesparameter allows you to constrain specific frames within the video sequence, ensuring that particular visual content appears at designated points. This is different fromreferenceImages, which provide overall visual guidance without constraining specific timeline positions.When the
frameparameter is omitted, automatic distribution rules apply:- 1 image: Used as the first frame.
Examples 2 examples
Shorthand format: When you don't need to specify a frame position, you can pass a plain image input directly.
"frameImages": [ "aac49721-1964-481a-ae78-8a4e29b91402" ]Object format: When you need to specify a frame position, use an object with
imageandframe."frameImages": [ { "image": "aac49721-1964-481a-ae78-8a4e29b91402", "frame": "first" } ]Format 1: string[]
-
Image input (UUID, URL, Data URI, or Base64).
Format 2: object[] 2 properties
Generation Parameters
Core parameters for controlling the generated content.
-
model
string required value: klingai:5@3 -
Identifier of the model to use for generation.
Learn more 3 resources
-
positivePrompt
string required min: 2 max: 2500 -
Text prompt describing elements to include in the generated output.
Learn more 2 resources
-
negativePrompt
string min: 2 max: 2500 -
Prompt to guide what to exclude from generation. Ignored when guidance is disabled (CFGScale ≤ 1).
Learn more 1 resource
-
width
integer paired with height -
Width of the generated media in pixels.
Learn more 2 resources
-
height
integer paired with width -
Height of the generated media in pixels.
Learn more 2 resources
-
duration
float default: 5 -
Length of the generated video in seconds. The total number of frames produced is determined by duration multiplied by the model's frame rate (fps).
Allowed values 2 values
-
CFGScale
float min: 0 max: 1 step: 0.01 default: 0.5 -
Guidance scale representing how closely the output will resemble the prompt. Higher values produce results more aligned with the prompt.
Learn more 1 resource
Deserted Orbital Shipyard Dawn
{
"taskType": "videoInference",
"taskUUID": "e613fb01-17f4-4dbf-85bd-05ea4a15aa2c",
"model": "klingai:5@3",
"positivePrompt": "A vast abandoned orbital shipyard suspended above a rust-colored planet at daybreak, enormous unfinished starships drifting in docking cradles, thin construction gantries stretching across the frame, tiny maintenance drones gliding between hulls, soft golden sunlight emerging from the planet's horizon and spilling across metal surfaces, slow cinematic camera push forward, subtle parallax between foreground struts and distant vessels, drifting dust and vapor trails, reflective panels catching warm highlights, a lone worker in a magnetic suit crossing a narrow beam for scale, ultra-detailed industrial science fiction, grounded realism, elegant composition, atmospheric depth, coherent motion, high-end feature film look",
"negativePrompt": "text, watermark, logo, low resolution, blurry, jittery motion, warped anatomy, duplicate subjects, extra limbs, flicker, oversaturated colors, cartoon style, heavy noise, frame instability, deformed machinery, chaotic camera shake",
"width": 1920,
"height": 1080,
"duration": 5,
"CFGScale": 0.6
}{
"taskType": "videoInference",
"taskUUID": "e613fb01-17f4-4dbf-85bd-05ea4a15aa2c",
"videoUUID": "365dbe1a-04d4-4674-a393-2afff044fb30",
"videoURL": "https://vm.runware.ai/video/os/a02d21/ws/5/vi/365dbe1a-04d4-4674-a393-2afff044fb30.mp4",
"seed": 169984304,
"cost": 0.924
}Amber Dust Racing Expanse
{
"taskType": "videoInference",
"taskUUID": "d13360ba-2b39-42ab-a314-8b08b6a8190b",
"model": "klingai:5@3",
"positivePrompt": "A high-speed endurance race across a vast ochre desert plain filled with towering stone arches and scattered mirror-like mineral shards. Three sleek retro-futurist sand skimmers skim low over the ground, leaving curling trails of dust and sparks. The lead vehicle is matte ivory with crimson markings, chased closely by a cobalt rival and a bronze support craft. Camera begins in a wide aerial view, then drops into a fast side-tracking shot alongside the lead racer, showing suspension vibration, spinning turbines, and debris whipping past the lens. In the distance, enormous petrified tree trunks and half-buried monolithic statues create a mysterious ancient-world backdrop. Heat haze shimmers near the ground, sunlight is harsh and golden, shadows are sharp, and the atmosphere feels tense and exhilarating. Emphasize cinematic scale, crisp subject clarity, believable vehicle motion, coherent geography, dramatic speed, and polished blockbuster visual quality.",
"negativePrompt": "blurry vehicles, broken anatomy, duplicate racers, flickering dust trails, unstable camera, warped wheels, low detail, muddy textures, text, watermark, logo, frame glitches, extra vehicles appearing, chaotic composition",
"width": 1920,
"height": 1080,
"duration": 5,
"CFGScale": 0.7
}{
"taskType": "videoInference",
"taskUUID": "d13360ba-2b39-42ab-a314-8b08b6a8190b",
"videoUUID": "ea1d9189-ac95-4aca-adab-9840dad93128",
"videoURL": "https://vm.runware.ai/video/os/a12d13/ws/5/vi/ea1d9189-ac95-4aca-adab-9840dad93128.mp4",
"seed": 398780056,
"cost": 0.924
}Deserted Hyperloop Terminal Dawn
{
"taskType": "videoInference",
"taskUUID": "02b450c6-3635-4c6a-bcc4-dd31bbedb64d",
"model": "klingai:5@3",
"positivePrompt": "Animate this single establishing frame into a polished sci-fi sequence. Slow cinematic dolly forward through a vast futuristic hyperloop terminal in the desert at first light. The lone traveler in a saffron coat remains the focal point while fabric edges shift gently, faint dust drifts across the platform, soft reflections glide along the polished floor, and a distant magnetic train emits subtle motion cues. Preserve architectural design, subject placement, and realistic proportions. Emphasize premium cinematography, restrained motion, atmospheric scale, clean lines, and coherent environmental details.",
"negativePrompt": "extra people, warped anatomy, duplicate subject, chaotic camera shake, flicker, low detail, oversaturated colors, text, watermark, logo, deformed train, collapsing architecture, abrupt motion, heavy blur, noisy image",
"width": 1920,
"height": 1080,
"duration": 5,
"CFGScale": 0.5,
"inputs": {
"frameImages": [
{
"image": "https://assets.runware.ai/assets/inputs/8121531c-80b0-4925-8e2b-6b72ccebb764.jpg",
"frame": "first"
}
]
}
}{
"taskType": "videoInference",
"taskUUID": "02b450c6-3635-4c6a-bcc4-dd31bbedb64d",
"videoUUID": "4222e069-1938-4548-8d92-482fede26789",
"videoURL": "https://vm.runware.ai/video/os/a25d05/ws/5/vi/4222e069-1938-4548-8d92-482fede26789.mp4",
"seed": 1663154420,
"cost": 0.924
}Desert Monorail Mirage Chase
{
"taskType": "videoInference",
"taskUUID": "db6f5451-838c-4273-a2ea-178d7eadd055",
"model": "klingai:5@3",
"positivePrompt": "Starting from the provided first frame, a sleek silver monorail speeds across elevated rails through a vast red desert filled with colossal geometric stone arches. Two riders on hovering bikes weave alongside the train, kicking up curling dust trails. The camera begins in a wide establishing view and glides into a fast lateral tracking shot, emphasizing velocity, suspension sway, and shimmering heat distortion. Fine particulate dust, sun glare on metal panels, and parallax from the passing arches create strong depth. Cinematic action, crisp environmental detail, realistic motion, coherent subject continuity, polished high-end sci-fi adventure aesthetic.",
"negativePrompt": "low detail, jittery motion, warped train, deformed riders, extra vehicles, duplicated subjects, flicker, text, watermark, logo, blurry frames, washed out colors, camera shake, frame tearing",
"width": 1920,
"height": 1080,
"duration": 5,
"CFGScale": 0.5,
"inputs": {
"frameImages": [
{
"image": "https://assets.runware.ai/assets/inputs/5b68dfcd-52ef-4268-9f4d-f2823d669355.jpg",
"frame": "first"
}
]
}
}{
"taskType": "videoInference",
"taskUUID": "db6f5451-838c-4273-a2ea-178d7eadd055",
"videoUUID": "c5c920b3-cde0-4430-8023-d704a703f4ad",
"videoURL": "https://vm.runware.ai/video/os/a23d05/ws/5/vi/c5c920b3-cde0-4430-8023-d704a703f4ad.mp4",
"seed": 1397486977,
"cost": 0.924
}Anime Mecha Hangar Dawn
{
"taskType": "videoInference",
"taskUUID": "88f9c880-5af6-45e1-8733-89d36bf35538",
"model": "klingai:5@3",
"positivePrompt": "Use the provided anime frame as the visual foundation. Create a polished cinematic animation in premium anime style. A vast aerospace launch hangar opens toward a brilliant sunrise, with a young mecha pilot on a metal gantry facing a towering white-and-crimson humanoid robot covered in panel lines and maintenance markings. Subtle camera push-in with slight lateral drift for parallax. The pilot's jacket hem and hair move gently from ventilation airflow. Small service drones glide through the space, indicator lights blinking. Thin vapor curls around the robot's legs, suspended dust catches shafts of warm light, distant technicians and machinery remain readable but secondary. Mechanical parts make restrained idle adjustments: a shoulder panel settles, a head sensor brightens, tiny hydraulic twitches, cables sway softly. Preserve clean cel shading, crisp linework, strong anime color design, coherent scale, and stable character identity. Emphasize controlled motion, depth, and professional shot continuity.",
"negativePrompt": "live action, photorealistic, low detail, deformed anatomy, extra limbs, flicker, jitter, unstable lines, blurry face, warped robot parts, chaotic motion, camera shake, text, watermark, logo, oversaturated glow, horror, gore",
"width": 1920,
"height": 1080,
"duration": 5,
"CFGScale": 0.6,
"inputs": {
"frameImages": [
{
"image": "https://assets.runware.ai/assets/inputs/8045687a-cd59-42d8-82c3-bc914a9dd405.jpg",
"frame": "first"
}
]
}
}{
"taskType": "videoInference",
"taskUUID": "88f9c880-5af6-45e1-8733-89d36bf35538",
"videoUUID": "819a9c07-5bfd-439f-b98a-ae5c9bbf8937",
"videoURL": "https://vm.runware.ai/video/os/a14d18/ws/5/vi/819a9c07-5bfd-439f-b98a-ae5c9bbf8937.mp4",
"seed": 166208377,
"cost": 0.924
}