Upload Face Avatar
Avatars
Upload Face Avatar
Upload a portrait photo to create a face-aligned avatar image
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:| Method | Content-Type | Field |
|---|---|---|
| File upload | multipart/form-data | file |
| Image URL | application/json or multipart/form-data | image_url |
| Base64 string | application/json or multipart/form-data | image_base64 |
Body
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.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.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
Whether the upload and face alignment succeeded.
Signed URL of the aligned avatar at 500×500 px, suitable for display in the UI.
Signed URL of the full-resolution aligned avatar (capped at 1200 px wide).
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.