HeyGen Avatar 6 Image to Video API

Turn a photo into a lip-synced talking avatar video.

PlaygroundAPI
Pricing
~65.12s
POST /v2/heygen-avatar-6-image-to-video · submit + poll
 1# pip install "segmind>=1.1.0"
 2# export SEGMIND_API_KEY="YOUR_API_KEY"
 3from segmind import SegmindClient, InferenceFailed, InferenceTimeout
 4
 5# Async (v2) — recommended for long-running / video models.
 6# run() blocks up to 600s; submit_async + job.wait(timeout=...) sets a longer
 7# deadline and keeps the request_id so you can re-poll later.
 8client = SegmindClient()                      # reads SEGMIND_API_KEY
 9payload = {
10    "reference_image": "https://segmind-resources.s3.amazonaws.com/input/heygen-avatar-6-image-to-video-ref-f37b689c.jpg",
11    "script": "We shipped three things this month. First, the panels fold completely flat. Second, each one weighs under two kilos. And third — my favorite — they still charge in full shade.",
12    "voice_id": "4270665fc47f44aa989c093bb3dc2b99",
13    "motion_prompt": "Keep steady eye contact with the camera and use small, natural hand gestures; count on her fingers one, two, three as she says first, second, third; lean in slightly and smile warmly on the last line.",
14    "tier": "standard",
15    "resolution": "1080p",
16}
17job = client.submit_async("heygen-avatar-6-image-to-video", **payload)
18print(job.request_id)                         # available immediately
19try:
20    result = job.wait(timeout=900, interval=2.0)
21    print(result["status"])                  # COMPLETED
22    print(result.get("output"))              # model output (e.g. video URL)
23except InferenceTimeout as e:
24    print("still running:", e.request_id)    # re-poll later with this id
25except InferenceFailed as e:
26    print("failed:", e.detail)
27
28# Fast models (<=600s) can use the one-liner instead:
29# result = segmind.run("heygen-avatar-6-image-to-video", **payload)

API Endpoint

POSThttps://api.segmind.com/v1/heygen-avatar-6-image-to-video

Parameters

reference_imagerequired
string (uri)

Photo of the person or character to animate, up to 32 MB. Use one clear, front-facing face.

audiooptional
string (uri)

Your own speech to lip-sync instead of a Script: WAV, MP3 or M4A, up to 50 MB.

languageoptional
string

Optional language code for the Script, like en or pt-BR. Leave empty to auto-detect.

motion_expressivenessoptional
string

default for natural movement; less for calmer, steadier delivery. Use less for formal clips.

Default: "default"
Allowed values :
"default""less"
motion_promptoptional
string

Direction for gestures, expression and posture, up to 1,200 characters. Tie an action to a phrase.

output_heightoptional
integer

Optional output height in pixels, even number, set with Output Width. Leave empty to keep the reference shape.

output_widthoptional
integer

Optional output width in pixels, even number, set with Output Height. Leave empty to keep the reference shape.

resolutionoptional
string

Output resolution, 1080p or 2k. Choose 2k for large screens or fine detail.

Default: "1080p"
Allowed values :
"1080p""2k"
scriptoptional
string

Words for the avatar to speak, up to 5,000 characters. Use this or Audio, not both; needs a Voice.

tieroptional
string

standard gives full Avatar 6 quality; turbo renders faster. Use turbo for quick drafts.

Default: "standard"
Allowed values :
"standard""turbo"
voice_idoptional
string

HeyGen stock voice that reads the Script. Pick one from the Voice dropdown.

voice_speedoptional
number

Script speaking speed, 0.5 to 2, stock voices only. Keep near 1 for a natural pace.

Range: 0.5 - 2

Response Type

Returns: Video

Asynchronous requests (v2)

Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.

  1. 1
    POST /v2/heygen-avatar-6-image-to-video

    Submit — returns request_id, status_url, response_url

  2. 2
    GET /v2/requests/{id}/status

    Poll — until COMPLETED or FAILED

  3. 3
    GET /v2/requests/{id}

    Result — final response body

Status states

QUEUED— Accepted, waiting for a worker
PROCESSING— Running on a worker
COMPLETED— Done — result body is ready
FAILED— Errored (incl. content/RAI blocks)
  • A FAILED request is served as HTTP 422 — the body still carries the error detail.
  • An unknown or expired request_id returns HTTP 404.
  • Results are retained for 1 hour, then expire.
  • Content / RAI blocks surface as FAILED, not a separate state.
  • Track completion by polling the status endpoint.

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out