Prompt-to-Avatar (type: "prompt") — Tokyo Pipeline
Generate an entirely new AI avatar from a text description. No photo or video needed — describe the character you want and the Tokyo pipeline creates it.Prompt-to-Avatar uses HeyGen’s Tokyo pipeline to generate a unique AI character from your text description. The avatar is fully synthetic — no real person is depicted.
curl -X POST "https://api.heygen.com/v3/avatars" \
-H "X-Api-Key: $HEYGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "prompt",
"name": "Space Commander",
"prompt": "Young woman, early 30s, confident expression, short silver hair, warm brown eyes, wearing a dark blue space suit with mission patches, standing in a modern spacecraft bridge with holographic displays"
}'
Parameters
| Parameter | Type | Required | Description |
|---|
type | string | Yes | Must be "prompt". |
name | string | Yes | Display name for the avatar. |
prompt | string | Yes | Text description of the avatar’s appearance, clothing, setting, and style. Max 1000 chars. Be specific for best results. |
avatar_id | string | No | An existing look ID to use as the visual reference for the generation. The new look is saved to the referenced avatar’s group; if avatar_group_id is also provided, the avatar must belong to that group and the result is saved there. The referenced avatar must exist and have a usable image, otherwise the request is rejected. Use this to create new looks (outfits, settings, styles) for an avatar you already created — see Generate new looks for an existing avatar. |
avatar_group_id | string | No | The identity (group) to save the generated avatar to. By default a new identity is created. If avatar_id is also provided, it must belong to this group. This field only controls where the result is saved — it does not drive the visual reference; use avatar_id for that. |
reference_images | array | No | Up to 3 reference images for additional style/setting guidance. Each entry is { "type": "url", "url": "..." }, { "type": "asset_id", "asset_id": "..." } (from POST /v3/assets), or { "type": "base64", "media_type": "image/png", "data": "..." }. Can be used on their own or layered on top of an avatar_id reference. |
How avatar_id and avatar_group_id combine
avatar_id | avatar_group_id | Visual reference | Saved to |
|---|
| ✗ | ✗ | none — generated purely from the prompt | a new group |
| ✗ | ✓ | none — generated purely from the prompt | that group |
| ✓ | ✗ | the referenced avatar’s image | the referenced avatar’s group |
| ✓ | ✓ | the referenced avatar’s image | avatar_group_id (the avatar must belong to it) |
reference_images layer additional guidance on top of any of these combinations; with no avatar_id they are used on their own.Changed behavior (June 2026): avatar_group_id previously conditioned the generation on one of the group’s looks. It now only controls where the result is saved. If you relied on it for character consistency, pass the base look’s ID as avatar_id instead — see the changelog. Prompting tips for best results:
- Be specific about age, gender, expression, and clothing
- Describe the setting/background
- Mention lighting or mood (e.g.,
"warm studio lighting", "cinematic")
- Reference images help with style consistency but are optional
Generate new looks for an existing avatar
If you already have a HeyGen avatar — from any creation type — you can generate additional looks for that same character by calling type: "prompt" with the existing look’s ID as avatar_id. The referenced look’s image is used as the visual reference that conditions the new generation, so the character’s identity stays consistent across the new outfit, setting, or style described in your prompt. The new look is saved to the referenced avatar’s group automatically — no avatar_group_id needed.Typical sequence — say you have a photo of a person and want several prompt-driven variations:
-
Create the photo avatar once:
curl -X POST "https://api.heygen.com/v3/avatars" \
-H "X-Api-Key: $HEYGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "photo",
"name": "Sarah",
"file": { "type": "url", "url": "https://example.com/sarah-headshot.png" }
}'
Save the returned avatar_item.id (e.g. look_abc123).
-
Generate as many additional looks as you need, each conditioned on Sarah’s identity:
curl -X POST "https://api.heygen.com/v3/avatars" \
-H "X-Api-Key: $HEYGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "prompt",
"name": "Sarah — Navy Blazer Office",
"prompt": "Wearing a navy blazer, modern office background with plants, warm natural light",
"avatar_id": "look_abc123"
}'
Each call returns a new avatar_item.id (a new look) attached to the same avatar_group.id. Browse all looks for an avatar via GET /v3/avatars/looks?group_id=... — and pass any look’s ID as avatar_id to use it as the reference for the next variation.Passing only avatar_group_id (without avatar_id) saves the new look to that group but does not use any of the group’s images as a visual reference — the result is generated purely from the prompt. To keep a character’s identity consistent, pass the base look’s ID as avatar_id.
With reference images
reference_images (up to 3) add style or setting guidance to the generation. They can be used on their own — to guide a brand-new identity — or layered on top of an avatar_id reference for extra control over the new look:curl -X POST "https://api.heygen.com/v3/avatars" \
-H "X-Api-Key: $HEYGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "prompt",
"name": "Brand Ambassador — Plant Studio",
"prompt": "Professional woman in her 40s, warm smile, wearing a navy blazer, modern office background with plants",
"avatar_id": "look_abc123",
"reference_images": [
{ "type": "url", "url": "https://example.com/style-reference.png" },
{ "type": "url", "url": "https://example.com/setting-reference.jpg" }
]
}'
Errors
| Condition | HTTP status | Error code |
|---|
avatar_id not found | 404 | AVATAR_NOT_FOUND |
avatar_id exists but has no usable image (e.g. generation not completed, or rejected) | 400 | INVALID_PARAMETER |
avatar_id does not belong to the provided avatar_group_id | 400 | INVALID_PARAMETER |