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

# Authentication

> Authenticate requests to the Core API with an API key

All requests to ILLA's Core API require an API key.

## Using the ILLA SDK (recommended)

```ts theme={null}
import { IllaSDK } from '@illalabs/sdk'

const sdk = new IllaSDK({
  apiKey: process.env.ILLA_API_KEY!,
})
```

## Using CoreApiProvider directly

```ts theme={null}
import { CoreApiProvider } from '@illalabs/sdk'

const provider = new CoreApiProvider({
  headers: {
    'x-api-key': process.env.ILLA_API_KEY!,
  },
})
```

## Best practices

* Store API keys in environment variables.
* Never commit keys to source control.
* Follow your platform/team key lifecycle process.
