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

# Introduction

> The base address, the key, the headers and the errors of the Atlaso API.

## Base address and key

Every route sits under `https://api.atlaso.ai/v1`. Send your Atlaso key in one
header, `Authorization: Bearer sk-at-...`. Create the key on the **API keys**
page; the provider is called with the key you saved on the **Provider keys** page.

```bash theme={null}
curl "$ATLASO_BASE_URL/models" -H "Authorization: Bearer $ATLASO_KEY"
```

The variables are the ones from [Your first call](https://docs.atlaso.ai/gateway/quickstart.md).

## Headers you can send

For per-user memory, send `x-atlaso-user` on every chat or Responses call; the
other headers below are optional.

| Header | What it does |
| - | - |
| `x-atlaso-user` | Your app user's id, set by your server. A key set to memory for each user of your app needs it on every Memory API call. A key whose **Memory for** is **Me** reaches your own memory and must not send it. |
| `x-atlaso-memory` | For this one call only: `off` means no recall and no learning; `use` means recall as usual but no learning. |
| `x-atlaso-session-id` | Your own id for a group of related calls. |
| `x-atlaso-client` | The name of your app, shown in Activity. |
| `x-atlaso-tags` | Your own `key=value` labels. See [Tags](https://docs.atlaso.ai/gateway/tags.md). |

## Reading cost and memory

Each chat or responses reply carries `x-atlaso-call-id`, `x-atlaso-provider`
and `x-atlaso-model`. A reply that is not streamed also carries
`x-atlaso-cost-usd` and `x-atlaso-cache`. For Chat Completions streams, set
`stream_options.include_usage` to `true` and read `atlaso` on the final usage
chunk. For Responses streams, read `response.atlaso` on `response.completed`,
`response.incomplete` or `response.failed`; a bare `error` event carries
`atlaso` at the top level.

Every reply carries `x-atlaso-memory`, which says what memory did, for example
`status=used` or `status=off; ... reason=request_off`. It also carries
`x-request-id`; quote it to support.

## Errors

An error is JSON with one `error` object: `message`, `type`, `param`, `code`
and `doc_url`. `doc_url` links to the code on [Errors](https://docs.atlaso.ai/gateway/errors.md), which
explains each one. When a retry soon cannot help, the reply also carries
`x-should-retry: false`, except a Memory API 400; when waiting helps, it may
carry `retry-after`.


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