Avatars

Create a new one-shot avatar from an image file or image URL. You can use either multipart/form-data with an image file, or JSON with an image URL. Every plan includes unlimited saved custom avatars. Image moderation quotas and creation capacity limits still apply.

post/v1/avatars

Request

  • Base URL
    https://api.anam.ai
  • URL
    https://api.anam.ai/v1/avatars
  • Auth
    HTTP bearer

Request body

displayNamestring required

Display name for the avatar (1+ characters)

imageUrlstring uri required

URL of the image to create the avatar from (JPEG, PNG, or WebP, max 4.5MB). The image will be downloaded, processed, and stored permanently.

imageProcessing'auto' | 'preserve'

auto crops and may outpaint the image. preserve uses the source pixels without resizing, cropping, padding, outpainting or alignment/refinement. Requires an opaque, static, 8-bit RGB or RGBA PNG of exactly 1152x1152 pixels, at most 4.5MB, with no EXIF metadata. RGBA alpha must be fully opaque. Cannot be combined with zoomOutPercent. Moderation, quotas and facial compatibility checks still apply. Character animation quality varies with human-like facial features. Output video still uses the normal landscape or portrait crop; sourceImageUrl returns the square source. Animation frames may change.

avatarModel'cara-4' | 'cara-4.1-express' | 'cara-4-latest'

Avatar model for creation. Defaults to cara-4.1-express. Cara 2 and Cara 3 creation are not supported.

Response

Successfully created avatar

idstring uuid

Unique identifier for the avatar.

displayNamestring

Human-readable name shown in the Lab and share links.

variantNamestring

Name of the specific variant (e.g. lighting or pose) within the avatar family.

imageUrlstring uri

Still image of the avatar, framed exactly like videoUrl, idleVideoUrl and a landscape session (the default). Use it as the thumbnail, poster or loading image wherever a preview video or the live stream replaces it, and give the image and the video the same box, object-fit and object-position so the avatar doesn't move when they swap. For Cara 4 avatars this is the 1152x768 landscape crop (the same image as landscapeImageUrl). Cara 4 avatars used to return their square source image here; that image is now sourceImageUrl. Empty when the avatar has no image yet.

sourceImageUrlstring uri

The image the avatar was created from. For Cara 4 avatars it is square (1152x1152) and shows more of the scene than the 1152x768 crop that preview videos and sessions use, so the avatar appears to zoom in when a video or call replaces it. Don't use it as a thumbnail, poster or loading image next to videoUrl or a session; use imageUrl, landscapeImageUrl or portraitImageUrl. For legacy avatars it is the same landscape image as imageUrl.

landscapeImageUrlstring uri nullable

Still image cropped exactly as the engine frames landscape (1152x768) output, which is also the framing of videoUrl and idleVideoUrl. Use it with landscape sessions (the default) and preview videos. For avatars with legacy landscape source images this is the source image.

portraitImageUrlstring uri nullable

Still image cropped exactly as the engine frames portrait (768x1152) output. Use it as the poster for a session started with portrait videoWidth/videoHeight. Preview videos are landscape, so don't swap this image for videoUrl. null when the avatar cannot render portrait output.

videoUrlstring uri nullable

Signed URL for a verified muted MP4 preview of the avatar. Uses the idle loop if the talking preview is unavailable. Landscape (1152x768 for Cara 4 avatars, 720x480 for legacy avatars) and framed exactly like imageUrl, so pair it with imageUrl or landscapeImageUrl, not sourceImageUrl. The URL expires after 1 hour; re-fetch the avatar to get a fresh URL. null when the preview is unavailable or still generating.

idleVideoUrlstring uri nullable

Signed URL for a muted idling-loop MP4 of the avatar, if one exists. Landscape and framed exactly like imageUrl, like videoUrl. The URL expires after 1 hour; re-fetch the avatar to get a fresh URL. null when unavailable or still generating.

createdAtstring date-time

Timestamp when the avatar was created.

updatedAtstring date-time

Timestamp when the avatar was last updated.

createdByOrganizationIdstring nullable

ID of the organization that created the avatar, or null for stock avatars. IDs may be either UUIDs or nanoid-style strings depending on when the organization was created.

availableVersionsstring[]

Avatar models this avatar can be used with. Pass one of these values as avatarModel when creating a persona or starting a session.

activeVersionstring nullable

Avatar model used by default when no explicit avatarModel is requested.

descriptionstring nullable

AI-generated description of the avatar's appearance, setting, and style. null if metadata generation has not completed.

displayTagsstring[]

Curated tags describing the avatar. Empty array if metadata generation has not completed.

renderStyle'realistic' | 'animated_3d' | 'illustrated' | 'unknown'

Render style of the avatar. unknown covers custom avatars and avatars whose metadata has not yet been generated.

Changes

    • warning

      added the new image_unprocessable enum value to the response property for the response status

    • warning

      added the new moderation_blocked enum value to the response property for the response status

    • info

      the response property became required for the status

    • info

      added the new optional request property (media type: multipart/form-data)

    • info

      added the new optional request property (media type: application/json)