---
title: "Create Avatar"
method: POST
path: "/v3/avatars"
tags: ["Avatars"]
---

# Create Avatar

`POST /v3/avatars`

Creates a new avatar from an image, video footage, or a text prompt. Supports photo, digital_twin, and prompt types. Avatar training is asynchronous.

## Headers

- `Idempotency-Key` string

## Request body

- union — Discriminated union for POST /v3/avatars request body.
  - CreatePromptAvatarRequest
    - `type` 'prompt', required — Must be 'prompt' for AI-generated avatars.
    - `name` string, required — Name of the avatar.
    - `prompt` string, required — Prompt for avatar generation.
    - `reference_images` union[], nullable — Reference images — each as {"type": "url", "url": "https://..."} or {"type": "asset_id", "asset_id": "..."}. Max 3.
      - union
        - AssetUrl — Asset input via publicly accessible HTTPS URL.
          - `type` 'url', required — Input type discriminator
          - `url` string, required — Publicly accessible HTTPS URL for the asset
        - AssetId — Asset input via HeyGen asset ID from the asset upload endpoint.
          - `type` 'asset_id', required — Input type discriminator
          - `asset_id` string, required — HeyGen asset ID from the asset upload endpoint
        - AssetBase64 — Asset input via base64-encoded content.
          - `type` 'base64', required — Input type discriminator
          - `media_type` string, required — MIME type of the encoded content (e.g. "image/png")
          - `data` string, required — Base64-encoded file content
    - `avatar_group_id` string, nullable — Optional 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.
    - `avatar_id` string, nullable — Optional avatar id to use as the visual reference for the generation. When provided without avatar_group_id, the new avatar is saved to the referenced avatar's group; when provided with avatar_group_id, 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.
  - CreateDigitalTwinRequest
    - `type` 'digital_twin', required — Must be 'digital_twin' for digital twin avatars.
    - `name` string, required — Name of the avatar.
    - `file` union, required — Footage of the avatar — provide as {"type": "url", "url": "https://..."} or {"type": "asset_id", "asset_id": "..."}
      - AssetUrl — Asset input via publicly accessible HTTPS URL.
        - `type` 'url', required — Input type discriminator
        - `url` string, required — Publicly accessible HTTPS URL for the asset
      - AssetId — Asset input via HeyGen asset ID from the asset upload endpoint.
        - `type` 'asset_id', required — Input type discriminator
        - `asset_id` string, required — HeyGen asset ID from the asset upload endpoint
      - AssetBase64 — Asset input via base64-encoded content.
        - `type` 'base64', required — Input type discriminator
        - `media_type` string, required — MIME type of the encoded content (e.g. "image/png")
        - `data` string, required — Base64-encoded file content
    - `avatar_group_id` string, nullable — Optional identity you would like to attach the digital twin to. By default it will create a new identity.
  - CreatePhotoAvatarRequest
    - `type` 'photo', required — Must be 'photo' for photo-based avatars.
    - `name` string, required — Name of the avatar.
    - `file` union, required — Photo asset of the avatar — provide as {"type": "url", "url": "https://..."} or {"type": "asset_id", "asset_id": "..."}
      - AssetUrl — Asset input via publicly accessible HTTPS URL.
        - `type` 'url', required — Input type discriminator
        - `url` string, required — Publicly accessible HTTPS URL for the asset
      - AssetId — Asset input via HeyGen asset ID from the asset upload endpoint.
        - `type` 'asset_id', required — Input type discriminator
        - `asset_id` string, required — HeyGen asset ID from the asset upload endpoint
      - AssetBase64 — Asset input via base64-encoded content.
        - `type` 'base64', required — Input type discriminator
        - `media_type` string, required — MIME type of the encoded content (e.g. "image/png")
        - `data` string, required — Base64-encoded file content
    - `avatar_group_id` string, nullable — Optional identity you would like to attach the photo avatar to. By default it will create a new identity.

## Response `200`

Successful response

- object
  - `data` CreateAvatarResponse
    - `avatar_item` AvatarLookItem — A single avatar look in the list response. The ``id`` field is the look-level identifier to pass as ``avatar_id`` to POST /v3/videos.
      - `id` string, required — Unique look identifier. Pass this as avatar_id to POST /v3/videos.
      - `name` string, required — Display name of the look.
      - `avatar_type` 'studio_avatar' | 'digital_twin' | 'photo_avatar', required — Avatar look type — determines engine compatibility with POST /v3/videos.
      - `group_id` string, nullable — ID of the avatar group this look belongs to.
      - `preview_image_url` string, nullable — URL to the look preview image.
      - `preview_video_url` string, nullable — URL to the look preview video.
      - `gender` string, nullable — Gender of the avatar.
      - `tags` string[] — Tags associated with the look.
      - `default_voice_id` string, nullable — Default voice ID for this look.
      - `supported_api_engines` string[] — Engine values this look supports for POST /v3/videos. Possible values: 'avatar_v', 'avatar_iv', 'avatar_iii'.
      - `image_width` integer, nullable — Native width of the look in pixels.
      - `image_height` integer, nullable — Native height of the look in pixels.
      - `preferred_orientation` 'portrait' | 'landscape' | 'square', nullable — Preferred orientation of the look: 'portrait', 'landscape', or 'square'.
      - `status` 'processing' | 'pending_consent' | 'failed' | 'completed' — Training/creation status of an avatar group or look.
      - `error` AvatarError — Error details for a failed avatar creation.
        - `code` string, required — Machine-readable error code.
        - `message` string, required — Human-readable error description.
    - `avatar_group` AvatarGroupItem — A single avatar group in the list response. Groups are containers for looks (outfits/styles). To determine avatar type and engine compatibility, fetch the looks via GET /v3/avatars/looks.
      - `id` string, required — Unique avatar group identifier.
      - `name` string, required — Display name of the avatar.
      - `preview_image_url` string, nullable — URL to the avatar preview image.
      - `preview_video_url` string, nullable — URL to the avatar preview video.
      - `gender` string, nullable — Gender of the avatar.
      - `created_at` integer, required — Unix timestamp (seconds) when the avatar was created.
      - `looks_count` integer, required — Number of looks (outfits/styles) available for this avatar.
      - `default_voice_id` string, nullable — Default voice ID for this avatar.
      - `consent_status` string, nullable — The status of consent for the group. None means consent is not required.
      - `status` 'processing' | 'pending_consent' | 'failed' | 'completed' — Training/creation status of an avatar group or look.
      - `error` AvatarError — Error details for a failed avatar creation.
        - `code` string, required — Machine-readable error code.
        - `message` string, required — Human-readable error description.

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication failed
- `409` — A prior request with this Idempotency-Key is still in progress. Wait for the original request to complete, then retry.
- `429` — Rate limit exceeded

---

[API](https://skmtc.net/heygen/apis/heygen-external-api.md) · [All operations](https://skmtc.net/heygen/apis/heygen-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/heygen/heygen-external-api/versions/e2e54726e210/schema)
