Catalog hydrate: resolve an avatar by handle
Resolve an avatar by its human handle, (owner, avatarname), via GET /v1/avatars/{owner}/{name}. The gateway returns the record: the avatar_id you pass to POST /v1/sessions, display name, idle video, poster, and optional greeting.
For a key issued by the developer portal this is where your avatar_id comes from. It is a gen id: gen- followed by 26 lowercase letters and digits. Pass it to POST /v1/sessions unchanged. (Only admin-provisioned partner tenants mint with avt_... ids, which their account team provides.)
Shipped 2026-10-06 on the gateway + Flutter SDK. iOS native in preview. Web SDK integration in flight.
When to use it
Section titled “When to use it”- Your UI shows multiple avatars and you want human-readable ids in your config.
- You want to let users (or your product’s own logic) pick an avatar by name.
- You’re building a reseller / embed where customers pick which avatar runs in their deployment.
If you only ever use one avatar, call this once to get its avatar_id and pin that id in your server config.
Request
Section titled “Request”GET /v1/avatars/{owner}/{name}Authorization: Bearer sk_...owner and name are the human handles, for example brian-alman/brian for Dr. Alman. The gateway resolves either:
- Public avatars — anyone with a valid
sk_can see them. Owned by a studio creator who’s listed the avatar publicly. - Private avatars — only visible to the developer whose
sk_was issued through the Developer Portal, and only when the avatar’s creator has flipped the Studio-sideapi_exposed_attoggle on. See Avatar Studio API exposure for the opt-in.
Not found: 404 no_such_avatar. (Uniform-404 regardless of whether the avatar doesn’t exist or exists but isn’t visible to your tenant; the response can’t be used to probe for private avatar existence.)
Response
Section titled “Response”{ "avatar": { "owner": "brian-alman", "name": "brian", "display_name": "Dr. Alman", "avatar_id": "gen-xxxxxxxxxxxxxxxxxxxxxxxxxx", "listed": true, "idle_url": "https://cdn.example.com/alman/idle.mp4", "poster_url": "https://cdn.example.com/alman/poster.jpg", "greeting": { "id": "grt_123", "video_url": "https://cdn.example.com/alman/intro.mp4", "text": "Hi, I'm Dr. Alman.", "kind": "intro", "consumption_key": null } }, "view_token": null}Fields:
avatar_id: the avatar’s gen id (gen-...). Pass this toPOST /v1/sessions.display_name— human name for your UI.idle_url— background idle video to show before/during warm-up.poster_url— static image before the idle video loads.greeting(optional) — intro video + text the avatar should say on first connect.kind: "intro"plays once per user;kind: "return"plays on repeat visits withconsumption_keyfor server-side idempotency.view_token— reserved for future auth modes;nullon T0.
SDK code
Section titled “SDK code”final result = await restClient.getAvatar('brian-alman', 'brian');print(result.avatar.displayName); // "Dr. Alman"print(result.avatar.avatarId); // "gen-..."
// Use the resolved id to mint a session.final session = await restClient.createLiveKitSession( TwaiApiLiveKitSessionRequest(avatarId: result.avatar.avatarId),);Full SDK docs: Flutter SDK.
let result = try await api.getAvatar(owner: "brian-alman", name: "brian")print(result.avatar.displayName!)print(result.avatar.avatarId)Full SDK docs: iOS native SDK.
As of 2026-10, the Web SDK’s client.avatars.get(owner, name) is in flight. Until it ships, call via your mint proxy:
// in your mint proxyapp.get('/avatars/:owner/:name', async (req, res) => { const r = await fetch( `https://api.2wai.ai/v1/avatars/${req.params.owner}/${req.params.name}`, { headers: { Authorization: `Bearer ${process.env.TWAI_SECRET_KEY}` } } ); res.status(r.status).json(await r.json());});Then client-side:
const { avatar } = await (await fetch(`/api/avatars/${owner}/${name}`)).json();curl https://api.2wai.ai/v1/avatars/brian-alman/brian \ -H "Authorization: Bearer sk_..."Errors
Section titled “Errors”| Status | code | What it means |
|---|---|---|
| 200 | Avatar resolved. This does not prove it is mintable; see below. | |
| 401 | invalid_key | sk_ wrong or revoked. |
| 404 | no_such_avatar | Avatar doesn’t exist publicly, OR exists privately but isn’t visible to your sk_’s tenant. Uniform 404 — can’t distinguish. |
| 502 | gen_unreachable / gen_server_error / gen_unexpected_status | The avatar catalog was unreachable or answered with an error. Retry with backoff. |
| 503 | catalog_hydrate_not_configured | Gateway not fully configured for catalog hydrate. Shouldn’t appear in prod post 2026-10-08. |
| 504 | gen_timeout | The avatar catalog did not answer in time. Retry with backoff. |
See Errors for the full ladder.