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

# Authentication

> API authentication guide

Authentication guide for Lumina APIs.

***

## Self-Hosted

Default: No authentication required

Enable authentication:

```bash theme={null}
AUTH_REQUIRED=true
JWT_SECRET=<generate-secret>
```

***

## Cloud

Use API keys:

```bash theme={null}
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.uselumina.io/v1/traces
```

***

## SDK Configuration

```typescript theme={null}
const lumina = initLumina({
  endpoint: 'https://api.uselumina.io/v1/traces',
  apiKey: process.env.LUMINA_API_KEY,
  service_name: 'my-service',
});
```
