API Reference
The Avatarium REST API allows you to create and manage avatar conversations programmatically.
Base URL
https://api.avatarium.ai/v1Authentication
All requests require a Bearer token:
curl https://api.avatarium.ai/v1/avatars \
-H "Authorization: Bearer av_live_xxxxx"Request Format
- Content-Type:
application/json - All request bodies should be JSON
- All timestamps are ISO 8601 format
Response Format
Successful responses return JSON:
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"createdAt": "2025-01-15T10:00:00.000Z"
},
"meta": {
"requestId": "req_abc123"
}
}Error responses include code and message:
{
"error": {
"code": "BAD_REQUEST",
"message": "avatarId is required"
},
"meta": {
"requestId": "req_abc123"
}
}Rate Limits
| Tier | Requests/min |
|---|---|
| Free | 10 |
| Creator | 30 |
| Pro | 60 |
| Enterprise | Custom |
Rate limit headers are included in responses:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1705312800⚠️
Exceeding rate limits returns 429 Too Many Requests. Implement exponential backoff.
Endpoints
Health
Health checks are available with or without the version prefix:
| Method | Path | Auth | Description |
|---|---|---|---|
GET | https://api.avatarium.ai/health | None | Root health check for infrastructure monitors |
GET | /health | None | Versioned health alias under the /v1 base URL |
Avatars
| Method | Path | Auth | Description |
|---|---|---|---|
GET | /avatars | None | List available avatar presets |
GET | /avatars/:id | None | Get avatar preset details |
GET | /avatars/:id/model | None | Get avatar 3D model URL |
Conversations
| Method | Path | Auth | Description |
|---|---|---|---|
POST | /conversations | API Key | Create conversation session |
GET | /conversations/:id | API Key | Get conversation & messages |
POST | /conversations/:id/messages | API Key | Send a message |
POST | /conversations/:id/end | API Key | End a conversation |
GET | /conversations/:id/ws | API Key | Upgrade to WebSocket |
Text-to-Speech
| Method | Path | Auth | Description |
|---|---|---|---|
POST | /tts | API Key | Synthesize speech |
GET | /tts/voices | None | List available voices |
POST | /tts/preview | API Key | Preview a voice |
POST | /tts/elevenlabs | API Key | Synthesize via ElevenLabs |
POST | /tts/groq | API Key | Synthesize via Groq TTS |
POST | /tts/deepgram | API Key | Synthesize via Deepgram |
AI Models
| Method | Path | Auth | Description |
|---|---|---|---|
GET | /models | None | List available AI providers and models |
GET | /ai/providers | API Key | List AI providers with capabilities |
POST | /ai/chat | API Key | Raw AI chat completion |
Personas
| Method | Path | Auth | Description |
|---|---|---|---|
GET | /personas | None | List all persona presets |
GET | /personas/:vertical | None | List personas by vertical (e.g., education, support) |
GET | /personas/id/:id | None | Get a specific persona by ID |
API Keys
| Method | Path | Auth | Description |
|---|---|---|---|
GET | /api-keys | JWT | List your API keys |
POST | /api-keys | JWT | Create a new API key |
DELETE | /api-keys/:keyId | JWT | Revoke an API key |