REST API
Use the rooomAvatars REST API to register avatar configurations, download generated GLB models, fetch previews, and load animations.
Components
Authentication
Use Authentication to add bearer tokens to registration requests and initialize the editor iframe.
Endpoints
Use API Endpoints to register avatar configurations, download models, fetch previews, and request animation files.
Base URL
The hosted rooomAvatars API is reachable at https://api.avatars.rooom.com. All examples in these docs use that base URL.
Discovering the API base URL
Staging editor deployments may run against a different API. The editor publishes its API base URL in a config.json file served from the editor origin:
curl "https://editor.avatars.rooom.com/config.json"{
"apiUrl": "https://api.avatars.rooom.com"
}Fetch config.json from the same origin and path you embed the editor from (without the #token=… hash), then use apiUrl as the base for all REST API requests. This lets a single client target multiple environments without hardcoding the API URL.
INFO
The discovery file is optional for integrations that target the hosted editor at https://editor.avatars.rooom.com. Use it when you embed a staging editor and need to follow the editor's API configuration.
Key Features
- Bearer-token authentication for avatar registration.
- Avatar registration from the same configuration object used by the editor.
- Generated
.glbmodel downloads with level-of-detail, animation, texture, and mesh options. - Preview image downloads with size, camera, and background options.
- Built-in animation discovery and
.glbanimation downloads.