Voice API for AI phone agents
A voice API lets your application place and answer phone calls with an AI agent. On Hail, you save an agent once with its instructions, greeting, and voice, then point a number at it. Then read each call's final status and transcript before your application takes the next step.
Example: a callback that a customer requested
A customer asks for a callback. Your application passes the number and instructions to Hail. The voice agent makes the call, and your application can inspect the outcome and transcript before taking the next step.
Use it for requested callbacks, appointment confirmations, or a conversation your agent cannot finish over text. Keep the task specific: who is calling, what needs to be answered, and when the agent should stop.
What the voice API does
- Outbound calls: start a call with a destination and instructions, or with a saved agent (
agent_id). - Inbound calls: save an agent and point your number at it. The agent picks up, speaks the AI line, and follows your instructions. Works on Twilio, Telnyx, and DIDWW numbers.
- Inbound texts: the same agent answers texts to that number. Hail handles STOP and HELP itself.
- Your model and voice: use the configured voice stack or connect your own OpenAI-compatible model endpoint.
- Call results: inspect progress, the final status, and transcripts through the API and subscribed events.
A queued call is still in progress. Handle busy numbers, unanswered calls, and failures explicitly instead of treating every accepted request as a successful conversation.
Answer calls on your number
- Open Agents in the console and create one. Write the instructions and the greeting.
- On Numbers, choose that agent under Calls answered by. Hail registers the number at the carrier for you.
- Call the number from your phone. The call and its transcript appear in Activity, and your webhook gets
call.received.
Each answered minute costs the same as an outbound minute. Calls to a number with no agent are not answered.
See what a phone number costs in each country: Number prices by country.
Place your first test call
- Create a Hail account and configure your calling number. Calls use your prepaid balance. Top it up on the Usage & billing page in the console.
- Choose the API for your backend, MCP for your agent, or the CLI for a script.
- Call your own phone with a narrow task. Review the transcript and outcome before expanding the workflow.
The first-call tutorial shows the request and the result. Check Hail's current rates for call costs.
Follow up on another channel
When a call needs a written follow-up, use the SMS API or email API from the same Hail account. Your application decides what to send and when, based on the outcome of the call.
Make your first call.
Connect your assistant and start calling.