Kling 4.0 Reference to Video
Integréieren
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"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/kling/v4/reference-to-video?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/kling/v4/reference-to-video", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
# 1. Connect once (Claude Code; Cursor, VS Code, Claude Desktop: https://doitong.com/lb/developers/docs/mcp)
claude mcp add --transport http doitong-models https://api.doitong.com/v1/mcp \
--header "Authorization: Bearer $DOITONG_API_KEY"
# 2. Your agent calls the "run" tool with:
{
"model_id": "kling/v4/reference-to-video",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}
}
Rufft de Kling 4.0 Reference to Video-Modell (kling/v4/reference-to-video) iwwer d'Doitong API op. Dokumentatioun fir Agenten: https://doitong.com/lb/developers/models/kling/v4/reference-to-video.md
POST https://api.doitong.com/v1/run/kling/v4/reference-to-video?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}
Wann de Äntwertstatus "queued" oder "running" ass, frot GET https://api.doitong.com/v1/requests/REQUEST_ID?wait=20 of, bis en "succeeded" ass; d'Dateie stinn an outputs[].url. POST https://api.doitong.com/v1/quote/kling/v4/reference-to-video mam selwechte Body gëtt de geneeë Präis virun der Ausféierung zréck.
Dateie wéi am Beispill: 1,175 $ 1.175 API-Kreditter Är Dateie gi virun der Ausféierung gemooss Op dëser Säit ausféieren
Ären neien API-Schlëssel. Si gëtt nëmmen elo ugewisen a steet schonn am Code an am API-Schlëssel-Feld hei drënner. Halt se geheim: Setz se ni an Code, deen an engem Browser leeft.
Op Doitong erstallt
Ëffentlech Wierker, déi d'Doitong-Communautéit mat Kling 4.0 erstallt huet. Benotz e Prompt mat engem Klick nach eng Kéier.
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
**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
**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
**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
Моя первая глобальная цель — 10.000 подписчиков. Я хочу расти вместе с вами, делать сериалы ещё круче, масштабнее и в итоге превратить это в полноценный проект, чтобы в дальнейшем монетизировать свой блог. Путь к первой десятке объявляю открытым. Идём со мной? Мне нужно такое видео в трёх кадрах...
Video
Оживи старую чёрно-белую свадебную фотографию. Молодожёны стоят рядом друг с другом. Жених нежно и с любовью смотрит на невесту, слегка улыбается и бережно касается её руки. Невеста мягко улыбается, немного поворачивает голову к жениху и смотрит на него с теплотой. Их движения естественные,...
Video
Кролик открывает дверь девушке, девушка дает чаевые кролику и говорит « спасибо, мой ушастый друг», он закрывает за ней дверь и говорит «Пожалуйста, красотка» после того как она села в машину за руль, кролик немного отходит, девушка в дрифте уезжает, все в одной сцене. Съемка кинематографичная....
Video
Animate this image realistically. Make me look like I am working at the computer: my eyes should naturally look at the screen, my hands should move naturally as if typing on the keyboard, and occasionally use the mouse. Add subtle, realistic movements to my head and body. Keep my facial...
Video
«Шедевр» Духовка резко открывается. ПУФ! Облако пара исчезает — внутри стоит красивый золотистый пирог. Лиза радостно достаёт его и пробует кусочек. Лиза: «Я гений!» Пирог внезапно наклоняется и падает набок. ПЛЮХ! Лиза смотрит на него и невозмутимо говорит: Лиза: «Ну… почти.» Камера быстро...
Video
В видео показана короткая драматическая история примерно на 29 секунд: * 0–4 сек. Мужчина со слезами на глазах держит оружие и выглядит глубоко расстроенным. * 4–8 сек. Он направляет оружие на женщину в клетчатой рубашке. Женщина зомби стоит спокойно, между ними напряжённая атмосфера. * 8–12 сек....
Video
«same character as reference, [сцена]». Кадры для песни Colores (вертикальные 9:16): Оба машут, приветствие Pipo держит красное яблоко Luna под голубым небом с голубым шариком Жёлтое солнце и цыплёнок рядом с героями Зелёная лягушка на листе, герои смотрят на неё Фиолетовый виноград Оба танцуют...
Video
Create a premium vertical Instagram Reels advertisement introducing “JÉRÉMIE IA”, the intelligent AI assistant integrated into the GENESIS mobile application. FORMAT: - Vertical 9:16 - 1080x1920 - 15–20 seconds - Premium social media advertising - Modern motion design - Cinematic technology...
Video
Сцена 1 — Появление Кивя (8 сек) Cinematic slow motion, tropical island beach, beautiful anthropomorphic kiwi woman Kivya stepping out of helicopter, glossy skin, elegant bikini, sunglasses, confident smile, other cute fruit characters watching in surprise: strawberry Klubni, banana Bananych,...
Video
Сцена 1 — Появление Кивя (8 сек) Cinematic slow motion, tropical island beach, beautiful anthropomorphic kiwi woman Kivya stepping out of helicopter, glossy skin, elegant bikini, sunglasses, confident smile, other cute fruit characters watching in surprise: strawberry Klubni, banana Bananych,...
Video
Кадр 1 (0–3 сек) — Остров, идиллия Что в кадре: Тропический пляж, закат. Четверо фруктов отдыхают: • Клубни потягивает коктейль • Бананыч загорает в шезлонге • Арбузиха жуёт жвачку и закатывает глаза • Яблониха стоит с микрофоном Звук: лёгкая музыка, шум волн Настроение: спокойствие перед бурей...
Video
Создай короткую 3D-анимационную сцену для детского мусульманского мультфильма, длительность 5–6 секунд. Алия — девочка 2–3 лет, милое круглое лицо, большие карие глаза, тёмные волосы, собранные в два маленьких хвостика, светло-розовое скромное платье. Алия находится ТОЛЬКО В СВОЕЙ СОБСТВЕННОЙ...
Eng Ufro erstellen
D'Kontrolle ginn aus dem Modellschema generéiert. De Code an de Präis aktualiséiere sech, wann s du se ännerst.
/run/kling/v4/reference-to-video?wait=20
Präis → 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"
const API = "https://api.doitong.com/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/kling/v4/reference-to-video?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/kling/v4/reference-to-video", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run",
"arguments": {
"model_id": "kling/v4/reference-to-video",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
},
"wait_seconds": 20
}
}
}
Dës Ufro ausféieren
Äre Schlëssel bleift an dësem Browser: e gëtt nëmmen un d'Doitong API geschéckt an nëmme gespäichert (localStorage), wann s du „Erënneren“ aktivéiers. En API-Schlëssel kréien
Iwwer Kling 4.0 Reference to Video
Erstellt e Video aus engem Text-`prompt` plus Referenzbiller, Referenzvideoen a Charakter- oder Objektelementer, déi am Prompt als @Image1, @Video1 oder @Element1 zitéiert ginn. D'Dauer reecht vun 3 bis 30 Sekonnen (Standard 5), mat enger Ausgab an 720p oder 1080p an den Aspektverhältnisser auto, 16:9, 9:16, 1:1 oder 21:9. Benotzt `multi_prompt` fir Prompte pro Shot; an deem Fall ass d'Gesamtlängt d'Zomm vun den Dauer vun de Shots. Limite si 10 Biller, 5 Videoe vun all Kéier 3-30s an 7 Elementer, vun deenen bis zu 3 eng Stëmm kënne mat sech féieren.
Parameteren
Schéck entweder den kanoneschen Numm oder den natierlechen Numm, net béid. Kanonesch Nimm
promptoptional
multi_promptoptional
multi_prompt[].promptobligatoresch
multi_prompt[].durationoptional
durationoptional
start_image_urloptional
image
image_urlsoptional
images
video_urlsoptional
videos
elementsoptional
elements[].frontal_image_urloptional
elements[].reference_image_urlsoptional
elements[].video_urloptional
elements[].voice_idoptional
resolutionoptional
aspect_ratiooptional
Fichierparameter akzeptéieren eng ëffentlech https:// URL, eng data: URI bis zu 10 MB oder de file_url vun engem Upload. Fichieren
Output
{
"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"
}
}
Output-Felder
- video
- object {url, content_type, file_name, file_size}Video, dee vum Modell produzéiert gëtt.
Aner Kling 4.0-Varianten
Méi Modeller: Referenz zu Video
Fir AI-Agenten: dës Säit als Markdown ass ënner https://doitong.com/lb/developers/models/kling/v4/reference-to-video.md. All Modeller a Guiden: https://doitong.com/developers/llms.txt