API Reference
Build with ZeroWeight using a simple public API for avatar runtime bundles and LiveKit session tokens.
Base URL: https://api.zeroweight.ai
The ZeroWeight Public API lets you:
- Fetch avatar runtime bundles
- Create secure LiveKit access tokens
- Integrate avatars into your own app backend
Overview
Authentication
ZeroWeight uses API keys for all public API requests.
Send your API key in this header:
X-ZW-Api-Key: <your-api-key>Always send your API key from a trusted backend environment. Do not expose secret keys in the client if your setup does not require it.
API keys are managed in the ZeroWeight Dashboard and scoped to a specific user.
Rate limiting
All /api/v1/* routes are rate-limited by client IP.
| Limit | Remaining header | Error when exceeded |
|---|---|---|
| 200 requests per minute | X-RateLimit-Remaining | 429 Too Many Requests |
Endpoints
Avatars
GET /api/v1/avatars/bundle/{avatar_id}
Fetch the encrypted runtime bundle for a specific avatar.
This bundle contains the assets and configuration needed to render the avatar on the client side.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
avatar_id | string | Yes | Unique avatar identifier |
Access rules
- Avatar owners can always fetch their own bundles.
- Public avatars can be fetched by anyone with a valid API key.
- The avatar status must be
available.
Example request
curl -H "X-ZW-Api-Key: <your-api-key>" \
"https://api.zeroweight.ai/api/v1/avatars/bundle/avatar_123"Success response
{
"payload": "<encrypted-payload-string>"
}LiveKit real-time sessions
GET /api/v1/livekit/getToken
Generate a temporary LiveKit JWT for connecting a client to a real-time room for a specific avatar.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
avatar_id | string | Yes | Target avatar UID |
name | string | No | User display name. Default: "my name" |
room | string | No | Specific room ID. Auto-generated if omitted |
Example request
curl -H "X-ZW-Api-Key: <your-api-key>" \
"https://api.zeroweight.ai/api/v1/livekit/getToken?avatar_id=avatar_123&name=alice"Success response
{
"token": "<livekit-jwt-token>",
"room_name": "unique-room-id-456"
}Error responses
The API returns standard HTTP status codes. Errors usually follow this format:
{
"detail": "Error message"
}Common errors
401 Unauthorized
{
"detail": "Invalid API key"
}403 Forbidden
{
"detail": "Avatar is no longer available"
}404 Not Found
{
"detail": "Avatar not found"
}429 Too Many Requests
{
"detail": "Rate limit exceeded"
}