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.
Probar el modelo
¿Qué le gustaría hacer después?
Seleccione un ejemplo para cargar sus entradas y el resultado en el playground.
{
"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.
Empiece a construir
Envíe este modelo a través de la API de ejecución unificada de SandBase.
# 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"Cree una clave de API de SandBase y configúrela en el entorno de su servidor. Todas las solicitudes usan autenticación Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserve la clave en el servidor. No la exponga en código del navegador ni la confirme en un repositorio.
Haga un POST a /v1/run con este ID de modelo y sus entradas. El ejemplo de solicitud anterior incluye el envío y el sondeo.
Use el ID de ejecución devuelto para sondear hasta que el estado sea completed, failed o timeout. Lea la salida solo después de completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Proporcione una URL de archivo accesible públicamente en el campo de imagen, video o audio del modelo. Los formatos y límites admitidos se muestran junto a cada entrada de Playground.
Use el control de subir o reemplazar en los campos de imagen admitidos en Playground. Los campos de URL de video aceptan un video de conducción alojado; no implican compatibilidad con la subida de video.
audiostringOptional speech audio, file or URL. When set, the script and voice are ignored.
voicestringText-to-speech voice used for the script.
Valor predeterminado: "Warm Pro Narrator"
avatarstringName of an Avatar 6-compatible public HeyGen avatar.
Valor predeterminado: "Abigail Sofa Front"
promptstringText the avatar will speak. Required unless audio is provided.
resolutionstringOutput resolution; 2k is billed at a higher per-second rate.
Valor predeterminado: "1080p"
Valores posibles: "1080p", "2k"
aspect_ratiostringOutput frame shape.
Valor predeterminado: "16:9"
Valores posibles: "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.
Valor predeterminado: "default"
Valores posibles: "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"
}Una ejecución completada expone su resultado en la salida. Lo siguiente es el ejemplo guardado del modelo, no una nueva generación.
[
{
"url": "https://static.sandbase.ai/examples/23f5f611-8f48-4fe2-948e-357a055608a0/output/0c3f8c58-7c58-43f1-b234-e10ddc5fb822.mp4"
}
]