Skip to main content
POST
/
avatars
Create a new Avatar
curl --request POST \
  --url https://api.argil.ai/v1/avatars \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "type": "IMAGE",
  "name": "<string>",
  "datasetImage": {
    "url": "<string>"
  },
  "voiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "extras": {}
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "actorName": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "gestures": [
    {
      "label": "<string>",
      "slug": "<string>",
      "startFrame": 123
    }
  ],
  "status": "NOT_TRAINED",
  "width": 123,
  "height": 123,
  "thumbnailUrl": "<string>",
  "coverImageUrl": "<string>",
  "extras": {},
  "orientation": "ASPECT_RATIO_16_9",
  "model": "ARGIL_V1"
}

Overview

Create a new avatar from an image. Supports both URL and base64-encoded image formats. If no voiceId is provided, a voice design will be automatically created from the image.

Request Body

{
  "type": "IMAGE",
  "name": "<avatar_name>",
  "datasetImage": {
    "url": "https://example.com/avatar-image.jpg", // OR
    "base64": "data:image/png;base64,iVBORw0KGgoAAAANS..."
  },
  "voiceId": "<voice_id>",
  "extras": {
    "custom_key": "custom_value"
  }
}

Image Requirements

  • Format: PNG, JPEG, or WEBP
  • Resolution: Between 720p (1280x720 or 720x1280) and 4K (3840x2160 or 2160x3840)
  • Aspect Ratio: Must be exactly 16:9 (landscape) or 9:16 (portrait)
  • Max Size: 10MB
  • Protocol: HTTPS URLs only (for url field)

Optional Fields

  • voiceId: UUID of an existing voice to use. If not provided, a voice design will be automatically created from the image.
  • extras: Custom metadata dictionary (max 10 key-value pairs, 256 characters each)

Response

Returns the created Avatar object. The avatar will be created with TRAINING status and transition to IDLE when ready.

Avatar Status

After creating an avatar, it will be in the TRAINING status. The avatar typically becomes ready (status changes to IDLE) within 30 seconds. Important: Before creating videos with a newly created avatar, you must ensure the avatar status is IDLE. You have two options:

Option 1: Poll Avatar Status

Periodically check the avatar status using the GET /avatars/ endpoint until the status is IDLE:
curl -X GET https://api.argil.ai/v1/avatars/{avatar_id} \
  -H "x-api-key: YOUR_API_KEY"
Subscribe to the AVATAR_TRAINING_SUCCESS webhook event to receive a notification when the avatar is ready. This is the recommended approach as it avoids polling and provides real-time updates. Learn more about setting up webhooks: AVATAR_TRAINING_SUCCESS Event

Cost

Each image avatar created from API will cost 2 credits.

Authorizations

x-api-key
string
header
required

API key to be included in the x-api-key header

Body

application/json
type
enum<string>
required

Avatar creation type - must be 'IMAGE' for image-based avatars

Available options:
IMAGE
name
string
required

Name of the avatar

Required string length: 1 - 256
datasetImage
Image URL · object
required

Image source for avatar creation. Either 'url' or 'base64' must be provided.

voiceId
string<uuid>

Optional voice ID to use for this avatar. If not provided, a voice design will be automatically created from the image.

extras
object

Optional dictionary of custom key-value pairs to extend the avatar metadata. Maximum of 10 key-value pairs of 256 characters allowed

Response

Successfully created Avatar. The training process will start automatically.

id
string<uuid>
name
string
actorName
string
createdAt
string<date-time>
updatedAt
string<date-time>
gestures
object[]

A list of labelized gestures available for your avatar.

status
enum<string>
  • NOT_TRAINED - Initial state after VIDEO mode avatar creation (before training starts)
  • TRAINING - Avatar is currently training. For IMAGE mode avatars, this is the initial status after creation.
  • TRAINING_FAILED - Training process failed
  • IDLE - Avatar is ready to use
  • REFUSED - Avatar was refused by moderation
Available options:
NOT_TRAINED,
TRAINING,
TRAINING_FAILED,
IDLE,
REFUSED
width
integer
height
integer
thumbnailUrl
string

The url of the thumbnail of the avatar (low resolution).

coverImageUrl
string

The url of the cover image of the avatar (high resolution).

extras
object

A dictionary of custom key-value pairs to extend the Avatar metadata. Maximum of 5 key-value pairs of 256 characters allowed.

orientation
enum<string>
Available options:
ASPECT_RATIO_16_9,
ASPECT_RATIO_9_16
model
enum<string>
Available options:
ARGIL_V1,
ARGIL_ATOM