# Quickstart: your first AI call from code in 5 minutes

Source: https://aicallstudio.com/docs/developers/quickstart

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.

## Steps

1. **Make an API key**: In your dashboard, open [Developers](/dashboard/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.
2. **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. (endpoint: `GET /api/v1/agents`)
3. **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. (endpoint: `POST /api/calls/dial`)
4. **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. (endpoint: `GET /api/v1/calls`)
5. **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](/developers/webhooks) has every event and the signature check. (event: `call.completed`)

## 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](/developers/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

### How do I make my first API call to place an AI phone call?

Make a live key with the calls:write scope, then POST /api/calls/dial with a 10-digit Indian mobile and your agent's id, in the Authorization header as Bearer and your key. The answer means ringing has started; the outcome follows in the call log and the call.completed webhook.

### Can my agent use the person's name or amount on the call?

Yes. Send name and variables with the call, such as {"amount": "12,500", "due_date": "5 December"}: they fill {amount} and {due_date} in your agent's script, and are saved on the contact for the next call too.

Every endpoint, field and error: https://aicallstudio.com/docs/api