Skip to main content

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.
The variables are the ones from Your first call.

Headers you can send

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

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, 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.