> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lovi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Voice widget (embed)

> The iawidget.js script loads voice-widget configuration and opens an in-browser audio session.

You **do not call this endpoint yourself**. `https://widget.lovi.ai/iawidget.js` calls it when the script has `mode="voice"`.

Install guide: [Voice widget](/en/user-guide/Setting/ug_voicewidget_en).

## Get configuration

```
GET https://cloud.lovi.ai/functions/v1/voice-widget?id_widget={WIDGET_ID}&language={LANG}
```

| Parameter    | Required                  | Description                                                       |
| ------------ | ------------------------- | ----------------------------------------------------------------- |
| `id_widget`  | Yes                       | Widget UUID. In HTML this is the `widget` attribute.              |
| `language`   | No                        | Translation language (`es`, `en`, …).                             |
| `access_key` | Yes (added by the script) | Company access key. Do not put it in repositories or screenshots. |

The response includes appearance settings (`Voice-config`: colours, position, animation) and the audio session data the embed needs.

This is **not**:

* `GET /functions/v1/widgetWebView` — chat in an iframe. See [Widget WebView](./widget_webview).
* `POST /functions/v1/notify/voice` — outbound phone call. See [Voice notifications](./voice_notifications).

The audio session is a signed WebSocket (16 kHz PCM, ElevenLabs ConvAI). There is no public `start` / `stop` API for the host page.
