ข้ามไปยังเนื้อหา

Kling 4.0 Reference to Video

ผสานการทำงาน

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"

ไฟล์เช่นเดียวกับตัวอย่าง: $1.175 1,175 เครดิต API ไฟล์ของคุณจะถูกวัดก่อนเรียกใช้ เรียกใช้ในหน้านี้

รับคีย์ API
Kling ภาพอ้างอิงเป็นวิดีโอ อินพุตอ้างอิง3–30 sสูงสุด 1080p #reference-to-video#multi-shot#image-reference#video-reference

สร้างวิดีโอความยาว 3-30 วินาทีที่คงรูปลักษณ์ของภาพอ้างอิงสูงสุด 10 ภาพ วิดีโออ้างอิง 5 รายการ และองค์ประกอบ 7 รายการ

สร้างบน Doitong

ผลงานสาธารณะที่สร้างด้วย Kling 4.0 โดยชุมชน Doitong นำพรอมต์กลับมาใช้ได้ในคลิกเดียว

ผลงานสาธารณะที่แสดง: 16
Ultra-realistic cinematic video of a young adult woman walking naturally toward the camera while ... วิดีโอ

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... วิดีโอ

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... วิดีโอ

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... วิดีโอ

**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... วิดีโอ

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 ... วิดีโอ

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... วิดีโอ

**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... วิดีโอ

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

สร้างคำขอ

ตัวควบคุมสร้างจากสคีมาของโมเดล โค้ดและราคาจะอัปเดตเมื่อคุณเปลี่ยนค่า

88 / 2500

คำสั่งการสร้างที่เป็นไปตามข้อกำหนดให้ระบุ `prompt` หรือ `multi_prompt` หากต้องการอ้างอิงอินพุตที่ระบุ ให้ใช้ @Image1, @Video1, @Element1 เป็นต้น

video_urls
วางไฟล์ หรือ · สูงสุด 5

วิดีโออ้างอิงได้สูงสุด 5 รายการ อ้างอิงด้วย @Video1, @Video2 เป็นต้น แต่ละรายการมีระยะเวลา 3–30 วินาที (สูงสุด 30.05 วินาที) และระยะเวลารวมกับวิดีโอขององค์ประกอบต้องไม่เกิน 30 วินาที แต่ละไฟล์ต้องมีขนาดไม่เกิน 300 MB ความกว้างและความสูงต้องอยู่ระหว่าง 700 px ถึง 4553 px อัตราส่วนภาพต้องอยู่ระหว่าง 0.40 ถึง 2.50 และอัตราเฟรมระหว่าง 23.9 ถึง 60.05 FPS

resolution ค่าเริ่มต้น 1080p

ความละเอียดของเอาต์พุต

aspect_ratio ค่าเริ่มต้น 16:9

สัดส่วนวิดีโอ ซึ่งเลือกโดยระบุค่าโดยตรงหรือคำนวณจากข้อมูลอ้างอิงโดยเลือก 'auto'

ค่าเริ่มต้น 5

ความยาวของวิดีโอเป็นวินาที ตั้งแต่ 3 ถึง 30

ขั้นสูง image · images · multi_prompt · elements
start_image_url
วางไฟล์ หรือ

รูปภาพเฟรมแรกเสริมซึ่งนับรวมในขีดจำกัดรูปภาพอ้างอิง ขนาดไฟล์สูงสุด 30.0 MB ความกว้างและความสูงต้องไม่น้อยกว่า 300 px และอัตราส่วนภาพต้องอยู่ระหว่าง 0.40 ถึง 2.50

image_urls
วางไฟล์ หรือ · สูงสุด 10

รูปภาพอ้างอิงที่อ้างอิงด้วย @Image1, @Image2 เป็นต้น โดยมีได้ไม่เกิน 10 รูปภาพ แต่ละไฟล์มีขนาดไม่เกิน 30.0 MB ต้องมีทั้งสองมิติอย่างน้อย 300 px และมีอัตราส่วนภาพระหว่าง 0.40 ถึง 2.50

คำสั่งการสร้างแบบช็อตต่อช็อต โดยแต่ละพรอมต์กำหนดหนึ่งช็อต และระยะเวลาของช็อตนั้นจะรวมเป็นความยาวทั้งหมดของวิดีโอ

คอลเลกชันตัวละครหรือวัตถุได้สูงสุด 7 รายการ โดยมีได้ไม่เกิน 3 รายการที่มี `voice_id` และไม่เกิน 3 รายการที่ใช้วิดีโอ อ้างอิงองค์ประกอบเหล่านี้ด้วย @Element1, @Element2 เป็นต้น

POST /run/kling/v4/reference-to-video?wait=20 ใบเสนอราคา → $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"

เรียกใช้คำขอนี้

คีย์ของคุณจะอยู่ในเบราว์เซอร์นี้ โดยส่งไปยัง Doitong API เท่านั้น และจะบันทึกใน localStorage ก็ต่อเมื่อคุณเลือกจดจำ รับคีย์ API

เกี่ยวกับ Kling 4.0 Reference to Video

สร้างวิดีโอจาก `prompt` ข้อความ พร้อมภาพอ้างอิง วิดีโออ้างอิง และองค์ประกอบตัวละครหรือวัตถุ ซึ่งอ้างอิงในพรอมต์ด้วย @Image1, @Video1 หรือ @Element1 ความยาวอยู่ระหว่าง 3 ถึง 30 วินาที (ค่าเริ่มต้น 5) โดยเอาต์พุตมีความละเอียด 720p หรือ 1080p และอัตราส่วนภาพเป็น auto, 16:9, 9:16, 1:1 หรือ 21:9 ใช้ `multi_prompt` สำหรับพรอมต์แยกตามช็อต ซึ่งในกรณีนี้ความยาวรวมจะเท่ากับผลรวมของระยะเวลาของแต่ละช็อต จำกัดภาพ 10 ภาพ วิดีโอ 5 รายการ รายการละ 3-30s และองค์ประกอบ 7 รายการ โดยมีองค์ประกอบที่มีเสียงได้สูงสุด 3 รายการ

พารามิเตอร์

ส่งชื่อมาตรฐานหรือชื่อดั้งเดิมอย่างใดอย่างหนึ่งเท่านั้น ห้ามส่งทั้งสองชื่อ ชื่อมาตรฐาน

ชื่อประเภท ค่าเริ่มต้นค่าที่อนุญาต คำอธิบาย
promptไม่บังคับ
ประเภทstring | null
≤ 2,500 อักขระ
คำสั่งการสร้างที่เป็นไปตามข้อกำหนดให้ระบุ `prompt` หรือ `multi_prompt` หากต้องการอ้างอิงอินพุตที่ระบุ ให้ใช้ @Image1, @Video1, @Element1 เป็นต้น
multi_promptไม่บังคับ
ประเภทobject[]
คำสั่งการสร้างแบบช็อตต่อช็อต โดยแต่ละพรอมต์กำหนดหนึ่งช็อต และระยะเวลาของช็อตนั้นจะรวมเป็นความยาวทั้งหมดของวิดีโอ
multi_prompt[].promptจำเป็น
ประเภทstring
1 – 512 characters
คำสั่งข้อความสำหรับช็อตปัจจุบัน
multi_prompt[].durationไม่บังคับ
ประเภทinteger
ค่าเริ่มต้น5
1 – 30
ระยะเวลาของช็อตแต่ละรายการ วัดเป็นวินาที
durationไม่บังคับ
ประเภทinteger
ค่าเริ่มต้น5
3 – 30
ความยาวของวิดีโอเป็นวินาที ตั้งแต่ 3 ถึง 30
start_image_urlไม่บังคับ image
ประเภทurl · image
รูปภาพเฟรมแรกเสริมซึ่งนับรวมในขีดจำกัดรูปภาพอ้างอิง ขนาดไฟล์สูงสุด 30.0 MB ความกว้างและความสูงต้องไม่น้อยกว่า 300 px และอัตราส่วนภาพต้องอยู่ระหว่าง 0.40 ถึง 2.50
image_urlsไม่บังคับ images
ประเภทurl[] · image
≤ 10 รายการ
รูปภาพอ้างอิงที่อ้างอิงด้วย @Image1, @Image2 เป็นต้น โดยมีได้ไม่เกิน 10 รูปภาพ แต่ละไฟล์มีขนาดไม่เกิน 30.0 MB ต้องมีทั้งสองมิติอย่างน้อย 300 px และมีอัตราส่วนภาพระหว่าง 0.40 ถึง 2.50
video_urlsไม่บังคับ videos
ประเภทurl[] · video
≤ 5 รายการ
วิดีโออ้างอิงได้สูงสุด 5 รายการ อ้างอิงด้วย @Video1, @Video2 เป็นต้น แต่ละรายการมีระยะเวลา 3–30 วินาที (สูงสุด 30.05 วินาที) และระยะเวลารวมกับวิดีโอขององค์ประกอบต้องไม่เกิน 30 วินาที แต่ละไฟล์ต้องมีขนาดไม่เกิน 300 MB ความกว้างและความสูงต้องอยู่ระหว่าง 700 px ถึง 4553 px อัตราส่วนภาพต้องอยู่ระหว่าง 0.40 ถึง 2.50 และอัตราเฟรมระหว่าง 23.9 ถึง 60.05 FPS
elementsไม่บังคับ
ประเภทobject[]
≤ 7 รายการ
คอลเลกชันตัวละครหรือวัตถุได้สูงสุด 7 รายการ โดยมีได้ไม่เกิน 3 รายการที่มี `voice_id` และไม่เกิน 3 รายการที่ใช้วิดีโอ อ้างอิงองค์ประกอบเหล่านี้ด้วย @Element1, @Element2 เป็นต้น
elements[].frontal_image_urlไม่บังคับ
ประเภทurl · image
รูปภาพด้านหน้าที่แสดงมุมมองหลักขององค์ประกอบ ขนาดไฟล์สูงสุด 30.0 MB ทั้งสองมิติต้องมีขนาดอย่างน้อย 300 px และอัตราส่วนภาพต้องอยู่ระหว่าง 0.40 ถึง 2.50
elements[].reference_image_urlsไม่บังคับ
ประเภทurl[] · image
≤ 3 items
รูปภาพเสริมที่แสดงมุมต่าง ๆ ขององค์ประกอบ มี 1 ถึง 3 มุมมอง แต่ละไฟล์มีขนาดไม่เกิน 30.0 MB ต้องมีทั้งสองมิติอย่างน้อย 300 px และมีอัตราส่วนภาพระหว่าง 0.40 ถึง 2.50
elements[].video_urlไม่บังคับ
ประเภทurl · video
การนำเสนอองค์ประกอบด้วยวิดีโอแทนรูปภาพ มีระยะเวลา 3–30 วินาที (สูงสุด 30.05 วินาที) ไฟล์ต้องมีขนาดไม่เกิน 300 MB ความกว้างและความสูงต้องอยู่ระหว่าง 700–4553 px รองรับอัตราส่วนภาพ 0.40–2.50 และอัตราเฟรม 23.9–60.05 FPS
elements[].voice_idไม่บังคับ
ประเภทstring | null
เสียงที่กำหนดให้กับองค์ประกอบ
resolutionไม่บังคับ
ประเภทenum
ค่าเริ่มต้น1080p
720p1080p
ความละเอียดของเอาต์พุต
aspect_ratioไม่บังคับ
ประเภทenum
ค่าเริ่มต้น16:9
auto16:99:161:121:9
สัดส่วนวิดีโอ ซึ่งเลือกโดยระบุค่าโดยตรงหรือคำนวณจากข้อมูลอ้างอิงโดยเลือก 'auto'
จำเป็น ชื่อมาตรฐาน ซึ่งรองรับเช่นกัน

พารามิเตอร์ไฟล์รับ URL https:// สาธารณะ, data: URI ขนาดไม่เกิน 10 MB หรือ file_url ของไฟล์ที่อัปโหลด ไฟล์

เอาต์พุต

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"
  }
}
ไฟล์ของคุณ คุณเลือกเองทุก outputs[].url คือสำเนาบนพื้นที่จัดเก็บของเรา: เก็บไว้ตลอดไป (คิดค่าบริการต่อ GB-เดือน) หรือฟรี 7 วัน โดยกำหนดได้ในการตั้งค่าบัญชีหรือ ?storage=
รูปแบบเดียวกันในทุกโมเดลtype, url, content_type, width, height และ duration สำหรับภาพ วิดีโอ และเสียงเหมือนกันทั้งหมด ส่วน output คือออบเจ็กต์ผลลัพธ์ของโมเดลเอง
ฟิลด์ของเอาต์พุต
video
object {url, content_type, file_name, file_size}วิดีโอที่โมเดลสร้าง

โมเดลเพิ่มเติม: ภาพอ้างอิงเป็นวิดีโอ

สำหรับเอเจนต์ AI: หน้า Markdown นี้อยู่ที่ https://doitong.com/th/developers/models/kling/v4/reference-to-video.md. โมเดลและคู่มือทั้งหมด: https://doitong.com/developers/llms.txt