Skip to content
Kling 4.0 is on Runway Dev 20% off Through November 30 Get started

The API supports the models below. See pricing for per-model costs. Create an account to start building on Runway Dev.

HDR, pipeline formats, and upscaling an existing video are covered in Professional outputs.

69 models

For audio-only speech with Eleven v4, Eleven v3, or Multilingual v2, you can use a voice designed or cloned through the Voices API. See generating speech with a custom voice.

To generate several shots in one Kling 4.0 video, describe the shot order, time ranges, and transitions in promptText. Set duration to the total clip length, with the shot ranges covering that duration.

For example, this text-to-video request asks for an 8-second video with cuts at 2 and 6 seconds:

import RunwayML from '@runwayml/sdk';
const client = new RunwayML();
const task = await client.textToVideo
.create({
model: 'kling_4',
promptText: [
"An 8-second film with exactly three distinct camera shots and hard cuts at 2 " +
"seconds and 6 seconds. Keep the same objects and kitchen throughout. No dissolves, " +
"no text, no extra shots.",
"SHOT 1 — 0–2 seconds: SHOT 1. Wide frontal view of a glossy red ceramic teapot and " +
"a white cup on a pale wooden table in a sunlit kitchen. A hand reaches for the " +
"teapot. Locked camera. Photorealistic.",
"SHOT 2 — 2–6 seconds: SHOT 2. Hard cut to a tight side close-up of the same glossy " +
"red ceramic teapot pouring amber tea into the same white cup on the pale wooden " +
"table. Only the spout, tea stream and cup are visible. Photorealistic.",
"SHOT 3 — 6–8 seconds: SHOT 3. Hard cut to a directly overhead view of the same " +
"white cup full of amber tea beside the same red ceramic teapot on the pale wooden " +
"table. The hand exits. Locked camera. Photorealistic.",
].join('\n'),
ratio: '1280:720',
duration: 8,
})
.waitForTaskOutput();
console.log(task.output);

Shot timings are instructions to the model, not frame-exact edit points. Review the generated clip when precise pacing matters. See Kling’s prompting guide for more examples.

To try this in the Playground, choose Kling 4.0 text-to-video, paste the shot list into the prompt field, and set the duration to 8 seconds.

Seedream 5 Pro Layers (seedream5_pro_layers) separates one source image into a base image and editable transparent layers. Send one image to POST /v1/text_to_image; promptText is optional and can describe how to split the image. The default prompt asks the model to split the image automatically.

resolution accepts auto (the default), 1k, 1.5k, or 2k. optimizePromptMode accepts standard (the default) or fast. outputFormat sets the base image format to png (the default) or jpeg; separated layers are always PNG with transparency. The request returns one decomposition, regardless of resolution.

{
"model": "seedream5_pro_layers",
"referenceImages": [
{ "uri": "https://example.com/source.png" }
],
"promptText": "Separate the title, plant, cup, and sun into layers",
"resolution": "2k",
"optimizePromptMode": "standard",
"outputFormat": "png"
}

When the task succeeds, output contains the image URLs and layers describes the separated layers. Each layer’s uri matches the output URL at the same index. Layer details may include a name, zIndex (stacking order), and boundingBox in absolute and normalized coordinates. See image input requirements and pricing.

Seedream 5.5 Layers (seedream5.5_layers) separates one source image into a base image and editable transparent layers, in the same way as Seedream 5 Pro Layers. Send one image to POST /v1/text_to_image; promptText is optional and can describe which elements to separate.

resolution accepts auto (the default), 1k, 1.5k, or 2k. outputFormat sets the base image format to png (the default) or jpeg; separated layers are always PNG with transparency. maxImages sets the most images the task may return, counting the base image, from 2–100 (default 30). optimizePromptMode is not supported.

{
"model": "seedream5.5_layers",
"referenceImages": [
{ "uri": "https://example.com/source.png" }
],
"promptText": "Separate the title, plant, cup, and sun into layers",
"resolution": "2k",
"outputFormat": "png",
"maxImages": 12
}

The completed task has the same output and layers fields as Seedream 5 Pro Layers. Each returned image is billed, so a lower maxImages lowers the credits a task needs to start. See image input requirements and pricing.

Choose 4K output with a pixel ratio on text to video, image to video, or video to video in reference mode. Use ratio, not a separate resolution parameter. Omitting it still defaults to 720p (1280:720).

Aspect ratio4K ratio
21:93840:1646
16:93840:2160
4:33840:2880
1:13840:3840
3:42880:3840
9:162160:3840

For example, send this body to POST /v1/text_to_video:

{
"model": "seedance2_5",
"promptText": "A red panda walks through a lantern-lit alley",
"ratio": "3840:2160",
"duration": 5
}

Durations remain 4–30 seconds, or auto. Video-to-video extend and edit modes do not accept a ratio and do not render at 4K. Draft previews remain 480p, and enhancing a draft produces 1080p, not 4K. See pricing, input requirements, and usage limits.

Seedance 2.5 (seedance2_5) can render a faster 480p preview, then enhance that preview to 1080p. Use a preview to check a prompt, then pay the 1080p rate for the take you keep. See pricing for both rates.

Set draft to true on a normal text to video, image to video, or video to video request. Prompt, ratio, duration (including auto), references, audio, and seed work the same way as a full generation.

The preview is always 480p .mp4, and it is billed at the 480p rate. outputFormat: "mov" is rejected with draft: true, and the enhanced 1080p take is .mp4 too. ratio still chooses the aspect ratio: a 720p, 1080p, or 4K ratio is accepted, and the preview uses the 480p frame for that aspect (16:9 / 9:16 land on 854:480 / 480:854).

{
"model": "seedance2_5",
"promptText": "A red panda walks through a lantern-lit alley",
"ratio": "1280:720",
"duration": 5,
"draft": true
}

Poll the returned task until status is SUCCEEDED. The task id is what you pass to enhance it.

Enhancement is always a text to video request, including when the preview came from image to video or video to video. Send model and draftTaskId only. The 1080p video reuses the preview’s prompt, references, duration, seed, and audio setting — when the preview used duration: "auto", the enhancement uses the measured length. An enhance request that also includes promptText, ratio, duration, seed, audio, references, or draft is rejected.

{
"model": "seedance2_5",
"draftTaskId": "11111111-1111-4111-8111-111111111111"
}

The preview task has to belong to the same account, have succeeded, and have been created with draft: true. Previews can be enhanced within 7 days of creation. The result is 1080p at the preview’s aspect ratio, billed at the 1080p rate for that output duration and any input video. The preview’s charge is unchanged.

On video to video, mode sets how Seedance 2.5 uses promptVideo:

modeWhat it doesRequirements
reference (default)Generates a new video conditioned on the input videoAccepts duration and ratio
extendContinues the input videoRequires promptText; does not accept ratio
editChanges the input video in placeRequires promptText and duration: "auto"; does not accept ratio

extend and edit keep the input video’s aspect ratio. They render at 1080p when the input video is larger than 720p, and at 720p otherwise.

{
"model": "seedance2_5",
"promptVideo": "https://example.com/input.mp4",
"promptText": "Change the jacket to red leather",
"mode": "edit",
"duration": "auto"
}