Quickstart: your first AI call from code in 5 minutes
Make an API key, find your agent, place one AI call to your own number and read its outcome, in curl, Node.js, Python or PHP.
Before you start
- An agent that is live: built and switched on in your dashboard, with a phone line to call from.
- API access is on Growth and above. Without it every request answers 402, and the key works again once the plan includes it.
- Your own mobile number, 10 digits without +91. You will ring it.
Sandbox or live token?
- A sandbox token starts with
mtc_sandbox_. It never writes and never reads your real data, and there is no sample data behind it yet: it only proves the token and its scopes are right. A request it may make answers403saying so. - A live token starts with
mtc_. The call in step 3 is a real call, billed like any other: ring your own mobile.
Make an API key
In your dashboard, open Developers, API keys, and make a live key with three scopes: agents:read, calls:write and calls:read. It is shown once: store it like a password, in an environment variable, never in your code.
Find the agent that will speak
List your agents and copy the id of the one that should make the call. Each one says whether it takes real calls now.
GET
/api/v1/agentsList agents in the API referenceGET /api/v1/agents with curl curl "https://aicallstudio.com/api/v1/agents" \ -H "Authorization: Bearer mtc_YOUR_TOKEN"Place the call
Send your own number and the agent's id. The answer means ringing has started, not that anyone picked up: keep its room, it names this call attempt. Send an Idempotency-Key so a retried request never rings twice.
This is a real call, billed like any other.
POST
/api/calls/dialPlace a call in the API referencePOST /api/calls/dial with curl curl -X POST "https://aicallstudio.com/api/calls/dial" \ -H "Authorization: Bearer mtc_YOUR_TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"phone":"9876543210","agent_id":"YOUR_AGENT_ID","name":"Asha Verma","variables":{"amount":"12,500","due_date":"5 December"}}'Read the outcome
Answer the call and talk to your agent. When it ends, list your calls with the room from step 3: the call carries its status, outcome, score and summary. Fetch it by id for the transcript, the details it captured and the recording.
GET
/api/v1/callsList calls in the API referenceGET /api/v1/calls with curl curl "https://aicallstudio.com/api/v1/calls?limit=50" \ -H "Authorization: Bearer mtc_YOUR_TOKEN"Get told instead of asking
Rather than asking for the result, add a webhook on the Developers page and pick call.completed: your server is sent the outcome the moment a call ends. Webhooks has every event and the signature check.
call.completed, a sample delivery { "event": "call.completed", "ts": 1772634500, "id": "1b2c3d4e5f6a47b8c9d0e1f2a3b4c5d6", "data": { "call": { "id": "00000000-0000-0000-0000-000000000001", "contact_id": "00000000-0000-0000-0000-000000000002", "campaign_id": null, "agent_id": "00000000-0000-0000-0000-000000000003", "direction": "outbound", "status": "completed", "duration_seconds": 94, "disposition": "interested", "disposition_label": "Interested", "classification": "hot", "score": 82, "summary": "Asked for a site visit on Saturday.", "transcript": "Agent: Hello, am I speaking with Asha?\nLead: Yes.", "transcript_turns": [ { "speaker": "agent", "text": "Hello, am I speaking with Asha?" }, { "speaker": "lead", "text": "Yes." } ], "placed_by": { "kind": "ai_agent", "id": "00000000-0000-0000-0000-000000000003", "name": "Priya" }, "cost_inr": 4.5, "disposition_by": "ai" } } }
Why did my call answer 403 or 409?
403 means the key lacks a scope, it is a sandbox key, or the number cannot be called: it is on Do-Not-Call or Do-Not-Disturb, has no consent, or it is outside your calling window. 409 means the call cannot start now: a calls-at-once limit, the agent's calling hours, a draft or paused agent, or no phone line to call from. Each answer's detail says which. Errors and limits lists every code.
Costs and what to watch
- Every call the API places is a real call to a real person, billed from your wallet like any other call, at your plan's rates. Try it on your own number first.
- Outbound calls are placed only inside the calling hours, 9 am to 9 pm IST at the widest. A request outside them is refused, not queued.
- A number that is not a contact yet is saved as one, under the name you send.
Questions, answered.
How do I make my first API call to place an AI phone call?
Can my agent use the person's name or amount on the call?
Read next
Webhooks: every event, with a sample
Every event AI Call Studio can send your server, with a sample of each, the headers, how to check the signature, and what happens when a delivery fails.
Read more →Errors, rate limits and retries
What an API error looks like, every status and error code, how many requests each plan may make a minute, and how to retry without doing anything twice.
Read more →Use cases
Recipes with every step and the code to copy: form to call, EMI reminders, CRM leads, WhatsApp follow-ups.
Read more →