Commands & props

One engine means one vocabulary. Every wrapper — React, Vue, Svelte, Angular, Web Component — understands the same desktop-style command line and the same prop names.

Command verbs

Run them via runCommand(line) (wrappers), el.runCommand(line) (Web Component), or executeCommand(line, ctx) (core).

VerbExampleDescription
showshowMake the avatar visible / resume playback.
hidehideHide the avatar / pause playback.
toggletoggleFlip between shown and hidden.
actionaction 1 · action waveTrigger an action clip by index or id.
actionsactionsList the available actions for the loaded avatar.
infoinfoReturn avatar / player status info.
speedspeed 2 4Set idle and (optionally) talk animation speeds.
sensitivitysensitivity 0.6Set lip-sync sensitivity (0..1).
mutemuteMute the avatar's audio output.
unmuteunmuteUnmute audio.
ttstts "hello there"Speak text through the active TTS engine.
ask (alias provider)ask "what's the weather?"Send text to the chat/LLM webhook and speak the reply.
wakewakeFire the wake-word action (open chat / warm TTS).
stopstopStop speaking / cancel the current action.
helphelpReturn { ok, message } with the full verb list.

Common props

Shared across wrappers (camelCase in JS frameworks; kebab-case attributes on the Web Component & Svelte custom element, e.g. avatar-url).

PropTypeDescription
avatarUrlstringURL to a .ania or avatar .json file (market or personal).
avatarPasswordstringPassword for an encrypted (personal) .ania file.
avatarDataobjectAlready-decrypted data — skips the fetch/decrypt.
authTokenstringBearer token for the avatar URL download.
width / heightnumberCanvas size in px (default 320).
theme'dark' | 'light' | 'blue' | 'purple'Container color theme.
position'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'Fixed-position anchor.
idleSpeed / talkSpeednumberAnimation speed multipliers.
autoCalculateSpeedbooleanDerive optimal speeds from the avatar's fps.
lipSyncEnabledbooleanEnable real-time lip-sync from mic audio.
lipSyncIntensitynumberOpenness boost, 0..1 (default 0.6).
lipSyncResponsivenessnumberEnvelope smoothing, 0.05..1 (default 0.5).
lipSyncSustainStyle'hold' | 'wiggle'Mouth behaviour during sustained speech.
actionsActionConfig[]Action clip definitions (frame ranges, audio, hotkeys).
ttsProvider'browser' | 'tiktok' | 'elevenlabs' | 'google' | 'azure' | 'piper'Active TTS provider.
sttProvider'browser' | 'google'Active STT provider.
wakeWordEnabled / wakeWordModelUrlboolean / stringOn-device wake-word (needs onnxruntime-web).
webhookUrlstringChat/LLM webhook (n8n-style) for the chatbot component.
enablePostMessageControlbooleanInstall an origin-allowlisted postMessage command listener.
localestring (BCP-47)UI language for built-in strings (~190 locales bundled).

Events

Emitted as framework events (@load, onload, (load)) or DOM CustomEvents on the custom elements (ania-load / load).

EventPayload
loadthe loaded avatar data (frames, config)
talkStart / talkEnd—
actionStart / actionEndaction id
errorthe Error
close—

▶ See it running →