Hoppa till innehåll

Kling 4.0 Reference to Video

Integrera

Modell-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"

Filer som exemplet: 1,175 $ 1 175 API-krediter dina filer mäts innan körningen Kör den på den här sidan

Hämta API-nyckel
Kling Referens till video Referensinmatningar3–30 supp till 1080p #reference-to-video#multi-shot#image-reference#video-reference

Genererar videor på 3–30 sekunder som bevarar utseendet hos upp till 10 referensbilder, 5 referensvideor och 7 element

Skapat på Doitong

Offentliga verk skapade med Kling 4.0 av Doitong-communityt. Återanvänd en prompt med ett klick.

Visade offentliga verk: 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...

Skapa en begäran

Kontrollerna genereras från modellschemat. Koden och priset uppdateras när du ändrar dem.

88 / 2500

Genereringsinstruktioner som uppfyller kravet att ange antingen `prompt` eller `multi_prompt`. Använd @Image1, @Video1, @Element1 och så vidare för att hänvisa till angiven indata.

video_urls
Släpp en fil eller · upp till 5

Upp till 5 referensvideor, adresserade med @Video1, @Video2 och så vidare; varje video är 3–30 sekunder lång (högst 30.05 sekunder), och deras sammanlagda längd tillsammans med elementvideor får inte överstiga 30 sekunder. Varje fil får vara högst 300 MB, med bredd och höjd mellan 700 px och 4553 px vardera. Bildförhållandet måste ligga mellan 0.40 och 2.50, och bildfrekvensen mellan 23.9 och 60.05 FPS.

resolution standard 1080p

Upplösning för utdata.

aspect_ratio standard 16:9

Videoproportioner, valda uttryckligen eller härledda från referenserna genom att välja 'auto'.

standard 5

Videolängd i sekunder, från 3 till 30.

Avancerat image · images · multi_prompt · elements
start_image_url
Släpp en fil eller

Valfri bild för första bildrutan som räknas mot gränsen för bildreferenser. Maximal filstorlek är 30.0 MB; bredd och höjd måste vara minst 300 px vardera, med ett bildförhållande mellan 0.40 och 2.50.

image_urls
Släpp en fil eller · upp till 10

Bildreferenser som adresseras med @Image1, @Image2 och så vidare, med högst 10 bilder. Varje fil är begränsad till 30.0 MB, kräver minst 300 px i båda dimensionerna och måste ha ett bildförhållande mellan 0.40 och 2.50.

Genereringsinstruktioner tagning för tagning, där varje prompt definierar en tagning vars längd bidrar till videons totala längd.

Samling med upp till 7 figurer eller objekt, varav högst 3 får innehålla en `voice_id` och högst 3 får använda video. Adressera dessa element som @Element1, @Element2 och så vidare.

POST /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"

Kör den här begäran

Din nyckel stannar i den här webbläsaren: den skickas endast till Doitong API och sparas endast i localStorage om du markerar Kom ihåg. Hämta en API-nyckel

Om Kling 4.0 Reference to Video

Skapar video från en textbaserad `prompt` samt referensbilder, referensvideor och karaktärs- eller objekts­element, som anges i prompten som @Image1, @Video1 eller @Element1. Varaktigheten är 3 till 30 sekunder (standardvärde 5), med utdata i 720p eller 1080p och bildförhållandena auto, 16:9, 9:16, 1:1 eller 21:9. Använd `multi_prompt` för bildspecifika prompter; i så fall är den totala längden summan av bildsekvensernas varaktighet. Begränsningarna är 10 bilder, 5 videor på 3–30 s vardera och 7 element, varav upp till 3 kan ha en röst.

Parametrar

Skicka antingen det kanoniska namnet eller det inbyggda namnet, inte båda. Kanoniska namn

NamnTyp StandardTillåtna Beskrivning
promptvalfritt
Typstring | null
≤ 2 500 tecken
Genereringsinstruktioner som uppfyller kravet att ange antingen `prompt` eller `multi_prompt`. Använd @Image1, @Video1, @Element1 och så vidare för att hänvisa till angiven indata.
multi_promptvalfritt
Typobject[]
Genereringsinstruktioner tagning för tagning, där varje prompt definierar en tagning vars längd bidrar till videons totala längd.
multi_prompt[].promptobligatoriskt
Typstring
1 – 512 characters
Textinstruktioner för den aktuella tagningen.
multi_prompt[].durationvalfritt
Typinteger
Standard5
1 – 30
Längd på en enskild tagning, mätt i sekunder.
durationvalfritt
Typinteger
Standard5
3 – 30
Videolängd i sekunder, från 3 till 30.
start_image_urlvalfritt image
Typurl · image
Valfri bild för första bildrutan som räknas mot gränsen för bildreferenser. Maximal filstorlek är 30.0 MB; bredd och höjd måste vara minst 300 px vardera, med ett bildförhållande mellan 0.40 och 2.50.
image_urlsvalfritt images
Typurl[] · image
≤ 10 objekt
Bildreferenser som adresseras med @Image1, @Image2 och så vidare, med högst 10 bilder. Varje fil är begränsad till 30.0 MB, kräver minst 300 px i båda dimensionerna och måste ha ett bildförhållande mellan 0.40 och 2.50.
video_urlsvalfritt videos
Typurl[] · video
≤ 5 objekt
Upp till 5 referensvideor, adresserade med @Video1, @Video2 och så vidare; varje video är 3–30 sekunder lång (högst 30.05 sekunder), och deras sammanlagda längd tillsammans med elementvideor får inte överstiga 30 sekunder. Varje fil får vara högst 300 MB, med bredd och höjd mellan 700 px och 4553 px vardera. Bildförhållandet måste ligga mellan 0.40 och 2.50, och bildfrekvensen mellan 23.9 och 60.05 FPS.
elementsvalfritt
Typobject[]
≤ 7 objekt
Samling med upp till 7 figurer eller objekt, varav högst 3 får innehålla en `voice_id` och högst 3 får använda video. Adressera dessa element som @Element1, @Element2 och så vidare.
elements[].frontal_image_urlvalfritt
Typurl · image
Frontal bild som visar elementets huvudvy. Maximal filstorlek är 30.0 MB; båda dimensionerna måste vara minst 300 px och bildförhållandet måste ligga mellan 0.40 och 2.50.
elements[].reference_image_urlsvalfritt
Typurl[] · image
≤ 3 items
Kompletterande bilder som visar olika vinklar av elementet, med 1 till 3 vyer. Varje fil får vara högst 30.0 MB, måste vara minst 300 px i båda dimensionerna och måste ha ett bildförhållande mellan 0.40 och 2.50.
elements[].video_urlvalfritt
Typurl · video
Videorepresentation av ett element i stället för bilder, med längden 3–30 sekunder (högst 30.05 sekunder). Filen får inte överstiga 300 MB; bredd och höjd måste ligga inom 700–4553 px. Bildförhållanden mellan 0.40 och 2.50 stöds, med bildfrekvenser på 23.9–60.05 FPS.
elements[].voice_idvalfritt
Typstring | null
Röst som tilldelats elementet.
resolutionvalfritt
Typenum
Standard1080p
720p1080p
Upplösning för utdata.
aspect_ratiovalfritt
Typenum
Standard16:9
auto16:99:161:121:9
Videoproportioner, valda uttryckligen eller härledda från referenserna genom att välja 'auto'.
obligatoriskt Kanoniskt namn, accepteras också

Filparametrar tar emot en offentlig https://-URL, en data:-URI på upp till 10 MB eller file_url från en uppladdning. Filer

Resultat

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"
  }
}
Dina filer, ditt valVarje outputs[].url är en kopia i vår lagring: sparad för alltid (debiteras per GB-månad) eller 7 dagar kostnadsfritt, enligt din kontoinställning eller ?storage=.
Samma struktur för varje modelltype, url, content_type, width, height och duration, för bilder, video och ljud. output är modellens eget resultatobjekt.
Resultatets fält
video
object {url, content_type, file_name, file_size}Video som produceras av modellen.

Fler modeller: Referens till video

För AI-agenter: den här sidan som Markdown finns på https://doitong.com/sv/developers/models/kling/v4/reference-to-video.md. Alla modeller och guider: https://doitong.com/developers/llms.txt