Background noise
bg_noiseBuilt for developers
Turn a request into a conversation that gets things done.
Give your agent the context. Let it talk, call your tools, and send the outcome back to your application.
curl --fail-with-body -X POST "https://api.vaanivoice.ai/api/trigger-call/" \ -H "X-API-Key: $VAANI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent_id": "YOUR_AGENT_ID", "name": "Jane Doe", "contact_number": "+12025550123", "metadata": { "department": "cardiology" } }'output.call_idSample requestHi Jane. Shall I book your cardiology appointment for Thursday at 10:30?
Yes, that works. Please book it.
book_appointmentReady when neededcall_postprocessingThe outcome arrives after the call ends. Payload excerpt
The first request
Start with an agent, an API key, and a number.
Your application takes it from there.
In your dashboard, open Developers → API Keys.
Have your agent ID and telephony setup ready.
Use your own phone number, including + and the country code.
Set VAANI_API_KEY in your server environment. Replace the agent and phone placeholders. Keep your key out of browser code.
curl --fail-with-body -X POST "https://api.vaanivoice.ai/api/trigger-call/" \ -H "X-API-Key: $VAANI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "agent_id": "YOUR_AGENT_ID", "name": "Jane Doe", "contact_number": "+12025550123", "metadata": { "department": "cardiology" } }'A successful response means the call was dispatched—not answered or completed. Keep output.call_id to retrieve results, or receive them through webhooks after processing.
Follow one conversation
From your first request to the result in your app.Explore an illustrative appointment-booking flow.
API response01 / 05
The request is accepted and a call ID comes back. The phone has not necessarily been answered yet.
Jane Doe · Cardiology
An agent configured to book appointments.
{
"success": true,
"output": {
"agent_name": "clinic_agent",
"call_id": "outbound-SAMPLE_CALL_ID"
}
}Response excerpt · keep this ID to retrieve the transcript and analysis.
Vaani sends call events to your webhook endpoint. call_ended tells you the conversation has ended; call_postprocessing tells you the transcript, summary, and extracted details are ready.
Agent experience
Set this in the console, or patch /api/agent/{id}/experience. Only the fields you send are merged. The next call picks them up—nothing to retrain.
bg_noisefiller_wordseagerness_to_speakidle_conversation_settings“Are you still there?”
max_call_durationactionDetection enabled. Choose what happens when voicemail answers.
idle_call_warning_messageThe agent checks in with this message after 23 seconds of silence.
end_call_phraseSet the phrase your agent uses to close the conversation.
Build around what you own
Your carrier remains the boundary for telephony ownership.
Stopping playback when the caller interrupts—not the full response turn.
Caller finishes to agent audio. p90: 900–1200ms. Model and network affect timing.
Availability depends on your telephony setup and carrier coverage.
Go a level deeper
Dispatch calls, shape your agents, and read results.
Start an outbound call with a contact number. Telephony is the default; this example sends agent_id, name, contact_number, and optional metadata. Dispatch acceptance does not mean the call has finished. Replace the example number with your destination.
curl --fail-with-body -X POST "https://api.vaanivoice.ai/api/trigger-call/" \
-H "X-API-Key: $VAANI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "YOUR_AGENT_ID",
"name": "Jane Doe",
"contact_number": "+12025550123",
"metadata": { "department": "cardiology" }
}'Authenticate server-side with X-API-Key. Agent PATCH requests merge supplied fields. For endpoint coverage beyond these examples, use the API reference.
Keep building
The next step should be a useful one.
Start in the console, inspect the events, or open a guide.
Configure an agent in the console, then test it before wiring it into your application.
Open the consoleWalk through call events and the post-call result without dispatching a real call.
Explore the event flowDescribe the agent you need, then refine its behavior and connect your tools.
Meet Teacher AIFollow the integration guides for telephony, browser voice, campaigns, and webhooks.
Open the guidesThe implementation details
Interruption stop time is typically 100–200ms: how quickly agent playback stops when the caller speaks. Full-turn response latency measures the caller finishing to the first agent audio: p50 is 600ms and p90 is 900–1200ms. Model choice, network, and telephony affect these timings.
Yes. Configure a custom REST tool with its input schema. The agent can collect the required details, invoke your endpoint, and use the returned result in the conversation. The appointment flow above illustrates this pattern.
Post-call results finish asynchronously. The transcript endpoint can return 404 while processing, and call details may show waiting messages until analysis is ready. Completed call details include summary, entity, and call_eval_tag. You can also receive completed analysis through call_postprocessing.
Configure your webhook endpoint to receive call events. call_ended tells you the conversation has ended; call_postprocessing delivers the completed transcript, summary, and extracted details. Verify deliveries on your server using the signature contract documented for your integration before processing them.
Yes. Set medium to webrtc when calling trigger-call to start an in-app voice session. Make the API request from your backend and follow the WebRTC API reference for connection details. Keep your API key out of browser code.
success: true means the request was accepted for dispatch, not that the person answered or the call completed. Save output.call_id to correlate the transcript, recording, call details, and webhook events.
Your next conversation starts here
Get an API key, configure your agent, and make your first request.