Skip to navigation

Quickstart

This guide walks you through creating your first voice agent and making a call — all from the command line.

Prerequisites

  • A Levrage.AI account (sign up)
  • Your API key (Dashboard → Settings → Developers → API Keys)
  • A source phone number (available in Dashboard → Numbers)

Step 1: Verify Your API Key

Test that your API key works:

curl -H "Authorization: Bearer $API_KEY" \
https://api.levrage.ai/v1/health

Expected response:

{
"status": "ok"
}

Step 2: Browse Available Industries

Discover what agent types are available:

# List all industries
curl https://api.levrage.ai/v1/industries
# Get agent types for a specific industry
curl https://api.levrage.ai/v1/industries/Real%20Estate/agent-types

Step 3: Create a Voice Agent

curl -X POST https://api.levrage.ai/v1/agents \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Demo Sales Agent",
"agent_type": "sales",
"language": "English",
"voice": "female",
"ai_model": "lai-premium-2",
"start_flow": "Hello! This is Sarah from Demo Corp. How are you today?",
"end_flow": "Thank you so much for your time. Goodbye!",
"description": "Sales agent for demo purposes"
}'

Save the id from the response — you’ll need it for the next step.

The agent is automatically created with a production-ready prompt based on the agent_type and language you chose. You can also pass a custom prompt field to override it.

Step 4: Make a Call

curl -X POST https://api.levrage.ai/v1/call \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "YOUR_AGENT_ID",
"source_number": "+919240018601",
"phone_number": "+919876543210",
"metadata": {
"customer_name": "John",
"purpose": "demo"
}
}'

The call will be initiated immediately. You can track its status via the call history endpoint.

Step 5: Check Call History

curl -H "Authorization: Bearer $API_KEY" \
"https://api.levrage.ai/v1/calls?page=1&page_size=5"

Each call record includes:

  • status — completed, no_answer, failed, voicemail
  • duration — Call length in seconds
  • transcript — Full conversation transcript
  • recording_url — Link to the call recording
  • sentiment — AI-analyzed sentiment of the call
  • details_collection — Any data the agent collected

Step 6: Run a Batch Campaign (Optional)

Scale to multiple calls with a campaign:

curl -X POST https://api.levrage.ai/v1/campaigns \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "January Outreach",
"agent_id": "YOUR_AGENT_ID",
"phone_number": "+919240018601",
"phone_column": "phone",
"contacts": [
{"phone": "+919876543210", "name": "Alice"},
{"phone": "+919876543211", "name": "Bob"},
{"phone": "+919876543212", "name": "Charlie"}
],
"max_concurrent_calls": 2
}'

What’s Next?