Widget.
Embed one script tag and your published agent takes WebRTC voice calls right in the browser — no phone number, no telephony cost, just your per-minute voice rate. It's the fastest way to put a live agent on a page.
Embed#
Publishing an agent returns the widget embed in the response — a single script tag pointed at your agent's bundle. Drop it into any page and a call button appears; clicking it opens a WebRTC connection straight to the agent. See Agents → Publish for the response that carries this tag.
<script src="https://voice.whizztech.ai/w/ag_7Q2c51b84a07.js" async></script>Customize#
Configure the widget with data-* attributes on the script tag — no build step, no bundler. Everything has a sensible default, so the bare tag already works.
| Attribute | Type | Description | |
|---|---|---|---|
| data-agent | string | optional | Agent id to serve. Optional — the bundle URL already encodes the agent, so set this only to override it. |
| data-position | string | optional | Where the launcher sits — "bottom-right" (default) or "bottom-left". |
| data-label | string | optional | Text on the call button. Defaults to a localized "Talk to us". |
| data-color | string | optional | Accent color as a hex value. Defaults to the brand gold. |
| data-lang | string | optional | Initial interface language — "ar" or "en". The agent still detects and switches dialect from what the caller speaks. |
| data-greeting-autostart | string | optional | "true" to connect and speak the first message as soon as the panel opens; "false" (default) waits for the caller to start. |
<script
src="https://voice.whizztech.ai/w/ag_7Q2c51b84a07.js"
data-position="bottom-left"
data-label="تحدث معنا"
data-lang="ar"
data-greeting-autostart="true"
async
></script>Programmatic control#
Once the script loads it attaches a global WhizzVoice, so you can open or close the call from your own UI and listen for call events — handy for launching from a custom button or reacting when a call ends.
// The script attaches a global once it loads.
WhizzVoice.open(); // open the call panel and start connecting
WhizzVoice.close(); // end the call and collapse the panel
// Fires when a call finishes; the call id matches GET /v1/calls.
WhizzVoice.on("call:ended", (call) => {
console.log(call.id, call.duration_sec, call.outcome);
});How web calls bill#
A web call has no phone number and no telephony leg, so there is no telephony cost — you pay only your per-minute voice rate, billed per second after the 10-second minimum. The resulting call object has channel: "web" and no phone_number_id, but is otherwise identical to a phone call: it appears in GET /v1/calls with its transcript, tool calls, and outcome, and fires the same call.completed webhook.