Skip to main content
POST
Upload Face Avatar
What This Does: Validates that the image contains exactly one prominent face, automatically detects the image orientation (landscape, portrait, or square), aligns the face to the appropriate avatar profile, and stores the result. Returns a preview URL, a full-resolution image URL, and an avatar ID for use in sessions.

Input Methods

Supply the image using exactly one of the following options:

Body

file
Portrait photo to process. Accepted formats: jpeg, jpg, png, gif, webp. Maximum size: 10 MB. The image must contain exactly one clearly visible, prominent face. Send as multipart/form-data.
string
Publicly accessible URL of a portrait photo. The server fetches the image directly. Accepted formats: jpeg, jpg, png, gif, webp. Maximum size: 10 MB. Can be sent as JSON (application/json) or as a text field in multipart/form-data.
string
Base64-encoded portrait photo. A data URI prefix (e.g. data:image/jpeg;base64,) is accepted but not required. Maximum decoded size: 10 MB. Can be sent as JSON (application/json) or as a text field in multipart/form-data.

Response

boolean
Whether the upload and face alignment succeeded.
string
Signed URL of the aligned avatar at 500×500 px, suitable for display in the UI.
string
Signed URL of the full-resolution aligned avatar (capped at 1200 px wide).
string
The avatar ID (format: avat_<ULID>). Use this as the avatar_id when calling Preview Avatar or as the avatar_image_url in session and agent payloads.