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

# Authentication

> API key Bearer-token authentication.

All BETA API requests require Bearer-token authentication. There is no other auth method.

## Get a key

Email **[hello@getbeta.io](mailto:hello@getbeta.io)**. Keys are issued manually during developer preview. Self-serve signup is on the [Roadmap](/roadmap).

## Sending the key

Include the key as a `Bearer` token in the `Authorization` header:

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.getbeta.io/api/v1/validate \
    -H "Authorization: Bearer $BETA_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"company": "Anthropic"}'
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch('https://api.getbeta.io/api/v1/validate', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.BETA_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ company: 'Anthropic' })
  });
  ```

  ```python Python theme={null}
  import os, requests
  res = requests.post(
      'https://api.getbeta.io/api/v1/validate',
      headers={
          'Authorization': f'Bearer {os.environ["BETA_API_KEY"]}',
          'Content-Type': 'application/json'
      },
      json={'company': 'Anthropic'}
  )
  ```
</CodeGroup>

## Environment-variable convention

Store your key as `BETA_API_KEY`:

```bash theme={null}
# .env or shell profile
export BETA_API_KEY=your_key_here
```

The official MCP server reads `BETA_API_KEY` automatically.

## Errors

| Status                  | Cause                                                             |
| ----------------------- | ----------------------------------------------------------------- |
| `401 Unauthorized`      | Missing or invalid `Authorization` header                         |
| `403 Forbidden`         | Valid key but no permission for this endpoint (rare)              |
| `429 Too Many Requests` | Rate limit exceeded — see [Pricing](/pricing) for per-tier limits |

## Key rotation

Email **[hello@getbeta.io](mailto:hello@getbeta.io)** to rotate your key. Old key is revoked immediately on issuance of the new one.

## Coming soon

Self-serve signup, key management dashboard, and programmatic key rotation are queued for the next release. See [Roadmap](/roadmap).
