> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nixflex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Make your first AI phone call in under five minutes

This guide takes you from zero to a working AI agent answering and making real phone calls.

You'll need:

* A [Nixflex account](https://dashboard.nixflex.com/login)
* A [Twilio account](https://www.twilio.com/) with at least one phone number
* A way to make a test call (any mobile phone)

## Step 1 - Get your API key

<Steps>
  <Step title="Sign in to the dashboard">
    Open [dashboard.nixflex.com](https://dashboard.nixflex.com) and sign in. An API key is created for your account automatically.
  </Step>

  <Step title="Reveal your key">
    Go to **API Keys**, click **Reveal**, and copy the full credential. It looks like:

    ```
    nxf_a1b2c3...:nxfs_x1y2z3...
    ```
  </Step>

  <Step title="Use it in requests">
    Authenticate every API call with:

    ```
    Authorization: Bearer nxf_xxx:nxfs_xxx
    ```
  </Step>
</Steps>

<Warning>
  Treat your full credential like a password. Never commit it to source control or expose it in client-side code. If it leaks, rotate immediately from the dashboard.
</Warning>

## Step 2 - Create an agent

An **agent** is the AI personality that answers calls. Each agent has a prompt, voice, language, and behaviour settings.

```bash theme={null}
curl -X POST https://api.nixflex.com/v1/agents \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Test Receptionist",
    "system_prompt": "You are a friendly receptionist for Acme Dental. Greet callers, answer questions about opening hours (Mon-Fri 9am-5pm), and book appointments by collecting name and preferred date.",
    "welcome_message": "Hello, Acme Dental, how can I help?"
  }'
```

The response contains your `agent_id`:

```json theme={null}
{
  "agent_id": "agent_125207e452f8714a",
  "name": "Test Receptionist",
  "voice_id": "Ashley",
  "language": "multi",
  "is_active": true
}
```

Save the `agent_id` - you'll attach a phone number to it next.

<Tip>
  The default voice is **Ashley** and the default language is **multi** (auto-detects 15+ languages including Arabic, French, Spanish, German). Change them later via the dashboard or the [Create agent](/api-reference/agents/create) reference.
</Tip>

## Step 3 - Connect a Twilio number

Nixflex uses a **BYO Twilio** model. You import a number you already own in Twilio, and Nixflex configures the webhooks automatically.

```bash theme={null}
curl -X POST https://api.nixflex.com/v1/phone-numbers \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+447446466847",
    "twilio_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "twilio_token": "your_twilio_auth_token",
    "agent_id": "agent_125207e452f8714a"
  }'
```

Nixflex points all webhooks on this Twilio number at the engine. The agent now answers when this number rings, and can use it to make outbound calls.

## Step 4 - Test inbound

Call your Twilio number from any phone. The agent will:

1. Pick up
2. Say your welcome message
3. Listen, respond, handle interruptions naturally
4. Hang up when the conversation ends or when the caller stops talking

## Step 5 - Test outbound

Have the agent call **you**. Replace the `to_number` with your mobile.

```bash theme={null}
curl -X POST https://api.nixflex.com/v1/calls/outbound \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agent_125207e452f8714a",
    "to_number": "+44YOUR_MOBILE"
  }'
```

Your phone rings within seconds. Pick up and talk to your agent.

<Note>
  You don't pass a `from_number`. The engine uses the Twilio number you assigned to the agent in Step 3.
</Note>

## Step 6 - Read the call back

After the call ends, pull the details:

```bash theme={null}
curl https://api.nixflex.com/v1/calls?limit=1 \
  -H "Authorization: Bearer YOUR_KEY"
```

The response includes the transcript, recording URL, post-call summary, caller sentiment, and any custom data the agent extracted.

## What's next

<CardGroup cols={2}>
  <Card title="Outbound calls" icon="phone-arrow-up-right" href="/concepts/outbound-calls">
    Trigger AI calls programmatically with one API request.
  </Card>

  <Card title="Agent actions" icon="tag" href="/actions/overview">
    Let your agent transfer calls, send SMS, and end calls using prompt tags.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/advanced/webhooks">
    Receive post-call data in your own systems automatically.
  </Card>

  <Card title="Custom functions" icon="wrench" href="/advanced/custom-functions">
    Let the agent call your APIs mid-call (lookup, booking, payments).
  </Card>
</CardGroup>
