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

Kling Video v2.6 Image to Video

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

ID โมเดล kling-video/v2.6/pro/image-to-video
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://vit.doitong.com/api/v1/run/kling-video/v2.6/pro/image-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",
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://vit.doitong.com/api/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

คำขอนี้: $0.70 700 เครดิต API เรียกใช้ในหน้านี้

รับคีย์ API
Kling ภาพเป็นวิดีโอ เสียงในตัว5–10 s

image-to-video v2.6 พร้อมเฟรมจบที่เลือกได้ การสร้างเสียงในตัว และการอ้างอิง voice ID

Kling · วิดีโอ

ผลลัพธ์แรกของคุณจะแสดงที่นี่

สร้างคำขอด้านล่างและเรียกใช้ด้วยคีย์ API ของคุณ เอาต์พุตจะถูกคัดลอกไปยังพื้นที่จัดเก็บของเรา และเก็บไว้ตลอดไปหรือฟรี 7 วัน

สร้างคำขอ

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

•จำเป็น 88 / 2500
•จำเป็น start_image_url
วางไฟล์ หรือ

URL ที่ชี้ไปยังรูปภาพที่ใช้สร้างวิดีโอ ขนาดไฟล์ต้องไม่เกิน 50 MB ความกว้างและความสูงต้องไม่น้อยกว่า 300px และอัตราส่วนภาพต้องอยู่ระหว่าง 0.40 ถึง 2.50

duration 5 s

ความยาววิดีโอเอาต์พุต วัดเป็นวินาที

Voice ID เสริมที่ใช้สร้างวิดีโอ จำกัดไม่เกิน 2 เสียงต่อหนึ่งงาน อ้างอิงเสียงเหล่านี้ในพรอมต์ด้วย <<<voice_1>>> และ <<<voice_2>>>

ขั้นสูง negative_prompt · end_image · enable_safety_checker
0 / 2500
end_image_url
วางไฟล์ หรือ

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

POST /run/kling-video/v2.6/pro/image-to-video?wait=20 ใบเสนอราคา → $0.70
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://vit.doitong.com/api/v1/run/kling-video/v2.6/pro/image-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",
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://vit.doitong.com/api/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

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

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

เกี่ยวกับ Kling Video v2.6 Image to Video

ทำให้ภาพเริ่มต้น (`start_image_url`) เคลื่อนไหวตามพรอมต์ความยาวไม่เกิน 2500 อักขระ และสามารถจบด้วย `end_image_url` ได้ `duration` คือ 5 หรือ 10 วินาที `generate_audio` จะสร้างเสียงในตัวพร้อมเสียงพูดภาษาจีนและอังกฤษ และ `voice_ids` ให้คุณอ้างอิงเสียงได้สูงสุด 2 เสียงในพรอมต์ นอกจากนี้ยังรองรับ `negative_prompt`

พารามิเตอร์

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

ชื่อประเภท ค่าเริ่มต้นค่าที่อนุญาต คำอธิบาย
enable_safety_checkerไม่บังคับ
ประเภทboolean
ค่าเริ่มต้นtrue
ปิดใช้การตรวจสอบความปลอดภัยได้เฉพาะเมื่อบัญชีได้รับอนุญาต คำขอที่ไม่มีการอนุญาตจะผ่านการตรวจสอบเสมอ
promptจำเป็น
ประเภทstring
≤ 2,500 อักขระ
start_image_urlจำเป็น image
ประเภทurl · image
URL ที่ชี้ไปยังรูปภาพที่ใช้สร้างวิดีโอ ขนาดไฟล์ต้องไม่เกิน 50 MB ความกว้างและความสูงต้องไม่น้อยกว่า 300px และอัตราส่วนภาพต้องอยู่ระหว่าง 0.40 ถึง 2.50
durationไม่บังคับ
ประเภทenum
ค่าเริ่มต้น5
510
ความยาววิดีโอเอาต์พุต วัดเป็นวินาที
negative_promptไม่บังคับ
ประเภทstring
ค่าเริ่มต้นblur, distort, and low quality
≤ 2,500 อักขระ
generate_audioไม่บังคับ
ประเภทboolean
ค่าเริ่มต้นtrue
สวิตช์การสร้างเสียงวิดีโอเนทีฟ รองรับเสียงพูดภาษาจีนหรืออังกฤษ และแปลภาษาอื่นเป็นภาษาอังกฤษโดยอัตโนมัติ สำหรับเสียงพูดภาษาอังกฤษ ให้เขียนตัวย่อและชื่อเฉพาะเป็นตัวพิมพ์ใหญ่ และเขียนส่วนอื่นทั้งหมดเป็นตัวพิมพ์เล็ก
voice_idsไม่บังคับ
ประเภทstring[]
Voice ID เสริมที่ใช้สร้างวิดีโอ จำกัดไม่เกิน 2 เสียงต่อหนึ่งงาน อ้างอิงเสียงเหล่านี้ในพรอมต์ด้วย <<<voice_1>>> และ <<<voice_2>>>
end_image_urlไม่บังคับ end_image
ประเภทurl · image
URL ที่ชี้ไปยังรูปภาพที่ใช้ตอนจบของวิดีโอ ขนาดไฟล์ต้องไม่เกิน 50 MB และความกว้างกับความสูงต้องไม่น้อยกว่า 300px โดยมีอัตราส่วนภาพระหว่าง 0.40 ถึง 2.50
จำเป็น ชื่อมาตรฐาน ซึ่งรองรับเช่นกัน

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

เอาต์พุต

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "kling-video/v2.6/pro/image-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": 700,
    "usd": "0.70",
    "charged": 700,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "start_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "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://vit.doitong.com/api/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://vit.doitong.com/api/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-video/v2.6/pro/image-to-video.md. โมเดลและคู่มือทั้งหมด: https://doitong.com/developers/llms.txt