Skip to main content
POST
Upload an avatar

Authorizations

Authorization
string
header
required

Your Boson API key, sent as Authorization: Bearer $BOSON_API_KEY.

Body

image
string
required

The image as base64 or a data: URI: PNG, JPEG or WebP, up to 10 MB. URLs are not accepted.

name
string | null

A name for the avatar.

Maximum string length: 256

Response

The uploaded (or existing) avatar.

avatar_id
string

Pass this as avatar_id when creating a session.

Example:

"builtin_claire_v1"

object
enum<string>
default:avatar
Available options:
avatar
name
string
Example:

"Claire"

width
integer

Reference image width in pixels.

height
integer

Reference image height in pixels.

is_public
boolean

true for a Boson preset, false for one of your account's avatars.

created_at
string<date-time> | null