Skip to content

Kling 4.0 Reference to Video

Integrate

Model id kling/v4/reference-to-video
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/kling/v4/reference-to-video?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Files like the example: $1.175 1,175 API credits your files are measured before the run Run it on this page

Get API key
Kling Reference to Video Reference inputs3–30 sup to 1080p #reference-to-video#multi-shot#image-reference#video-reference

Generates 3-30 second videos that keep the look of up to 10 reference images, 5 reference videos and 7 elements

Made on Doitong

Public works made with Kling 4.0 by the Doitong community. Reuse a prompt in one click.

Public works shown: 16
Ultra-realistic cinematic video of a young adult woman walking naturally toward the camera while ... Video

Ultra-realistic cinematic video of a young adult woman walking naturally toward the camera while speaking, with realistic facial expressions and synchronized lip movements, as if she is promoting something to the viewer. She maintains eye contact with the camera, smiles slightly, and uses subtle...

Slow, subtle push-in on the woman's face. The light from the laptop flickers softly across her ey... Video

Slow, subtle push-in on the woman's face. The light from the laptop flickers softly across her eyes and cheeks, as if the blurry image on the screen is changing. Her eyes move slightly as she studies the screen, and she takes one slow, tense breath. Behind her, shadows of the snowstorm move...

The enormous ancient dragon descends slowly toward the snowy cliff and lands at the cave mouth. I... Video

The enormous ancient dragon descends slowly toward the snowy cliff and lands at the cave mouth. Its huge dark leathery wings beat twice with slow, heavy strokes, sending snow swirling off the cliff in big clouds. Then it folds its wings and settles on the rock, the giant elk still held in its...

**Duration: 5 seconds | Aspect ratio: 16:9 | Children's YouTube Intro | Video with Audio** Animat... Video

**Duration: 5 seconds | Aspect ratio: 16:9 | Children's YouTube Intro | Video with Audio** Animate the provided image into a bright, magical, energetic, professional YouTube intro for a children's entertainment channel, with perfectly synchronized sound effects, cheerful music, and a cute child's...

Authentic 1990s wide-angle film footage. The left man slowly pulls one wooden block from the Jeng... Video

Authentic 1990s wide-angle film footage. The left man slowly pulls one wooden block from the Jenga tower. As the block comes out, the tower naturally loses balance and realistically collapses onto the table. Frustrated, he angrily sweeps all the fallen wooden blocks off the table with both hands....

Thermal-camera view of a snowy mountain cliff at night in false-color, deep blue and violet cold ... Video

Thermal-camera view of a snowy mountain cliff at night in false-color, deep blue and violet cold rock, a huge orange-white heat shape hidden inside a rock crevice, two small bright amber spots glowing like eyes, faint noise grain. Cinematic videorealistic, ultra detailed, 16:9, volumetric light,...

**Duration: 4 seconds | Aspect ratio: 16:9 | Children's YouTube Intro | Video with Audio** Animat... Video

**Duration: 4 seconds | Aspect ratio: 16:9 | Children's YouTube Intro | Video with Audio** Animate the provided image into a bright, magical, energetic, professional YouTube intro for a children's entertainment channel, with perfectly synchronized sound effects, cheerful music, and a cute child's...

**Duration: 4 seconds | Aspect ratio: 16:9 | Children's YouTube Intro | Video with Audio** Animat... Video

**Duration: 4 seconds | Aspect ratio: 16:9 | Children's YouTube Intro | Video with Audio** Animate the provided image into a bright, magical, energetic, professional YouTube intro for a children's entertainment channel, with perfectly synchronized sound effects, cheerful music, and a cute child's...

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

88 / 2500

Generation instructions that satisfy the requirement to supply either `prompt` or `multi_prompt`. To refer to supplied inputs, use @Image1, @Video1, @Element1, and so on.

video_urls
Drop a file, or · up to 5

Up to 5 reference videos, addressed using @Video1, @Video2, and so on; each lasts 3–30 seconds (30.05 seconds at most), and their total duration together with element videos cannot exceed 30 seconds. Each file must be no larger than 300 MB, with width and height each between 700 px and 4553 px. Aspect ratio must fall between 0.40 and 2.50, and frame rate between 23.9 and 60.05 FPS.

resolution default 1080p

Resolution of the output.

aspect_ratio default 16:9

Video proportions, selected explicitly or derived from the references by choosing 'auto'.

default 5

Length of the video in seconds, from 3 to 30.

Advanced image · images · multi_prompt · elements
start_image_url
Drop a file, or

Optional first-frame image that counts against the image reference limit. Maximum file size is 30.0 MB; width and height must each reach 300 px, with an aspect ratio between 0.40 and 2.50.

image_urls
Drop a file, or · up to 10

Image references addressed using @Image1, @Image2, and so on, with at most 10 images. Each file is limited to 30.0 MB, requires at least 300 px in both dimensions, and must have an aspect ratio between 0.40 and 2.50.

Shot-by-shot generation instructions, with each prompt defining one shot whose duration contributes to the video's total length.

Collection of up to 7 characters or objects, of which at most 3 may include a `voice_id` and at most 3 may use video. Address these elements as @Element1, @Element2, and so on.

POST /run/kling/v4/reference-to-video?wait=20 quote → $1.175
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/kling/v4/reference-to-video?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Kling 4.0 Reference to Video

Creates video from a text `prompt` plus reference images, reference videos and character or object elements, which are cited in the prompt as @Image1, @Video1 or @Element1. Duration runs from 3 to 30 seconds (default 5), with output at 720p or 1080p and aspect ratios auto, 16:9, 9:16, 1:1 or 21:9. Use `multi_prompt` for per-shot prompts, in which case the total length is the sum of the shot durations. Limits are 10 images, 5 videos of 3-30s each, and 7 elements, of which up to 3 can carry a voice.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
promptoptional
Typestring | null
≤ 2,500 characters
Generation instructions that satisfy the requirement to supply either `prompt` or `multi_prompt`. To refer to supplied inputs, use @Image1, @Video1, @Element1, and so on.
multi_promptoptional
Typeobject[]
Shot-by-shot generation instructions, with each prompt defining one shot whose duration contributes to the video's total length.
multi_prompt[].promptrequired
Typestring
1 – 512 characters
Text instructions for the current shot.
multi_prompt[].durationoptional
Typeinteger
Default5
1 – 30
Duration of an individual shot, measured in seconds.
durationoptional
Typeinteger
Default5
3 – 30
Length of the video in seconds, from 3 to 30.
start_image_urloptional image
Typeurl · image
Optional first-frame image that counts against the image reference limit. Maximum file size is 30.0 MB; width and height must each reach 300 px, with an aspect ratio between 0.40 and 2.50.
image_urlsoptional images
Typeurl[] · image
≤ 10 items
Image references addressed using @Image1, @Image2, and so on, with at most 10 images. Each file is limited to 30.0 MB, requires at least 300 px in both dimensions, and must have an aspect ratio between 0.40 and 2.50.
video_urlsoptional videos
Typeurl[] · video
≤ 5 items
Up to 5 reference videos, addressed using @Video1, @Video2, and so on; each lasts 3–30 seconds (30.05 seconds at most), and their total duration together with element videos cannot exceed 30 seconds. Each file must be no larger than 300 MB, with width and height each between 700 px and 4553 px. Aspect ratio must fall between 0.40 and 2.50, and frame rate between 23.9 and 60.05 FPS.
elementsoptional
Typeobject[]
≤ 7 items
Collection of up to 7 characters or objects, of which at most 3 may include a `voice_id` and at most 3 may use video. Address these elements as @Element1, @Element2, and so on.
elements[].frontal_image_urloptional
Typeurl · image
Front-facing image showing the element's main view. Maximum file size is 30.0 MB; both dimensions must be at least 300 px, and the aspect ratio must be between 0.40 and 2.50.
elements[].reference_image_urlsoptional
Typeurl[] · image
≤ 3 items
Supplementary images showing different angles of the element, with 1 to 3 views. Each file may be at most 30.0 MB, must measure at least 300 px in both dimensions, and must have an aspect ratio between 0.40 and 2.50.
elements[].video_urloptional
Typeurl · video
Video representation of an element in place of images, lasting 3–30 seconds (30.05 seconds at most). The file must not exceed 300 MB; both width and height must be within 700–4553 px. Supported aspect ratios span 0.40–2.50, with frame rates of 23.9–60.05 FPS.
elements[].voice_idoptional
Typestring | null
Voice assigned to the element.
resolutionoptional
Typeenum
Default1080p
720p1080p
Resolution of the output.
aspect_ratiooptional
Typeenum
Default16:9
auto16:99:161:121:9
Video proportions, selected explicitly or derived from the references by choosing 'auto'.
required Canonical name, also accepted

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "kling/v4/reference-to-video",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 1175,
    "usd": "1.175",
    "charged": 1175,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "video": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_name": "0-output.mp4",
      "file_size": 1843200
    }
  },
  "outputs": [
    {
      "type": "video",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_size": 1843200,
      "width": 1280,
      "height": 720,
      "duration": 5,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
video
object {url, content_type, file_name, file_size}Video produced by the model.

More models: Reference to Video

For AI agents: this page as Markdown is at https://doitong.com/developers/models/kling/v4/reference-to-video.md. All models and guides: https://doitong.com/developers/llms.txt