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
**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...

**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...

**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...

Уютная база отдыха с деревянными домиками-шале среди сосен. Майя и Клиентка заходят в теплое кафе... Video

Уютная база отдыха с деревянными домиками-шале среди сосен. Майя и Клиентка заходят в теплое кафе с панорамными окнами. Внутри деревянный интерьер, мягкие диваны и живые цветы. Они садятся за столик, перед ними стоят дымящиеся чашки чая. Мягкий свет ламп создает уют. Средний план, уровень глаз. (...

**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...

Реалистично оживи старую семейную фотографию. Все люди сохраняют свои оригинальные лица, черты вн... Video

Реалистично оживи старую семейную фотографию. Все люди сохраняют свои оригинальные лица, черты внешности, возраст, причёски и одежду. Мужчины слегка поворачивают головы, естественно моргают и едва заметно улыбаются. Женщина слева спокойно смотрит в камеру и мягко моргает. Маленький ребёнок слегка...

Create a realistic 30-second vertical 9:16 video showing two construction workers installing larg... Video

Create a realistic 30-second vertical 9:16 video showing two construction workers installing large white patio tiles in a modern backyard. Show the entire construction process in a smooth timelapse. Gradually transform the unfinished backyard into a luxurious outdoor living space with an L-shaped...

Create a warm, emotional 8–10 second cinematic video showing the difference between a young child... Video

Create a warm, emotional 8–10 second cinematic video showing the difference between a young child playing alone and playing with their mother. Scene 1: A toddler sits on the floor playing with toys independently. The child is calm and focused, exploring and learning through independent play. The...

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