Gateway mode
Every model your organisation has, behind one provider, one key and one URL.
Omit agent and you get a plain model call. No system prompt, no tools, no retrieval: your messages go to the model and the answer comes back.
curl -X POST https://api.asteria-labs.com/v1/chat/completions \
-H "Authorization: Bearer sk-ast-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "default", "messages": [{"role": "user", "content": "Write a haiku about invoicing"}]}'"default" rather than a model id. More on that below, because it is the useful part.
What this is for
Your organisation has models from several providers. Without a gateway, every application that wants one needs that provider's key, that provider's SDK, that provider's base URL, and a change in all of them when procurement switches vendor.
Through the gateway there is one base URL, one key format, one request shape, and every model your organisation has bought is reachable. Add a provider centrally and every application can use it without redeploying. Drop one and nothing has a stale key.
You also get, for free, what is otherwise a project of its own: usage and cost attributed per project, in one place, across providers that each report it differently.
Do not name a model
Send "model": "default". It is the recommendation rather than a shortcut.
The request then uses your organisation's default chat model, chosen by an administrator. So:
- A new application sends a working request without anyone looking up a model id.
- When a better model arrives, an administrator changes the default and every application asking for
"default"moves with it. - When a model is retired, nothing breaks, because nothing named it.
That last point is what makes this worth a paragraph. Model ids are the most perishable string in an AI codebase: they get deprecated on a vendor's schedule, and a hardcoded one is a small outage waiting for a date you do not control. Code that names no model keeps working for years.
Name a model when you genuinely need that model: a specific capability, a reproducibility requirement, a benchmark you are holding constant.
{
"model": "claude-opus-4-6",
"messages": [{"role": "user", "content": "..."}]
}Leaving model out entirely does the same thing. Reach for "default" anyway: the OpenAI SDK and everything built on it always send the field, so an omitted model is only available if you assemble the request yourself. "default" is a reserved name, so it can never collide with a real model.
If your organisation has no default chat model configured, "default" gets you 400 invalid_request_error saying so. That is an administrator setting one, not a change to your code.
The four combinations
model and agent are independent. agent is optional; model takes "default" or a model id.
model | agent | You get |
|---|---|---|
"default" | omitted | Gateway, on the organisation's default model |
| named | omitted | Gateway, on that model |
"default" | "asteria" | The full assistant, on the default model |
| named | "asteria" | The full assistant, on that model |
| named | an agent slug | That custom agent |
agent chooses whether there is an agent layer at all. model chooses what runs underneath. See From the app to production for the agent side.
Which models can I use
GET /v1/models lists what this project can reach, so you can populate a picker rather than hardcoding a list that goes stale. Real models only: "default" is not among them, and it is how you say "whatever the organisation prefers" without enumerating at all.
GET /v1/agents does the same for agents callable by the project.
What gateway mode does not give you
Worth being explicit, because the endpoint is the same and the difference is one field:
- No retrieval. It will not search your collections. Nothing is looked up.
- No tools. No web search, no code execution, no document building.
- No system prompt of ours. You are talking to the raw model. Any behaviour you want, you send.
- No memory. Conversation history is whatever you put in
messages.
If you want any of that, you want agent. If you specifically want none of it, because you are doing classification or extraction and an eager assistant would be in the way, gateway mode is the right tool and the simpler one.