Back to Eliza

Avatar API

packages/docs/rest/avatar.md

2.0.1972 B
Original Source

Upload Custom VRM Avatar

POST /api/avatar/vrm

Uploads a custom VRM avatar file and saves it to ~/.eliza/avatars/custom.vrm, replacing any previous upload.

Request: Raw binary body containing a .vrm (glTF-binary) file.

ConstraintValue
Max file size50 MB
FormatglTF-binary (must begin with glTF magic bytes)

Response:

json
{ "ok": true, "size": 1048576 }

size is the file size in bytes.

Errors: 400 if body is empty, exceeds 50 MB, or fails the glTF magic-byte check.

Get Custom VRM Avatar

GET /api/avatar/vrm

Serves the currently uploaded custom VRM avatar file. Also supports HEAD requests for existence checks.

Response: Binary VRM/GLB file body.

HeaderValue
Content-Typemodel/gltf-binary
Content-LengthFile size in bytes
Cache-Controlno-cache

Errors: 404 if no custom avatar has been uploaded.