🚀Quickstart
In this quickstart, you'll create an AI-powered phone line that can make and receive calls. By the end, you'll have a working phone number connected to your AI agent.
What you'll learn:
- Create your KrosAI account and API key
- Purchase a phone number
- Connect an AI endpoint (ElevenLabs, Vapi, or custom)
- Make your first inbound and outbound calls
Prerequisites
Before you begin, you'll need:
- A KrosAI account (sign up free)
- An AI voice provider account (ElevenLabs, Vapi, or Retell)
- A phone to test calls
1
Create your account

- Go to cockpit.krosai.com
- Sign up with email or Google
- Complete KYC verification (required for phone numbers) - takes ~2 minutes
KYC verification is required by telecom regulations before purchasing phone numbers. We use Sumsub for secure identity verification.
2
Create an API key

Using the Dashboard
- Navigate to Developers → API Keys
- Click Create API Key
- Name it (e.g., "My First Key")
- Select scopes:
numbers:read- View phone numbersnumbers:write- Purchase/configure numberscalls:read- View call logscalls:write- Make outbound calls- Click Create
- Copy and save your key - it's only shown once!
Your API key will look like: kros_live_abc123...
3
Purchase a phone number
TypeScript
const response = await fetch('https://api.krosai.com/v1/phone-numbers', {
method: 'POST',
headers: {
'x-api-key': 'kros_live_your_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
inventory_id: 'inv_ng_12345', // From GET /phone-numbers/available
}),
});
const { number, id } = await response.json();
console.log('Purchased:', number); // +2348012345678
Python
import requests
response = requests.post(
'https://api.krosai.com/v1/phone-numbers',
headers={
'x-api-key': 'kros_live_your_key_here',
'Content-Type': 'application/json',
},
json={
'inventory_id': 'inv_ng_12345',
}
)
data = response.json()
print(f"Purchased: {data['number']}")
CURL
curl -X POST "https://api.krosai.com/v1/phone-numbers" \
-H "x-api-key: kros_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"inventory_id": "inv_ng_12345"}'

- Navigate to Phone Numbers → Buy Number
- Select your country (e.g., Nigeria, Kenya, UAE)
- Choose a number from the available inventory
- Click Purchase
4
Connect AI Agent Providers

5
Create an Endpoint
TypeScript
// Create a Vapi endpoint:
const response = await fetch('https://api.krosai.com/v1/endpoints', {
method: 'POST',
headers: {
'x-api-key': 'kros_live_your_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'My Support Agent',
type: 'agent',
url: 'sip:assistant@sip.vapi.ai', // Or your provider's SIP URI
provider_config: {
provider: 'vapi',
assistant_id: 'asst_abc123',
},
}),
});
const { id: endpointId } = await response.json();
TypeScript
// Create an ElevenLabs endpoint:
const response = await fetch('https://api.krosai.com/v1/endpoints', {
method: 'POST',
headers: {
'x-api-key': 'kros_live_your_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'ElevenLabs Agent',
type: 'agent',
url: 'sip:agent@sip.rtc.elevenlabs.io',
provider_config: {
provider: 'elevenlabs',
agent_id: 'your-agent-id',
},
}),
});

- Navigate to Endpoints → Create Endpoint
- Select your provider:
- ElevenLabs - Enter Agent ID
- Vapi - Enter Assistant ID
- Retell - Enter Agent ID
- Webhook - Enter your server URL
- Click Create
6
Attach endpoint to phone number
TypeScript
await fetch(`https://api.krosai.com/v1/phone-numbers/${phoneNumberId}`, {
method: 'PATCH',
headers: {
'x-api-key': 'kros_live_your_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
endpoint_id: endpointId,
allow_inbound: true,
allow_outbound: true,
}),
});

7
Make your first call
Test inbound call
Call your new phone number from any phone. Your AI agent will answer:
Call: +234 801 234 5678 → Your AI agent answers and starts the conversation
Make an outbound call
TypeScript
const response = await fetch('https://api.krosai.com/v1/outbound-calls', {
method: 'POST',
headers: {
'x-api-key': 'kros_live_your_key_here',
'Content-Type': 'application/json',
},
body: JSON.stringify({
from_number: '+2348012345678', // Your KrosAI number
to_number: '+14155551234', // Destination phone
endpoint_id: endpointId, // Your AI agent
}),
});
const { call_id, status } = await response.json();
console.log('Call initiated:', call_id);
Python
response = requests.post(
'https://api.krosai.com/v1/outbound-calls',
headers={
'x-api-key': 'kros_live_your_key_here',
'Content-Type': 'application/json',
},
json={
'from_number': '+2348012345678',
'to_number': '+14155551234',
'endpoint_id': endpoint_id,
}
)
data = response.json()
print(f"Call initiated: {data['call_id']}")
Using the Playground
The KrosAI Dashboard includes a Playground for testing calls without code:
- Go to Playground in the dashboard
- Select your phone number
- Enter a destination number
- Click Call
- Watch real-time call events and transcription
Congratulations!
You've successfully:
- Created a KrosAI account
- Purchased a phone number
- Connected an AI agent
- Made your first call
Next steps
Deep dive into integrations
Was this section helpful?
On this page
- 🚀Quickstart