> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.narilabs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.narilabs.com/_mcp/server.

# Authentication

Create and revoke API keys in [API Keys](https://app.trynari.com/keys). Each key belongs to an organization.

## Authenticate requests

Include your API key in the `Authorization` header:

```http
Authorization: Bearer YOUR_NARI_API_KEY
```

Use this header for both HTTP requests and WebSocket connections. A missing or invalid key returns `401 INVALID_API_KEY`.

## Client applications

Keep your API key on your application server. Browser and mobile apps should connect through your server, which authenticates requests to Nari and relays responses.

* Store keys in a secret manager or server-side environment variable.
* Use separate keys for development and production.
* Revoke exposed keys. Never include them in frontend code or URLs.