# Quickstart

#### Overview

In this quickstart, you'll:

* Buy a phone number.
* Connect AI agent service provider&#x20;
* Create agent endpoint.
* Bind phone number to the AI agent.
* Make your first call.

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* A KrosAI account and API key.

#### 1) Buy a Phone Number

{% tabs %}
{% tab title="Dashboard" %}

<figure><img src="/files/84RPO7WjFeIBQtQoeQoy" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="HTTP" %}

```http
POST /v1/phone-numbers HTTP/1.1
Host: api.krosai.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "inventory_id": "770e8400-e29b-41d4-a716-446655440002"
}
```

{% endtab %}
{% endtabs %}

#### 2) Connect AI agent service provider&#x20;

{% tabs %}
{% tab title="Dashboard" %}

<figure><img src="/files/s5LQu5Ofn3DMhYepbYnX" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

#### 3) Create Agent Endpoint

{% tabs %}
{% tab title="Dashboard" %}

<figure><img src="/files/FcdP35BtVjwfyMkl4yNm" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="HTTP" %}

```http
POST /v1/endpoints HTTP/1.1
Host: api.krosai.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 107

{
  "name": "Sales Agent",
  "type": "vapi",
  "provider_config": {
    "api_key": "vapi_xxxx",
    "assistant_id": "asst_abc123"
  }
}
```

{% endtab %}
{% endtabs %}

#### 4) Bind phone number to the AI agent

{% tabs %}
{% tab title="Dashboard" %}

<figure><img src="/files/UNPvB5w16sqgxuEUOvoV" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="HTTP" %}

```http
POST /v1/endpoints HTTP/1.1
Host: api.krosai.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 107

{
  "name": "Sales Agent",
  "type": "vapi",
  "provider_config": {
    "api_key": "vapi_xxxx",
    "assistant_id": "asst_abc123"
  },
  "phone_number_id": "edeuxxxxxx
}
```

{% endtab %}
{% endtabs %}

#### 4) Make your first calls

🎉  Congratulations! You’ve successfully connected your local phone number to your AI agent. Call the number to start a conversation with your agent.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.krosai.com/getting-started-old/quickstart-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
