# Stork Live: API

Every call and option of the Stork Live web client.

Tested 2026-12-02. HTML: https://www.stork.ai/live/docs/api

## Calls

| Call | What it does |
|---|---|
| StorkLive.mount(canvas, options) | Loads the avatar and starts drawing. Resolves when the first frame is on screen. |
| live.speak(source) | Plays the sound and moves the lips in step with it. The source is an audio track, a MediaStream, an <audio> element or an AudioBuffer. For a file or buffer, resolves when the sound ends. |
| live.stop() | Stops speaking. The avatar goes back to idling. |
| live.destroy() | Stops drawing and frees the worker. |
| live.ctx | The audio context in use. Set it to one you opened in a click handler before the first speak. |
| live.stats | { drawn, late }: lip frames shown on time, and frames that arrived too late to show, since the last speak. |
| live.bytes | Size of the avatar file in bytes. |

## Options for mount

| Option | Meaning |
|---|---|
| avatar | A library face by name ('a' to 'h'), or the address of your own avatar file without its extension. |
| delay | Seconds the sound is held back so lips and voice line up. Default about 0.3. |
| assets | Address of the idle assets, when you host them yourself. |

The package is https://www.npmjs.com/package/stork-live. It exports the client, a React component (stork-live/react) and helpers that follow an agent for you (stork-live/livekit, stork-live/pipecat).
