# Render with WebGPU

URL: https://docs.bithuman.ai/platforms/web/webgpu

> Render an avatar in the browser with a device check.

For Essence 2 and Expression 2, add `render=local` to request rendering in the browser. The embed checks the device before starting a session. If the device can't render the avatar in real time, it shows a message without starting a cloud session. With the web embed, the conversation runs on bitHuman's servers, even when the avatar renders in the tab (`render=local`).

`render=local` supports Essence 2 and Expression 2 avatars that have a browser build. Essence 2 requires a hardware WebGPU adapter. Expression 2 can also use a supported browser without WebGPU when the viewer is cross-origin isolated and passes the device check. An ordinary iframe without cross-origin isolation needs WebGPU for either model. Models without an in-browser renderer show "This avatar can only be rendered in the cloud" instead.

- **Download:** when a new probe is needed, the embed loads the avatar's browser bundle. The browser can cache it for later visits. Tell visitors before downloading on a metered connection.
- **No cloud fallback:** an unsupported browser or a device that measures too slow shows "This device can't keep up with this avatar (reason). Try another device or browser.", with the reason in the brackets. No session starts.
- **First visit:** after the visitor selects the start button, the tab shows "Checking this device…" and checks the avatar before starting a session.
- **Later visits:** a remembered pass or device refusal lasts up to 30 days for that model family and device/browser combination. A change to the browser major version or reported graphics vendor/architecture triggers another check. Blocked browser storage means the check runs again.
- **Connection problems:** a temporary check failure retries locally; it isn't remembered as a device refusal. A missing browser build shows an avatar message instead.
- **Where the conversation runs:** with the web embed, the conversation runs on bitHuman's servers, even when the avatar renders in the tab (`render=local`).
- **Private agents:** the embed token the iframe already uses covers it ([Embedding](https://docs.bithuman.ai/api/embedding)).

*Diagram: The web embed with render=local.* With render=local the avatar renders in the visitor's browser tab with WebGPU. The conversation runs on bitHuman's servers, even when the avatar renders in the tab: the microphone audio goes to bitHuman and the voice reply comes back.

Choose the render mode explicitly. A GPU check alone doesn't establish browser support or whether the avatar renders fast enough. Let the embed perform its device check:

```html
<iframe src="https://www.bithuman.ai/embed/A23WJF0199?render=local"
        allow="microphone *" style="width:100%;height:600px;border:0"
        title="Talking avatar"></iframe>
```

Expected: after selecting **Tap to talk**, the embed checks the device, then starts rendering in the tab or displays a refusal message. Use `render=cloud` when you want cloud rendering instead.

Do not send `Cross-Origin-Embedder-Policy` from the page that holds the iframe: the embed does not send one itself, so the browser refuses to load it.
