Skip to content

SDKs

The 2wai Avatar Toolkit is a polyglot developer offering — pick the language your app is already in. Every SDK speaks the same wire (Transport 0 over LiveKit), consumes the same api.2wai.ai gateway, and enforces the same mint-proxy pattern (sk_ server-side only).

Web / TypeScript

Modern browsers (ES2020+). @twai/core + @twai/player + @twai/react. Quickstart →

Web Component

<twai-avatar> — one HTML tag, no framework, two attributes. For sites that just need to drop an avatar into a page. Quickstart →

Flutter

One codebase, every platform: iOS, Android, Web, Windows, macOS, Linux. twai_avatar_sdk + twai_avatar_sdk_livekit. Quickstart →

iOS native (Swift)

SwiftUI-first, Swift Package Manager, iOS 15+. Shipped and verified on device (greeting, audio, Q&A, idle). Quickstart →

REST + Postman

Any language. OpenAPI spec + Postman collection + mint-proxy templates (Node / Python / Cloudflare Worker). See Quickstart for the raw path.

Android native (Kotlin)

Upon request. Flutter already ships to Android from one codebase; a dedicated Kotlin/Compose SDK is roadmap-conditional. Ping your 2wai contact if you need it.

Web (TS)Web ComponentFlutteriOS nativeRESTAndroid native
StatusShippedShippedShippedShipped (device-verified)AlwaysUpon request
Repotwai-web-sdktwai-web-sdk2wai-toolkit2wai-toolkit/ios-nativeOpenAPI—
PlatformsModern browsersAny Custom-Element browseriOS · Android · Web · desktopiOS 15+Any language—
TransportLiveKit (T0)LiveKit (T0)LiveKit (T0)LiveKit (T0)LiveKit (T0)—
Mint-proxyRequiredRequiredRequiredRequiredRequired—
BYO brainYesNo (server-side concern)YesYes (v0.2)Yes—
BYO TTSYesNoYesYes (v0.2)Yes—
Catalog hydratePlannedPlannedYes (getAvatar(owner, name))YesYes (raw REST)—
Mic inputYes (@twai/mic)stt-url attrYes (TwaiMicButton)v0.2Client-side—

If no SDK targets your language yet, the gateway is a plain REST + LiveKit integration — every SDK is a thin wrapper. See the Quickstart for the raw path (Node mint proxy + livekit-client on the client).

Every SDK conforms to 2waiorg/twai-protocol — JSON Schemas + golden test vectors + the single-source codec constant. This is why a bug fixed in one SDK’s engine can be lifted verbatim into another’s: same wire, same shapes, same conformance test.