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

# Authentication

> Authenticate requests with your Karta API key.

## Bearer authentication

Send your API key in the `Authorization` header:

```http theme={null}
Authorization: Bearer YOUR_KARTA_API_KEY
```

## First authenticated request

Set `KARTA_API_KEY` in your server environment or secret manager, then run:

```bash theme={null}
curl --fail-with-body 'https://api.getkarta.ai/public/v1/client' \
  -H "Authorization: Bearer $KARTA_API_KEY"
```

## Keep keys on your server

Keep your API key private and store it on your backend, never in frontend code or public repositories.

## Request tracing

```http theme={null}
X-Request-ID: your-unique-request-id
```

Optional request identifier for tracing and support. See [idempotency](https://docs.getkarta.ai/idempotency.md) when retrying phone calls, web calls, and campaigns.


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