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

# Authentication

> Authenticate API requests with a SAN API key.

Create a key in **API keys** on the [SAN platform](https://platform.sanfoundation.com/dashboard/keys). Keys begin with `san_` and are shown only once.

Store the key as `SAN_API_KEY` in your server environment or secret manager. Attach it to every public API request:

```http theme={null}
Authorization: Bearer <SAN_API_KEY>
```

You can use `X-Api-Key: <SAN_API_KEY>` instead. Choose one header; query-string keys are unsupported. See the [quickstart](https://docs.sanfoundation.com/api-quickstart.md) for a complete request.

Keep keys out of browser code, prompts, and URLs. Use separate named keys for applications; all keys on an account share its quota.

A missing, invalid, or revoked key returns `401 unauthorized`. Check your header and environment variable. If a key is lost or exposed, create a replacement, update your application, and revoke the old key. See [Manage API keys](https://docs.sanfoundation.com/platform/api-keys.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.