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

# Authentication & API keys

> How to get an ltk_ key, and how to send it.

## Getting a key

1. Visit [`/cli`](https://asklethe.ai/cli).
2. Connect a wallet. This links your current network for 24 hours and issues a key prefixed `ltk_`.
3. Use that key from any machine, CLI, or SDK. It isn't tied to the browser it was issued in.

No key at all is required for a small guest allowance (3 requests/network), send any placeholder string as the key in that case.

## Sending the key

Any of these are accepted:

<CodeGroup>
  ```bash Authorization header theme={null}
  curl https://asklethe.ai/v1/chat/completions \
    -H "Authorization: Bearer ltk_..." \
    -H "Content-Type: application/json" \
    -d '{...}'
  ```

  ```bash x-api-key header theme={null}
  curl https://asklethe.ai/v1/messages \
    -H "x-api-key: ltk_..." \
    -H "Content-Type: application/json" \
    -d '{...}'
  ```
</CodeGroup>

`x-api-key` and `api-key` headers are checked first; `Authorization: Bearer <key>` is used otherwise.

## Auth errors

| Status | Code                                  | Meaning                                                                              |
| ------ | ------------------------------------- | ------------------------------------------------------------------------------------ |
| 401    | `invalid_api_key` / `missing_api_key` | No key sent, or the key doesn't resolve to a known identity.                         |
| 503    | `unconfigured`                        | No LETHE API keys are configured server-side (deployment issue, not a client error). |

See [Errors](/api-reference/errors) for the full response shape.
