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

# Authentication

> Use API keys in production and the local org-name fallback during development.

# Authentication

Production requests use the `X-API-Key` header.

```http theme={"dark"}
X-API-Key: your-api-key
```

The API hashes the provided key and looks it up in the database-backed `api_keys` table. The matching row determines the effective organization for template and generation access.

## Local development fallback

In `development` or `test` mode, the API also accepts `X-Org-Name` when no API key is provided.

```http theme={"dark"}
X-Org-Name: example_org
```

This is only a local convenience path. Production deployments should use `X-API-Key`.

## Request behavior

* Invalid keys return `403`
* Missing auth returns `401`
* Organization mismatches return `403`
