Back to Eliza

Emotes API

packages/docs/rest/emotes.md

2.0.11.9 KB
Original Source

The emotes API lets you browse the catalog of available 3D emote animations and trigger them on the agent's avatar. Triggering an emote broadcasts a WebSocket event to all connected clients, which play the corresponding GLB animation.

Endpoints

MethodPathDescription
GET/api/emotesList all available emotes
POST/api/emoteTrigger an emote animation

GET /api/emotes

Returns the full emote catalog — all available 3D animations with their metadata.

Response

json
{
  "emotes": [
    {
      "id": "wave",
      "label": "Wave",
      "glbPath": "/emotes/wave.glb",
      "duration": 2.0,
      "loop": false
    },
    {
      "id": "dance",
      "label": "Dance",
      "glbPath": "/emotes/dance.glb",
      "duration": 4.5,
      "loop": true
    }
  ]
}
FieldTypeDescription
emotes[].idstringUnique emote identifier
emotes[].labelstringDisplay name
emotes[].glbPathstringPath to the GLB animation file
emotes[].durationnumberAnimation duration in seconds
emotes[].loopbooleanWhether the animation loops

POST /api/emote

Trigger an emote animation. The server broadcasts a WebSocket message to all connected clients with the emote details.

Request Body

FieldTypeRequiredDescription
emoteIdstringYesID of the emote to trigger (from the catalog)
json
{
  "emoteId": "wave"
}

Response

json
{
  "ok": true
}

WebSocket Broadcast

Connected clients receive:

json
{
  "type": "emote",
  "emoteId": "wave",
  "glbPath": "/emotes/wave.glb",
  "duration": 2.0,
  "loop": false
}

Errors

StatusCondition
400Unknown emoteId or no emoteId provided