Skip to content

Gateway#

The gateway is the single endpoint your applications and tools call. It authenticates the request, checks it against your rules and budgets, sends it to the right provider and records what happened. Applications keep using the OpenAI or Anthropic SDKs they already use.

What it gives you#

  • Two compatible front doors. An OpenAI-compatible address and an Anthropic-compatible address. Callers see the response and error formats their SDK expects.
  • Models behind both doors. The OpenAI door reaches any chat model you offer, whichever provider hosts it. The Anthropic door reaches Claude models only.
  • Rules before cost. The gateway checks models, budgets and project limits before a request reaches a provider.
  • Complete records. ATLAS records every request that gets past authentication, including refused ones.

What happens to a request#

flowchart TD
    C[Your client or tool] --> A[Check the API key]
    A --> ADM[Check the rules<br/>model, parameters, budget]
    ADM --> R[Pick the route to the provider]
    R --> U[(AI provider)]
    U --> N[Convert the answer to the caller's format]
    N --> AU[Record usage and cost]
    N --> C
    A -. refused .-> E[Error in the caller's format]
    ADM -. refused .-> E
    E --> AU
  1. Authentication. The API key identifies your organisation and its acting context, either a team space or a project. The gateway rejects bad credentials without leaving a record. It refuses keys of suspended organisations, keys acting under archived projects and keys with no acting context, each with a specific message.
  2. Rules. The gateway resolves the model for this key and checks it can serve the endpoint you called. It applies model defaults and project settings, then checks budget. For more information, see Budget and cost.
  3. Routing. The model's request format and the provider's connection style decide how the call is built.
  4. Conversion. The gateway converts the provider's answer, or stream, back into the format the caller used, including token usage.
  5. Recording. ATLAS records usage and cost without slowing the response. A recording problem can never fail your request.

Model access#

A model works with an endpoint only if it offers that capability: chat, embeddings, rerank, transcription or speech. A model that is blocked in your space, or not on your project's list, behaves as if it doesn't exist. For more information, see Spaces and Projects.

Unknown parameters#

Clients, especially agent frameworks, often send parameters that a model doesn't support. ATLAS may remove such parameters so the request still succeeds. The response lists anything removed as atlas_stripped_parameters, so you can answer "why did my setting not work?" from the response. Admins can adjust this per provider. For more information, see Tune how a provider handles request parameters.

Streaming and usage#

  • If you cancel a stream, ATLAS keeps and bills the tokens produced so far.
  • If a provider breaks mid-stream, ATLAS estimates cost from what it actually delivered.
  • At the end of a stream, a final chunk carries token usage, so OpenAI-style clients get totals without extra calls. ATLAS omits the chunk if no tokens were observed or a failure occurs mid-stream. It also omits the chunk if your request sets stream_options.include_usage to false on an Anthropic, Ollama or Bedrock model.
  • Missing token counts appear as empty, never as zero. Reports can tell exact figures from estimated ones.

Errors you may see#

The gateway turns every provider failure into a small set of consistent errors, so you don't need provider-specific handling.

  • Your key was valid. If a provider rejects ATLAS's own credentials, you receive a provider error, not an authentication error. This stops SDKs from discarding a working key.
  • Rate limit versus budget. A provider rate limit and an exhausted budget are different errors. Retry the first and ask an Admin about the second.
  • Not an AI endpoint. If a provider's address doesn't return an AI response, the error says the provider looks incompatible. Ask an Admin to check the base address.

The exact formats are in the reference and errors.

Supported endpoints#

  • Chat and Responses. Any client API can reach any chat model. The gateway refuses Responses features that a chat model can't support, such as server-side state and built-in tools, instead of imitating them.
  • Tool calling. Tool calls and results work across providers, so agent loops keep working. Combinations a provider can't honour fail with a clear error.
  • Embeddings, rerank, transcription and speech. One request is one cost and one record. Rerank, transcription and speech make one provider call. An embeddings request with many inputs can be split into several provider calls, depending on the model. ATLAS doesn't store audio or embedding vectors.
  • Anthropic Messages. Designed so Claude Code and Anthropic SDKs work unchanged.

Limits#

The gateway bounds every request, so one caller or one slow provider can't affect the rest. It sets a maximum request size and a timeout for slow providers. It retries temporary provider failures automatically, except streams that have already started. The values are in the gateway reference.