Live agent in three calls.
Key → create an agent → publish → take or make calls. Voice bills per second after a 10-second minimum, at your language tier's all-in rate; every workspace starts with $5 of free credit and no card.
Get an API key#
Create a key at Dashboard → API Keys. The full key is displayed once at creation — only a SHA-256 hash is stored server-side, so copy it into your secret manager immediately.
export WHIZZ_KEY="wz_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Create an agent#
POST /v1/agents takes the persona and first message, the language set, and the dialect and voice. Setting languages to include ar routes the agent to the Dialect Engine automatically — you never name an engine or a vendor. The full field reference is on the Agents page.
curl -X POST https://voice.whizztech.ai/v1/agents \
-H "Authorization: Bearer $WHIZZ_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Support · AR/EN",
"languages": ["ar", "en"],
"dialect": "saudi",
"voice": "noura",
"first_message": "حياك الله في خدمة عملاء وِز، كيف أقدر أخدمك؟",
"persona": "Warm, concise support agent. Confirm the order before acting.",
"tools": ["lookup_order", "expedite_shipment"]
}'{
"id": "ag_7Q2c51b84a07",
"object": "agent",
"name": "Support · AR/EN",
"status": "draft",
"engine_route": "dialect",
"lang_tier": "arabic",
"languages": ["ar", "en"],
"dialect": "saudi",
"voice": "noura",
"published_version": 0,
"created_at": "2026-07-13T09:32:18.000Z"
}Publish and get the widget#
Publishing snapshots a version and syncs the agent to the live gateway. The response carries the web-widget embed — one script tag and the agent takes WebRTC calls in the browser, no phone number required. To take PSTN calls, attach a phone number.
curl -X POST https://voice.whizztech.ai/v1/agents/ag_7Q2c51b84a07/publish \
-H "Authorization: Bearer $WHIZZ_KEY"{
"id": "ag_7Q2c51b84a07",
"status": "published",
"published_version": 1,
"widget": {
"agent_id": "ag_7Q2c51b84a07",
"embed": "<script src=\"https://voice.whizztech.ai/w/ag_7Q2c51b84a07.js\" async></script>",
"connect_url": "wss://voice-gateway.whizztech.ai/rt/connect?agent=ag_7Q2c51b84a07"
}
}Place an outbound call#
With a number attached, POST /v1/calls dials out. Pass per-call varsto personalize the conversation; the agent speaks the caller's dialect and calls your tools mid-call. For many recipients, use a campaign instead.
curl -X POST https://voice.whizztech.ai/v1/calls \
-H "Authorization: Bearer $WHIZZ_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: crm-T-88213-attempt-1" \
-d '{
"agent_id": "ag_7Q2c51b84a07",
"phone_number_id": "pn_5b8f0d21",
"to": "+9665XXXXXXXX",
"vars": { "name": "سلطان", "order": "49207" }
}'{
"id": "call_1d84c0e795b2",
"object": "call",
"agent_id": "ag_7Q2c51b84a07",
"direction": "outbound",
"transport": "phone_out",
"status": "queued",
"from_number": "+966920000123",
"to_number": "+9665XXXXXXXX",
"phone_number_id": "pn_5b8f0d21",
"vars": { "name": "سلطان", "order": "49207" },
"created_at": "2026-07-13T09:33:02.000Z"
}Read the result#
When the call ends you get the recording, the diarized transcript, the tools it called, and the outcome — pushed to your webhook as call.completed, or fetched with GET /v1/calls/{id}.
{
"id": "call_1d84c0e795b2",
"object": "call",
"status": "completed",
"direction": "outbound",
"duration_sec": 52.4,
"billed_sec": 53,
"credits_charged": 44,
"language": "ar",
"dialect": "saudi",
"ended_reason": "hangup_customer",
"analysis": { "outcome": "resolved", "sentiment": "positive", "summary": "…" },
"recording_path": "gs://whizz-voice-recordings/…/audio.mp3",
"transcript_path": "gs://whizz-voice-recordings/…/transcript.json",
"trace": [
{ "t": 0.4, "type": "tts", "text": "حياك الله…" },
{ "t": 5.1, "type": "asr", "text": "…" },
{ "t": 11.8, "type": "tool", "name": "lookup_order", "args": { "id": "49207" }, "result": { "status": "in_transit" } }
]
}