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

Heygen v5 Digital Twin

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

ID โมเดล heygen/avatar5/digital-twin
# 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/heygen/avatar5/digital-twin?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",
    "audio": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  }'

# 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.00 1,000 เครดิต API ไฟล์ของคุณจะถูกวัดก่อนเรียกใช้ เรียกใช้ในหน้านี้

รับคีย์ API
HeyGen ลิปซิงก์และอวตาร เอาต์พุต 4Kลิปซิงก์สูงสุด 4k #avatar#digital-twin#talking-avatar#text-to-video

ดิจิทัลทวิน อวตาร V พร้อมเอาต์พุต 4k, WebM แบบโปร่งใส, พื้นหลัง, ลายน้ำ และคำบรรยาย SRT

HeyGen · วิดีโอ

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

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

สร้างคำขอ

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

ข้อความพูดสำหรับอวตาร จำเป็นต้องระบุหากไม่ใส่ `audio_url`

audio_url
วางไฟล์ หรือ

แหล่งเสียงสำหรับซิงค์ริมฝีปากที่ระบุเป็น URL ไฟล์เสียง HTTP(S) ซึ่งจะแทนที่ text-to-speech เมื่อมีการระบุ ในกรณีนี้จะไม่ใช้ทั้ง `prompt` และ `voice`

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

ค่าความละเอียดล่วงหน้าสำหรับเอาต์พุตที่สร้างขึ้น

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

การเลือกอัตราส่วนภาพวิดีโอ: 'auto' ให้ HeyGen อ่านและคงอัตราส่วนต้นฉบับไว้ โดยใช้ '16:9' หากอ่านไม่ได้ ตัวเลือกอัตราส่วนที่ระบุได้คือ '16:9', '9:16', '4:5', '5:4' และ '1:1'

ขั้นสูง fit · output_format · avatar · voice · remove_background · caption · enable_safety_checker · background · watermark
fit ค่าเริ่มต้น cover

เลือกการจัดกรอบอวตาร: 'cover' เติมเต็มเฟรมเอาต์พุตแต่อาจตัดอวตารบางส่วน ขณะที่ 'contain' แสดงอวตารทั้งหมดแต่อาจเพิ่มแถบดำ

output_format ค่าเริ่มต้น mp4

การเลือกคอนเทนเนอร์วิดีโอ โดย `webm` จะเปิดใช้ความโปร่งใสผ่านการลบพื้นหลังอัตโนมัติ ในโหมดนี้ `background` จะไม่มีผล

ค่าเริ่มต้น Abigail Sofa Front

ชื่อที่ระบุอวตารซึ่งมีสิทธิ์ใช้ Avatar V

ค่าเริ่มต้น Warm Pro Narrator

การเลือกเสียงอวตารด้วยชื่อสำหรับ text-to-speech ใช้เฉพาะเมื่อไม่มี `audio_url`

เลเยอร์พื้นหลังที่ไม่บังคับซึ่งวางไว้ด้านหลังอวตาร ยกเว้นเมื่อใช้ `output_format='webm'`: เอาต์พุต webm แบบโปร่งใสจะไม่สนใจการตั้งค่านี้

รูปภาพที่ไม่บังคับซึ่งใช้เป็นลายน้ำซ้อนในวิดีโอที่สร้างขึ้น

POST /run/heygen/avatar5/digital-twin?wait=20 ใบเสนอราคา → $1.00
# 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/heygen/avatar5/digital-twin?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",
    "audio": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  }'

# 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

เกี่ยวกับ Heygen v5 Digital Twin

สร้างวิดีโออวตารพูดจากข้อความ (`prompt` และ `voice`) หรือจาก `audio_url` เพื่อซิงก์ริมฝีปาก เลือก `avatar` ที่มีชื่อ โหมด `fit` แบบ contain หรือ cover และความละเอียด 720p, 1080p หรือ 4k `output_format` รองรับ mp4 หรือ webm โดย webm จะโปร่งใส ตัวเลือกประกอบด้วยการจัดองค์ประกอบพื้นหลัง การซ้อนลายน้ำ และไฟล์คำบรรยาย SRT แยก

พารามิเตอร์

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

ชื่อประเภท ค่าเริ่มต้นค่าที่อนุญาต คำอธิบาย
avatarไม่บังคับ
ประเภทstring | null
ค่าเริ่มต้นAbigail Sofa Front
ชื่อที่ระบุอวตารซึ่งมีสิทธิ์ใช้ Avatar V
promptไม่บังคับ
ประเภทstring | null
ข้อความพูดสำหรับอวตาร จำเป็นต้องระบุหากไม่ใส่ `audio_url`
voiceไม่บังคับ
ประเภทenum
ค่าเริ่มต้นWarm Pro Narrator
Warm Pro NarratorChill BrianIvyJohn DoeMonika SogamHope Archer BrittneyPatrickDavid CastlemoreMichael CAdam Stone JuniperCassidy Jessica Anne BogartArabella
เพิ่มเติมอีก 86 ค่าAndrewSpuds Oxley Grace ElderHelenCanyon RiversDerya - Lifelike - Excited 🤩Mellow MarcusJack Sterling - Broadcaster 🎙️Brenda - UGC - 1.mp4ReidReaganTerryJennyRadio RickDeniseTim in car - Excited 🤩IskanderThompsonDelicate Daisy - Excited 🤩KingstonGeorge UGC 1Bold BlakeJaneExpressive EvanMarianne - IAAaronModern Recipe Host - Voice 1WillowCute Chloe - Friendly 😊RafaelJune - LifelikeCrisp ChloeSlick SimonNassim - InformativeBaritone BenMaxwellEllie Faye - Excited 🤩MilaniFeisty Fiona - Excited 🤩Professor DeanRose - UGC - 1.mp4ShonaHudson WilderAnn - IAAlastair KensingtonOxleyChristinaAndrew Rizz PeytonGerardo - OutdoorChloe - LifelikeStephanieAnthony - IASignal - Voice 1LucaLisa - Voice 1T.W.TuckerJack Sullivan - Serious 😐WinterMireia - LifelikeGeorgiaStellaMasha - LifelikeCharming Charles - Friendly 😊SerenityAnnie - ExcitedRalphBethanyDominicMason FinnLeenaVeteran VictorTamaraNik PublicCalm ChloeSevikReillyRaulImposing IanRelaxed RayDexter - ProfessionalRelaxed RickEdwinRupert BlackwoodGinnyHope
การเลือกเสียงอวตารด้วยชื่อสำหรับ text-to-speech ใช้เฉพาะเมื่อไม่มี `audio_url`
audio_urlไม่บังคับ audio
ประเภทurl · audio
แหล่งเสียงสำหรับซิงค์ริมฝีปากที่ระบุเป็น URL ไฟล์เสียง HTTP(S) ซึ่งจะแทนที่ text-to-speech เมื่อมีการระบุ ในกรณีนี้จะไม่ใช้ทั้ง `prompt` และ `voice`
fitไม่บังคับ
ประเภทenum
ค่าเริ่มต้นcover
containcover
เลือกการจัดกรอบอวตาร: 'cover' เติมเต็มเฟรมเอาต์พุตแต่อาจตัดอวตารบางส่วน ขณะที่ 'contain' แสดงอวตารทั้งหมดแต่อาจเพิ่มแถบดำ
remove_backgroundไม่บังคับ
ประเภทboolean
ค่าเริ่มต้นfalse
การลบพื้นหลังของอวตาร ใช้ได้เฉพาะกับอวตารที่รองรับการตัดพื้นหลัง
backgroundไม่บังคับ
ประเภทobject
เลเยอร์พื้นหลังที่ไม่บังคับซึ่งวางไว้ด้านหลังอวตาร ยกเว้นเมื่อใช้ `output_format='webm'`: เอาต์พุต webm แบบโปร่งใสจะไม่สนใจการตั้งค่านี้
background.typeไม่บังคับ
ประเภทenum
ค่าเริ่มต้นcolor
colorimage
ชนิดพื้นหลัง: `color` ระบุสีทึบเลขฐานสิบหก ส่วน `image` ระบุ URL รูปภาพ
background.valueไม่บังคับ
ประเภทstring
ค่าเริ่มต้น#FFFFFF
เนื้อหาพื้นหลัง: สีเลขฐานสิบหกเมื่อประเภทเป็น `color` หรือ URL HTTP(S) เมื่อประเภทเป็น `image`
watermarkไม่บังคับ
ประเภทobject
รูปภาพที่ไม่บังคับซึ่งใช้เป็นลายน้ำซ้อนในวิดีโอที่สร้างขึ้น
watermark.image_urlจำเป็น
ประเภทurl · image
URL รูปลายน้ำผ่าน HTTP(S) สำหรับซ้อนลงในวิดีโอ
watermark.scaleไม่บังคับ
ประเภทnumber | null
≤ 2, > 0
ขนาดลายน้ำเมื่อเทียบกับวิดีโอ มากกว่า 0.0 และไม่เกิน 2.0
watermark.opacityไม่บังคับ
ประเภทnumber | null
0 – 1
ระดับความโปร่งใสของลายน้ำ: 0.0 คือโปร่งใสทั้งหมด และ 1.0 คือทึบแสงทั้งหมด
watermark.placementไม่บังคับ
ประเภทenum
top-lefttop-rightbottom-leftbottom-right
ตำแหน่งของลายน้ำภายในวิดีโอ
captionไม่บังคับ
ประเภทboolean
ค่าเริ่มต้นfalse
ควบคุมการสร้างไฟล์คำบรรยาย SRT แยกต่างหากพร้อมวิดีโอ
output_formatไม่บังคับ
ประเภทenum
ค่าเริ่มต้นmp4
mp4webm
การเลือกคอนเทนเนอร์วิดีโอ โดย `webm` จะเปิดใช้ความโปร่งใสผ่านการลบพื้นหลังอัตโนมัติ ในโหมดนี้ `background` จะไม่มีผล
resolutionไม่บังคับ
ประเภทenum
ค่าเริ่มต้น720p
720p1080p4k
ค่าความละเอียดล่วงหน้าสำหรับเอาต์พุตที่สร้างขึ้น
aspect_ratioไม่บังคับ
ประเภทenum
ค่าเริ่มต้น16:9
16:99:164:55:41:1auto
การเลือกอัตราส่วนภาพวิดีโอ: 'auto' ให้ HeyGen อ่านและคงอัตราส่วนต้นฉบับไว้ โดยใช้ '16:9' หากอ่านไม่ได้ ตัวเลือกอัตราส่วนที่ระบุได้คือ '16:9', '9:16', '4:5', '5:4' และ '1:1'
enable_safety_checkerไม่บังคับ
ประเภทboolean
ค่าเริ่มต้นtrue
สามารถผ่อนปรนการคัดกรองได้โดยตั้งค่าเป็น false หากผู้เรียกมีสิทธิ์
จำเป็น ชื่อมาตรฐาน ซึ่งรองรับเช่นกัน

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

เอาต์พุต

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "heygen/avatar5/digital-twin",
  "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": 1000,
    "usd": "1.00",
    "charged": 1000,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "audio_url": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  },
  "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
    },
    "caption_file": {
      "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}ไฟล์วิดีโอที่ Avatar V สร้างขึ้น
caption_file
object {url, content_type, file_name, file_size} | nullไฟล์คำบรรยาย SRT ที่สร้างขึ้นเมื่อ `caption=True` หากบริการจัดเตรียมไฟล์ให้

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