Authentication
All API requests require authentication using an API key.
Getting an API Key
- Sign up at dashboard.avatarium.ai (opens in a new tab)
- Navigate to API Keys
- Click Create API Key
- Give your key a descriptive name (e.g., "Production", "Development")
- Copy and securely store your key
🚫
API keys are shown only once. Store them securely immediately after creation.
API Key Format
API keys follow this format:
- Live keys:
av_live_xxxxxxxxxxxxx(for production) - Test keys:
av_test_xxxxxxxxxxxxx(for development)
Using API Keys
In the SDK
import { Avatar } from '@avatarium/react';
<Avatar
apiKey={process.env.NEXT_PUBLIC_AVATARIUM_KEY}
avatarId="aria-001"
/>In API Requests
curl -X POST https://api.avatarium.ai/v1/conversations \
-H "Authorization: Bearer av_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{"avatar_id": "aria-001"}'Security Best Practices
⚠️
Never expose API keys in client-side code in production. Use environment variables.
Environment Variables
.env.local
NEXT_PUBLIC_AVATARIUM_KEY=av_live_xxxxxKey Rotation
Regularly rotate your API keys:
- Create a new key in the dashboard
- Update your application with the new key
- Revoke the old key
Rate Limits
| Tier | Requests/min | Concurrent |
|---|---|---|
| Free | 10 | 2 |
| Creator | 60 | 10 |
| Pro | 300 | 50 |