Principles
How pricing, host choice, compatibility and data handling work.
Compatibility
The API follows OpenRouter's paths, fields, response shapes and error bodies. Chat completions, completions and Responses follow OpenAI's shapes; Messages follows Anthropic's.
Pricing
Our price is list price less one global discount, the same for every model. Each model page shows both.
Every completion reports its own cost in usage.cost, and a non-streamed one also in the X-PG-Cost-USD header; on a stream, usage.cost is in the final usage chunk.
Your own keys
A provider key you add on AI providers serves your own requests first, for the models it carries.
You pick no models: when you add the key, we ask the provider which models it can use and keep the ones we route. On Azure, that means your deployments.
Such a request is charged the own-key fee: a share of list price, zero today. With a zero fee it needs no credits.
When your key fails or refuses the request, the gateway falls back to the shared hosts at our normal price, if your credits cover it. X-PG-Host names the host that answered, and Activity tags each request your key served with "Your key".
Host choice
Each model has a pinned host: the gateway sends the model's requests to the same first host every time, which keeps prompt caches warm.
When that host fails, times out or rate limits, the gateway tries the model's next host, unless Allow fallbacks is off in your account settings. X-PG-Host names the host that answered.
Data
plaingateway does not train on request data. Each host has its own retention policy; see Provider logging. Service health and host latency are on /latency.