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

# Authentication

> API key authentication for all ARBITER endpoints.

## API Key Authentication

All API requests (except `/health`) require an API key passed via the `X-API-Key` header:

```bash theme={null}
curl "https://api.arbiterapi.com/v1/markets" \
  -H "X-API-Key: arb_live_abc123..."
```

## Getting an API Key

### Option 1: Sign up via API

```bash theme={null}
curl -X POST "https://api.arbiterapi.com/v1/auth/signup" \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "password": "your-password"}'
```

### Option 2: Dashboard

Sign up at [arbiterapi.com/signup](https://arbiterapi.com/signup) to get your key from the dashboard.

## Managing Keys

You can create multiple API keys per account and revoke them individually:

```bash theme={null}
# List your keys
curl .../v1/keys -H "Authorization: Bearer YOUR_JWT"

# Create a new key
curl -X POST .../v1/keys \
  -H "Authorization: Bearer YOUR_JWT" \
  -H "Content-Type: application/json" \
  -d '{"label": "production"}'

# Revoke a key
curl -X DELETE .../v1/keys/key_id \
  -H "Authorization: Bearer YOUR_JWT"
```

## WebSocket Authentication

For WebSocket connections, pass your API key as a query parameter:

```
wss://api.arbiterapi.com/v1/ws?api_key=YOUR_API_KEY
```

## Rate Limits

| Tier       | Requests/min | WebSocket connections |
| ---------- | ------------ | --------------------- |
| Free       | 60           | 2                     |
| Pro        | 600          | 20                    |
| Enterprise | Custom       | Custom                |

Rate limit headers are included in every response:

```
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1774402500
```
