Quickstart
Make your first voice call in under 5 minutes.
Quickstart
Get up and running with TryVox in under 5 minutes. This guide walks you through making your first AI-powered voice call.
Prerequisites
- A TryVox account (sign up at tryvox.io)
- curl or any HTTP client
Step 1: Get Your API Key
- Log in to the TryVox Dashboard
- Navigate to Settings > API Keys
- Click Create API Key
- Copy your API key — it starts with
tvx_sk_live_...
Keep this key secure. You'll use it to authenticate all API requests.
Step 2: Provision a Phone Number
Before making calls, you need a phone number. Let's purchase one from our inventory:
curl -X POST https://api.tryvox.io/v1/account/{account_id}/numbers/purchase-from-inventory \
-H "Authorization: Bearer tvx_sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"country": "IN",
"type": "local"
}'Replace {account_id} with your account ID from the dashboard.
Response:
{
"data": {
"e164": "+919876543210",
"country": "IN",
"status": "active",
"type": "local",
"capabilities": ["voice", "sms"]
}
}Your number is now active and ready to use!
Step 3: Make an Outbound Call
Now let's make a call using your new number:
curl -X POST https://api.tryvox.io/v1/voice/accounts/{auth_id}/calls \
-H "Authorization: Bearer tvx_sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"from": "+919876543210",
"to": "+14155551234",
"answer_url": "https://your-app.com/answer"
}'Parameters:
from— Your TryVox phone number (from Step 2)to— The destination phone number (E.164 format)answer_url— Your webhook URL that returns VoxML instructions
Response:
{
"call_uuid": "c7a34e6f-9d1b-4c8e-a5f2-3b9d7e8c1a4f",
"status": "queued",
"from": "+919876543210",
"to": "+14155551234"
}Step 4: Control the Call with VoxML
When the call is answered, TryVox sends a request to your answer_url. Your server should return VoxML instructions to control the call.
Here's an example response that plays a greeting and streams audio to your AI agent:
{
"voxml_version": "1.0",
"instructions": [
{
"verb": "Say",
"text": "Hello! I am your AI assistant.",
"engine": "google",
"language": "en-IN"
},
{
"verb": "Stream",
"url": "wss://your-app.com/ai-agent",
"track": "inbound_track"
}
]
}What this does:
- Say — Plays a text-to-speech greeting using Google's TTS engine
- Stream — Opens a WebSocket connection to your AI agent for real-time audio streaming
TryVox will execute these instructions in order, streaming the caller's audio to your WebSocket endpoint.
Next Steps
You've made your first call! Here's what to explore next:
- Voice API Reference — Learn all voice API capabilities
- VoxML Guide — Master call control with VoxML verbs
- Webhooks — Handle call events and status updates
- Verify API — Send OTP verifications via SMS and voice
Need Help?
- Check out our example applications
- Join our Discord community
- Email us at support@tryvox.io