AI Voice Agent for Your Website: Talk to Visitors and Call Every Lead Instantly
An AI voice agent for your website lets visitors click "Talk to us" and speak with your agent in the browser, while the instant call API phones every new lead within seconds of a form fill. On TaskVox both use the same agent: every conversation is saved with a transcript, a Hot / Warm / Cold label and the answers it collected, and sent to your CRM by webhook. Setup takes one script tag and one API request.
Most enquiries arrive as a typed form or a missed call, and by the time someone calls back, the buyer has already spoken to a competitor. This guide shows how an AI voice agent for your website and an instant lead call fix both: what they do, which business problems they solve, how to set them up step by step, and what they cannot do.
The business problem: leads go cold before anyone talks to them
- Slow call-backs. A lead fills a form at 11:40 am; your team calls at 4 pm, after lunch and meetings. By then the interest has faded.
- Websites can only take typed enquiries. Many Indian buyers prefer to speak, in Hindi or their own language, rather than type a long message.
- No record of what was said. Answers from calls sit in someone's notebook, not in the CRM.
- Failed calls with no reason. "Call failed" tells your team nothing. Was the number wrong, busy, or just not picked up?
Two ways to put a voice agent to work
| Website voice agent | Instant lead call (API) | |
|---|---|---|
| What happens | A visitor clicks "Talk to us" on your site and speaks with the agent in the browser | Your website, CRM or automation tool sends one request; the agent phones the lead |
| Best for | Visitors who are on your site right now | Form fills, ad leads, portal leads, missed calls |
| When it works | Any time the visitor opens your site | 8 am – 8 pm IST (Indian calling rules) |
| What you get back | Transcript, summary, Hot / Warm / Cold label and the answers collected — on the Calls and Leads pages and by webhook | |
| Cost | ₹2–₹4 per minute depending on your recharge, from the same credit balance | |
Use cases: which business problems it solves
| Business | Instant lead call | Website voice agent |
|---|---|---|
| Real estate | Call every portal or ad lead within a minute; ask budget, BHK and a site-visit day | "Talk to our property advisor" on each project page |
| Coaching and education | Call enquiry-form students and note a counselling slot | Answer fee and batch questions on the admissions page |
| Clinics and hospitals | Call back appointment requests; note symptoms and a preferred time | Help patients find the right department |
| Recruitment and staffing | Screen applicants right after they apply | — |
| D2C and e-commerce | Confirm cash-on-delivery orders and address fixes | Order and returns questions |
| Insurance and loans | Call quote requests and check basic eligibility | Explain plans and collect a call-back time |
The agent captures a preferred day and time; it does not book into your calendar. Your team or CRM takes it from there.
How a website voice chat works
- A visitor clicks Talk to us and allows the microphone.
- Your website asks your own server for a short-lived token. Your server gets it from TaskVox with your API key, which never reaches the page.
- The visitor and your agent talk, with the conversation shown on screen as it happens.
- When the chat ends, TaskVox saves it, scores the lead and sends it to your webhook.
Green Valley Homes
2 and 3 BHK homes, possession in 2027. Questions? Speak with our advisor.
The voice widget on a website. Made-up business and conversation. The button and panel sit in a corner of any page.
Set up the AI voice agent on your website, step by step
You need a TaskVox account, an agent you have tested from Agents → Test, and someone who can add a small file to your website's server (about 10 lines of code).
- Create an API key. Dashboard → API Keys → create a key with write access. Keep it on your server only.
- Add a token endpoint on your server. It asks TaskVox for a token and returns it to the page:
// Node.js / Express — your API key stays on the server app.post('/api/taskvox-token', async (req, res) => { const r = await fetch('https://taskvox.in/api/calls/web/token', { method: 'POST', headers: { 'X-API-Key': process.env.TASKVOX_API_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify({ agentId: 'your-agent-id' }), }); res.status(r.status).json(await r.json()); // { token, ws_url, expires_in } }); - Paste one line on your website (the page must be on https for the microphone):
Optional:<script src="https://taskvox.in/public/widget/voice.js" data-token-url="/api/taskvox-token" data-label="Talk to us" async></script>data-position="left",data-color="#5B4EFF", or open it from your own button withwindow.TaskVoxVoice.start(). - Allow only your websites. On the API Keys page, under Website voice widget, list your site addresses. A token copied to any other site will not work.
- Test it. Talk for 20 seconds, end the chat, and check that it appears on the Calls and Leads pages.
Website voice widget
https://greenvalleyhomes.example
Allowed websites. Leave the list empty only while testing.
Call every new lead instantly with one API request
Send the lead's number and your agent ID the moment a form is submitted. Details such as the name fill the {{name}} placeholders in your agent's script.
curl -X POST https://taskvox.in/api/calls/dial \
-H "X-API-Key: tvx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: lead-48213" \
-d '{ "agentId": "your-agent-id", "to": "98XXXXXXXX",
"variables": { "name": "Rahul", "project": "Green Valley Homes" } }'
The reply has a request_id and a status link. The Idempotency-Key (your own lead ID) makes sure a retried request never calls the same person twice. Numbers written as +91 98…, 91 98… or 098… are cleaned automatically.
Results arrive by webhook (call.completed or call.failed). Without a webhook, check GET /api/calls/dial/{request_id}: the status goes from queued to in_progress and completed, or retrying while another attempt is scheduled. The full developer guide, with signature checks, is here.
Know exactly why a call did not connect
When a call does not connect, TaskVox shows the reason in plain words on the call page, in the API and in the call.failed webhook, so your team knows whether to retry, fix the number or move on.
| Reason shown | What to do |
|---|---|
| Not picked up within 29 s | Nothing; TaskVox retries automatically |
| Busy | Same as above |
| Phone switched off or out of coverage | Try later in the day, or send a WhatsApp message |
| Number does not exist / Invalid number format | Fix the number in your CRM |
| Network busy | Usually temporary; TaskVox retries automatically |
| To | 98XXXXXX21 |
| Status | failed |
| Started | 18/10/2026, 11:42:08 am |
| Why it failed | Not picked up within 29 s |
A failed call explains itself. Sample data.
What you get after every conversation
Phone calls and website chats end the same way: a transcript, a short summary, a Hot / Warm / Cold / Not a lead label and every answer your agent was set up to collect. They appear on the Leads page, and the same data goes to your webhook so your CRM updates by itself.
Wants a 2 BHK around ₹60 lakh; site visit on Sunday morning.
Lead data collected by voice. Made-up lead.
Pricing
- ₹2–₹4 per minute depending on your recharge (from ₹500), plus 1800% GST. See pricing.
- Phone calls: only answered calls are charged, billed per started minute, telecom included.
- Website chats: the same per-minute credits, billed per started minute.
- No monthly fee, no charge for the API or the widget itself. New accounts get 100 free credits.
What it cannot do
- It does not call outside 8 am – 8 pm IST. A request at night is refused with a message; queue it and send it after 8 am.
- The website chat needs a microphone, the visitor's permission and an https page.
- One account can run 2 website chats at the same time. Contact us if you need more.
- It does not book into your calendar or look up your software during the chat; it captures the answers and preferred times for your team.
- Some telecom routes connect poorly at times. You will always see why a call did not connect.
- Only call people who enquired or are your customers, and respect DND. The agent never asks for OTPs or card numbers.
AI voice agent for website — frequently asked questions
Can I add an AI voice agent to my website?
Yes. Add one script tag to your page and a small token endpoint on your server. Visitors click "Talk to us", allow the microphone and speak with your TaskVox agent. Each chat is saved with its transcript and lead score, like a phone call.
Is my API key safe if I put a voice widget on my website?
Yes, because the API key never goes into the page. Your server uses it to get a token that lasts 5 minutes and works for one agent only. You can also list the websites allowed to use the widget, so a copied token does not work anywhere else.
How fast can an AI agent call a new lead?
With one API request (POST /api/calls/dial) the call starts within seconds, between 8 am and 8 pm IST. A request outside those hours is refused with a clear message so your system can send it again after 8 am.
What happens if the lead does not pick up?
TaskVox retries automatically and tells you why each attempt failed in plain words, for example "Not picked up within 29 s" or "Busy", on the call page, in the API and in the call.failed webhook.
How much does the website voice agent cost?
The same per-minute credits as a call: ₹2–₹4 per minute depending on your recharge, billed per started minute, plus GST. Telecom is included for calls. There is no monthly fee and new accounts get 100 free credits.
Which languages does the voice agent speak?
The language you set on the agent. Hindi and English are the most used, and TaskVox agents also speak 9 other Indian languages.
Put your agent on your website today
100 free credits to test · ₹2–₹4/min · no monthly fee