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

# Authentication

> Authenticate requests using API keys

## API keys

All requests to `/v1/*` endpoints require an API key passed in the `x-api-key` header.

```bash theme={null}
curl -H "x-api-key: sk-your-api-key" \
  https://api.scraper.creatorlookup.com/v1/credit-balance
```

The `/health` endpoint does not require authentication.

## Key format

API keys follow the format `sk-` followed by 32 hex characters:

```
sk-a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4
```

## Key properties

Each API key has the following attributes:

| Property                | Description                    |
| ----------------------- | ------------------------------ |
| `key`                   | The API key string             |
| `name`                  | A human-readable label         |
| `credits_remaining`     | Available credits for this key |
| `rate_limit_per_minute` | Maximum requests per minute    |
| `is_active`             | Whether the key is enabled     |

## Error responses

### Missing API key

```json theme={null}
// 401 Unauthorized
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Missing x-api-key header"
  }
}
```

### Invalid or deactivated key

```json theme={null}
// 401 Unauthorized
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid API key"
  }
}
```

## Security best practices

* Store API keys in environment variables, never in source code
* Use different keys for development and production
* Rotate keys if you suspect they have been compromised
* Monitor your usage via the [credit balance endpoint](/api-reference/credit-balance)
