audiostring
Optional speech audio, file or URL. When set, the script and voice are ignored.
heygen/avatar6-turbo/identity-to-videoHeyGen Avatar 6 Turbo by HeyGen creates a talking video with a public HeyGen avatar from a script or speech audio. Turbo is the faster, lower-cost tier.
model को आज़माएँ
आप आगे क्या करना चाहेंगे?
प्लेग्राउंड में इसके इनपुट और परिणाम लोड करने के लिए कोई उदाहरण चुनें।
{
"aspect_ratio": "16:9",
"prompt": "Hello and welcome to this demonstration of HeyGen Avatar 6 Turbo."
}HeyGen Avatar 6 Turbo makes a talking video with one of HeyGen's public avatars, from a written script or a speech track. Turbo is the faster, lower-cost tier.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string | — | Script; required unless audio is set. |
avatar | string | Abigail Sofa Front | Public Avatar 6 avatar name. |
voice | string | Warm Pro Narrator | Voice for the script. |
audio | audio file or URL | — | Overrides script and voice. |
aspect_ratio | 16:9 / 9:16 / 1:1 / 4:5 / 5:4 | 16:9 | Frame shape. |
motion_prompt | string | — | Direction for motion and expression. |
motion_expressiveness | default / less | default | less for calmer motion. |
resolution | 1080p / 2k | 1080p | Sets the per-second rate. |
$0.06 per output second at 1080p, $0.0875 at 2k. Length follows the audio or the spoken script; the quote before submission assumes 5 seconds.
| Output | 1080p | 2k |
|---|---|---|
| 10s | $0.60 | $0.875 |
| 60s | $3.60 | $5.25 |
| Failed runs are not charged. |
Related: heygen/avatar6-turbo/image-to-video, heygen/avatar6-turbo/ref-video-to-video, heygen/avatar5/digital-twin.
बिल्डिंग शुरू करें
इस model को SandBase Unified Run API के माध्यम से सबमिट करें।
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "heygen/avatar6-turbo/identity-to-video",
"voice": "Warm Pro Narrator",
"avatar": "Abigail Sofa Front",
"prompt": "Hello and welcome to this demonstration of HeyGen Avatar 6.",
"resolution": "1080p",
"aspect_ratio": "16:9",
"motion_expressiveness": "default"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"एक SandBase API key बनाएँ और इसे अपने server environment में सेट करें। सभी requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"Key को सर्वर पर रखें। इसे browser code में expose न करें या repository में commit न करें।
इस model ID और इसके inputs के साथ /v1/run पर POST करें। ऊपर दिया गया request example submission और polling दोनों शामिल करता है।
Completed, failed या timeout होने तक poll करने के लिए लौटाए गए run ID का उपयोग करें। Output केवल completed होने के बाद पढ़ें।
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Model के image, video या audio field में सार्वजनिक रूप से उपलब्ध फ़ाइल URL पास करें। समर्थित formats और limits प्रत्येक Playground input के पास दिखाए गए हैं।
Playground में समर्थित image fields पर upload या replace control का उपयोग करें। Video URL fields hosted driving video स्वीकार करते हैं; इससे video-upload support का संकेत नहीं मिलता।
audiostringOptional speech audio, file or URL. When set, the script and voice are ignored.
voicestringText-to-speech voice used for the script.
डिफ़ॉल्ट: "Warm Pro Narrator"
avatarstringName of an Avatar 6-compatible public HeyGen avatar.
डिफ़ॉल्ट: "Abigail Sofa Front"
promptstringText the avatar will speak. Required unless audio is provided.
resolutionstringOutput resolution; 2k is billed at a higher per-second rate.
डिफ़ॉल्ट: "1080p"
संभावित मान: "1080p", "2k"
aspect_ratiostringOutput frame shape.
डिफ़ॉल्ट: "16:9"
संभावित मान: "16:9", "9:16", "1:1", "4:5", "5:4"
motion_promptstringOptional direction for the avatar's motion and expression.
motion_expressivenessstringless gives fewer, smaller gestures and calmer expressions.
डिफ़ॉल्ट: "default"
संभावित मान: "default", "less"
{
"model": "heygen/avatar6-turbo/identity-to-video",
"voice": "Warm Pro Narrator",
"avatar": "Abigail Sofa Front",
"prompt": "Hello and welcome to this demonstration of HeyGen Avatar 6.",
"resolution": "1080p",
"aspect_ratio": "16:9",
"motion_expressiveness": "default"
}पूरा हुआ run अपना परिणाम output में दिखाता है। नीचे दिया गया model का सेव किया हुआ example है, नई generation नहीं।
[
{
"url": "https://static.sandbase.ai/examples/23f5f611-8f48-4fe2-948e-357a055608a0/output/0c3f8c58-7c58-43f1-b234-e10ddc5fb822.mp4"
}
]