Endpoints
| Method | Path | Description |
|---|---|---|
POST | /api/v1/avatars/generate | Queue an avatar generation job |
POST | /api/v1/avatars/save | Save a completed avatar for reuse |
GET | /api/v1/avatars | List saved avatars |
GET | /api/v1/avatars/:id | Get a specific saved avatar |
Authentication
Generate an avatar
202 Accepted with a job_id. You poll the Jobs API for the result.
Input modes
Library-assisted — Send onlyprompt (and optional hints). The service selects an internal reference for inspiration and generates a new character. The internal library is always used.
Bring your own references — Send reference_images (1–6 items). The internal library is skipped; generation uses your images together with prompt and hints.
Reference images: max 6 per request, max 15 MB each. Accepted formats: JPEG, PNG, WebP.
Request parameters
Creative description of the avatar you want. Non-empty string up to 5,000 characters.
Flat object to steer composition, style, and cultural context. Invalid keys are ignored downstream; prefer documented keys for predictable results.
1–6 reference images as data URLs (
data:image/...;base64,...) or raw base64 strings. When provided, the internal library is skipped.Output controls. All subfields are optional.
Your own correlation ID for workflow or agent tracing. Echoed into the job record. Maximum 200 characters.
String map echoed into the job payload and webhook delivery. Maximum 16 keys; each value up to 500 characters.
Example request
Response (202)
Request identifier (e.g.
req_pi_...).Always
"job".Initial status:
"queued".Unix timestamp of when the request was created.
UUID of the background generation job.
Polling for the result
completed, use data.avatar.image_url for the generated image.
Idempotency
Send anIdempotency-Key header to make retries safe. Replaying the same key with the same request body returns the original 202 response. Using the same key with a different body returns 409 idempotency_key_mismatch.
Save an avatar
Request parameters
UUID of the completed avatar generation job.
Human-readable label for the saved avatar, e.g.
"CEO hero v2".Example request
Avatar object
Unique identifier of the saved avatar record.
The label you assigned when saving.
URL of the generated avatar image.
UUID of the source generation job.
Unix timestamp of when the avatar was saved.
List saved avatars
Query parameters
Number of results to return. Default:
20.Pagination offset. Default:
0.Example request
Get a saved avatar
Path parameters
ID of the saved avatar record.