Troubleshooting
The status codes you are most likely to hit, what they mean, and the browser issues behind a silent room.
401 Unauthorized
- The key was revoked or rotated — the old secret stops working within ~30 seconds.
- The header is missing: it must be
X-Api-Key, notAuthorization.
The browser says "blocked by CORS policy"
You called the API from page JavaScript. Even where a browser could make the call, the key would be visible to every visitor. Move the call to your server and have the page call your endpoint (see the Quickstart).
402 Payment Required
Read the error field:
error | Fix |
|---|---|
insufficient_credits | Buy an add-on credit pack under Studio → Billing. |
api_key_spend_cap_reached | Raise or clear the key's spend cap under Studio → API, or wait for the window to reset. |
concurrent_session_limit | Fewer parallel sessions, or a higher cap (up to your plan's maximum). |
sponsor_budget_exhausted | The owner funds this avatar's visitor chats from Studio → Billing and that budget is empty. |
400 Bad Request on create
invalid_zip/invalid_manifest: the message names the entry or field. Common: two files inimage/, aprompt.txttogether withpersona.scenario,visibility: publicon create.invalid_url(JSON create): an asset URL is nothttps, carries credentials, or resolves to a private, loopback or link-local address. Host the files publicly.fetch_failed(JSON create): the URL could not be downloaded — unreachable, a non-2xx answer, or more than three redirects. The message names the URL.invalid_upload: a file has the wrong type or exceeds its size limit.
403 Forbidden
insufficient_scope: the key lacks the scope this call needs (avatars:writeto create or change avatars,billing:writeto fund them,generation:writeandavatars:writeto generate). Add the scope in Studio → API, or create a key with the right scopes.avatar_not_allowed, or noerrorbody: the key is scoped to a different avatar, or theavatarIdbelongs to another account.
404 avatar_not_found
Wrong id, a deleted avatar, or an avatar that belongs to another account — the API never confirms that an avatar exists outside your account.
409 Conflict
avatar_busy: the avatar is already in a live conversation of your account; an avatar holds one at a time, and nothing is billed for the refused start. End the other session (POST /v1/sessions/{id}/end, with theliveSessionIdthe error gives when it is an API session), wait for it to end, or start with another avatar.avatar_not_ready: an Atmee V2 avatar has no take serving yet. PollGET /v1/avatars/{avatarId}untilreadyToChatistrue, then start again.avatar_limit_reached: your plan's limit on API-created avatars (maxApiAvatarsinGET /v1/account). Delete avatars you no longer need.idempotency_key_reused: the sameIdempotency-Keywas sent with a different avatar or amount.
422 Unprocessable Entity
The request body failed schema validation — a field is missing, has the wrong type, or is outside
its limits. The body is { "code": 422, "message": "..." } and the message names the field.
Field limits are listed per endpoint in the API reference.
503 Service Unavailable
A transient error occurred or the service is out of capacity. Retry with exponential backoff and show the visitor a "try again shortly" state.
The room connects but there is no video or audio
- Attach both tracks the avatar publishes (video and audio) in
TrackSubscribed. - Autoplay with sound needs a user gesture — start the session from a click.
- If the visitor cannot be heard, the microphone permission was denied or the wrong device is selected. Let visitors pick a microphone; the built-in one is often not the default.
"Avatar not ready"
Sessions can only start once the avatar has finished building (previews generated). Check
readyToChat on GET /v1/avatars/{avatarId}, or its status on Studio → Manage; a failed
stage shows there with a retry.
The credential making this call GET
For an API key (kind: api_key): its name, scopes, the avatar it is restricted to, its billing mode, its own session caps and how much of its spend cap the current window has used.
Overview
Make an Atmee avatar by chatting with Claude, or have your coding agent build an app around one.

