Overview
The Avatar API provides endpoints for generating AI avatars, managing avatar metadata, publishing to the community feed, and retrieving avatar assets. All endpoints require authentication via API key.Base URL
Authentication
All requests must include your API key in the Authorization header:Core Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /avatars/generate | Generate a new avatar from prompt |
| POST | /avatars/percify-yourself | Create avatar from photo |
| POST | /avatars/cast | Generate multi-character scene |
| GET | /avatars/{avatarId} | Get avatar details |
| GET | /avatars | List your avatars |
| PATCH | /avatars/{avatarId} | Update avatar metadata |
| POST | /avatars/{avatarId}/publish | Publish avatar to feed |
| DELETE | /avatars/{avatarId} | Delete avatar |
| POST | /avatars/{avatarId}/like | Like an avatar |
| POST | /avatars/{avatarId}/comment | Comment on avatar |
| POST | /avatars/{avatarId}/remix | Remix/derive from avatar |
Avatar Object
Quick Start Examples
Generate Basic Avatar
Get Avatar Status
List Your Avatars
Generation Status
Avatars go through several status stages:| Status | Description | Next Action |
|---|---|---|
queued | Waiting in generation queue | Poll for status update |
processing | AI model is generating | Continue polling |
completed | Generation successful | Image URLs available |
failed | Generation failed | Check error details |
Error Responses
Standard error format:invalid_request- Missing or invalid parametersauthentication_required- Missing or invalid API keyinsufficient_credits- Not enough credits for operationrate_limit_exceeded- Too many requestscontent_policy_violation- Prompt violates content policyavatar_not_found- Avatar ID doesn’t existunauthorized_access- Can’t access another user’s private avatar
Rate Limits
| Tier | Requests/minute | Concurrent Generations |
|---|---|---|
| Free | 10 | 1 |
| Pro | 60 | 5 |
| Enterprise | 300 | 20 |
Webhooks
Subscribe to avatar events:avatar.completed- Generation finished successfullyavatar.failed- Generation failedavatar.published- Avatar published to feedavatar.liked- Someone liked your avataravatar.commented- New comment on avatar
Best Practices
Polling for Completion
Polling for Completion
Idempotency
Idempotency
Use idempotency keys for safe retries:
Error Handling
Error Handling