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

# Quickstart

> Get an API key, then place a phone call or talk to an agent in the browser.

This guide takes about five minutes. You need an Eclatira account and one agent. You can create an agent in the dashboard.

## 1. Get an API key

<Steps>
  <Step title="Open the API keys page">
    Log in to the [dashboard](https://app.eclatira.com) and go to **Settings → API Keys**.
  </Step>

  <Step title="Create a key">
    Click **Create Key**. The key starts with `ek_`.
  </Step>

  <Step title="Save it">
    The key is shown only once. Store it in a secret manager or an environment variable. If you lose it, revoke it and create a new one.
  </Step>
</Steps>

<Warning>
  Keep the key on your server. A key has full access to your workspace. Never put it in browser code. See [Authentication](/authentication).
</Warning>

## 2. Make your first request

Send the key as a bearer token. This request lists your batches:

```bash theme={"system"}
curl https://app.eclatira.com/api/v1/batches \
  -H "Authorization: Bearer ek_your_api_key_here"
```

If the key is wrong or missing, you get a `401`:

```json theme={"system"}
{
  "error": {
    "type": "authentication_error",
    "code": "unauthorized",
    "message": "Missing or invalid API key. Use 'Authorization: Bearer ek_...'",
    "param": null,
    "request_id": "..."
  }
}
```

Every API error uses this same shape.

## 3. Talk to your agent

<Tabs>
  <Tab title="Place a phone call" icon="phone">
    You need the `agent_id` of an agent in your workspace. Replace the phone number with your own.

    ```bash theme={"system"}
    curl -X POST https://app.eclatira.com/api/v1/calls \
      -H "Authorization: Bearer ek_your_api_key_here" \
      -H "Content-Type: application/json" \
      -d '{
        "agent_id": "your-agent-id",
        "to_number": "+15551234567",
        "provider": "twilio"
      }'
    ```

    The call starts right away. The response tells you it was accepted:

    ```json theme={"system"}
    {
      "call_id": "CAc29a9cb3a1dc3e077f4a9a25f5161e4d",
      "call_sid": "CAc29a9cb3a1dc3e077f4a9a25f5161e4d",
      "agent_id": "your-agent-id",
      "to_number": "+15551234567",
      "status": "initiated",
      "provider": "twilio",
      "warnings": []
    }
    ```

    Your phone should ring. To check the result later, call `GET /api/v1/calls/{call_id}`. You can also get the result pushed to you with a [webhook](/webhooks).
  </Tab>

  <Tab title="Talk in the browser" icon="microphone">
    The fastest way is the embed widget. It needs no API key and no backend. Paste this into any HTTPS page:

    ```html theme={"system"}
    <script>
      window.eclatiraSettings = {
        widget_id: "YOUR_AGENT_ID",
      };
    </script>
    <script src="https://app.eclatira.com/widget.js" defer></script>
    ```

    A button appears in the corner of the page. Click it and start talking.

    To build your own UI instead, follow [Voice in the browser](/realtime/browser-voice). It takes three parts:

    1. A small endpoint on your server that creates a session with your API key.
    2. The `@eclatira/realtime` library on your page.
    3. A button that calls `session.start()`.
  </Tab>
</Tabs>

## Next steps

<CardGroup cols={2}>
  <Card title="Phone calls" icon="phone" href="/phone-calls">
    Personalize calls with variables and call a list of numbers.
  </Card>

  <Card title="Web sessions" icon="globe" href="/realtime/overview">
    Learn how browser sessions work before you build one.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/webhooks">
    Get the transcript and summary when a call ends.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/agents/create-an-agent">
    Browse every endpoint.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.