Kling 4.0 Reference to Video
Integrer
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/no/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"
}
}
Kall Kling 4.0 Reference to Video-modellen (kling/v4/reference-to-video) gjennom Doitong API. Dokumentasjon for agenter: https://doitong.com/no/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"
}
Hvis responsstatusen er "queued" eller "running", send GET https://api.doitong.com/v1/requests/REQUEST_ID?wait=20-forespørsler til den er "succeeded"; filene ligger i outputs[].url. POST https://api.doitong.com/v1/quote/kling/v4/reference-to-video med samme innhold returnerer den nøyaktige prisen før kjøringen.
Filer som eksempelet: 1,175 $ 1 175 API-kreditter filene dine måles før kjøring Kjør den på denne siden
Din nye API-nøkkel. Den vises bare nå og er allerede satt inn i koden og i API-nøkkelfeltet nedenfor. Hold den hemmelig: Legg den aldri i kode som kjører i en nettleser.
Laget på Doitong
Offentlige verk laget med Kling 4.0 av Doitong-fellesskapet. Gjenbruk en prompt med ett klikk.
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...
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...
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...
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
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....
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,...
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
Уютная база отдыха с деревянными домиками-шале среди сосен. Майя и Клиентка заходят в теплое кафе с панорамными окнами. Внутри деревянный интерьер, мягкие диваны и живые цветы. Они садятся за столик, перед ними стоят дымящиеся чашки чая. Мягкий свет ламп создает уют. Средний план, уровень глаз. (...
Video
**Duration: 4 seconds. Aspect ratio: 16:9.** Animate the provided image into a bright, magical, high-energy YouTube intro for a children's entertainment channel. **0–1 second:** The three girls come to life naturally, smiling and blinking. The girl on the left gently swings forward, the girl in...
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
Создай короткий вертикальный юмористический мультфильм для Reels в формате 9:16. Сцена 1: Михаил Шуфутинский стоит в кадре с небольшим настольным календарём или блокнотом. На календаре крупно и хорошо читаемо написано: «2 сентября». Он смотрит на календарь и начинает петь узнаваемую фразу из...
Video
Оживи старую чёрно-белую свадебную фотографию. Молодожёны стоят рядом друг с другом. Жених нежно и с любовью смотрит на невесту, слегка улыбается и бережно касается её руки. Невеста мягко улыбается, немного поворачивает голову к жениху и смотрит на него с теплотой. Их движения естественные,...
Video
The same cute animated toddler is sitting on the soft green grass, crying with big tears after gently falling. Suddenly, his loving mother runs toward him, kneels down and gently picks him up into her arms. She hugs him tightly and comforts him, softly stroking his back. The toddler takes a deep...
Video
С днём рождения, бабушка Люба Хронометраж: ~6 минут Жанр: биографический фильм‑посвящение Музыка: мягкое фортепиано; в сценах про детство и утраты — сдержанная, щемящая мелодия; в сценах про дорогу и работу — ровный, сдержанный ритм; в сценах про кузницу — тёплый, «рукотворный» тембр; в сценах с...
Bygg en forespørsel
Kontrollene genereres fra modellskjemaet. Koden og prisen oppdateres når du endrer dem.
/run/kling/v4/reference-to-video?wait=20
pris → 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
}
}
}
Kjør denne forespørselen
Nøkkelen din blir i denne nettleseren: Den sendes bare til Doitong API og lagres bare i localStorage hvis du krysser av for Husk. Hent en API-nøkkel
Om Kling 4.0 Reference to Video
Oppretter video fra en tekstbasert `prompt` samt referansebilder, referansevideoer og karakter- eller objektelementer, som refereres til i prompten som @Image1, @Video1 eller @Element1. Varigheten er fra 3 til 30 sekunder (standard 5), med utdata i 720p eller 1080p og størrelsesforholdene auto, 16:9, 9:16, 1:1 eller 21:9. Bruk `multi_prompt` for prompt per bildeutsnitt; i så fall er den totale lengden summen av varighetene for bildeutsnittene. Grensene er 10 bilder, 5 videoer på 3–30s hver og 7 elementer, hvorav opptil 3 kan ha en stemme.
Parametere
Send enten det kanoniske navnet eller det opprinnelige navnet, ikke begge. Kanoniske navn
promptvalgfritt
multi_promptvalgfritt
multi_prompt[].promptobligatorisk
multi_prompt[].durationvalgfritt
durationvalgfritt
start_image_urlvalgfritt
image
image_urlsvalgfritt
images
video_urlsvalgfritt
videos
elementsvalgfritt
elements[].frontal_image_urlvalgfritt
elements[].reference_image_urlsvalgfritt
elements[].video_urlvalgfritt
elements[].voice_idvalgfritt
resolutionvalgfritt
aspect_ratiovalgfritt
Filparametere tar imot en offentlig https:// URL, en data: URI på opptil 10 MB eller file_url fra en opplasting. Filer
Utdata
{
"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"
}
}
Utdatafelt
- video
- object {url, content_type, file_name, file_size}Video produsert av modellen.
Andre Kling 4.0-varianter
Flere modeller: Referanse til video
For AI-agenter: Denne siden som Markdown finnes på https://doitong.com/no/developers/models/kling/v4/reference-to-video.md. Alle modeller og veiledninger: https://doitong.com/developers/llms.txt