# Avatars

## GET /v1/speech-to-sign/avatars

Lists preset avatars and your custom avatars (rejected ones hidden). Free.

Response `data`: `system_avatars` (Avatar[]), `custom_avatars` (Avatar[]), `total`.

Avatar fields: `id`, `name`, `is_preset`, `languages` (string[]), `status`
(`pending` | `processing` | `ready` | `failed` | `rejected_quality`; presets can be
`coming_soon`), `quality_reasons[]`, `moderationStatus`, `progress` (0–100),
`progress_label`, `estimated_ready_at`, `preview_url`, `paused`, `preparing_languages[]`.

Test mode: the sample preset list.

## GET /v1/avatars

Alias of `GET /v1/speech-to-sign/avatars`.

## POST /v1/speech-to-sign/avatars/validate

Free quality check of a photo or video; never stored, nothing rendered.
`multipart/form-data` with `file` (photo ≤ 25 MB or video ≤ 100 MB and ≤ 60 s).
Limits: 3 per minute and 20 per day per account (`429 rate_limit_exceeded` with
`Retry-After`).

Response (not wrapped in `data`): `ok` (boolean), `checks[]` (`code`, `pass`
(true/false/null), `severity` (`hard`|`soft`), `async`, `message`), `warnings[]`.
`pass: null` with `async: true` = checked during processing after upload
(`face_visible`, `both_hands_visible`).

Test mode: a sample passing result.

## POST /v1/avatars/validate

Alias of `POST /v1/speech-to-sign/avatars/validate`.

## POST /v1/speech-to-sign/avatars

Creates a custom avatar from one portrait photo or short video.
`multipart/form-data`: `file` (required, ≤ 50 MB), `name` (string), `strict`
(boolean; treat quality warnings as errors). Idempotent with `Idempotency-Key`
(the file's hash is part of the request fingerprint).

**Price:** $199 per year per avatar slot, all sign languages, no setup fee, charged
to your saved card (not the wallet). A free slot you already own is used first;
otherwise one slot is added to your avatar subscription (prorated). Calls that use
the avatar cost the normal per-minute price.

Flow: quality checks → slot → upload → `201` with `data` (Avatar, `status: processing`)
and optional `warnings[]`. The avatar becomes `ready` when every word of its first
language is rendered (usually a few hours; see `progress` / `estimated_ready_at`).

Errors: `400`, `402 payment_method_required` (no saved card; nothing uploaded),
`403 avatar_limit` (50 per account), `413 payload_too_large`,
`422 avatar_quality_failed` (with `checks[]`; nothing stored or charged),
`429 avatar_quality_retry_limit` (5 failed creations per 24 h),
`502 avatar_upload_failed` (slot removed, nothing charged).
Later, if the face/hands checks fail during processing, `status` becomes
`rejected_quality` with `quality_reasons[]` and the slot is removed with prorated credit.

Test mode: a sample avatar; no slot, no charge.

## POST /v1/avatars

Alias of `POST /v1/speech-to-sign/avatars`.

## GET /v1/speech-to-sign/avatars/{id}

One avatar (preset id or your custom id). Free. Response `data`: Avatar.
Errors: `404 avatar_not_found` (also for other accounts' avatars).

## GET /v1/avatars/{id}

Alias of `GET /v1/speech-to-sign/avatars/{id}`.

## DELETE /v1/speech-to-sign/avatars/{id}

Deletes one of your custom avatars and its files right away. Free. No partial refund:
a pre-purchased slot stays owned (and can hold a new avatar); an automatically added
slot keeps running until the end of its billing period, then ends.
Response: `{ "success": true, "message": "Avatar deleted." }`. Errors: `404`.

## DELETE /v1/avatars/{id}

Alias of `DELETE /v1/speech-to-sign/avatars/{id}`.
