Overview & authentication
The gateway is a drop-in replacement for the OpenAI and Anthropic APIs. Request and response bodies are the vendor's own; the gateway adds governance on the way through.
Base URLs
| API | Base URL | Use with |
|---|---|---|
| OpenAI-compatible | https://gateway.agentkeyroute.com/v1 | OpenAI SDKs, LangChain, LlamaIndex, most tools |
| Anthropic | https://gateway.agentkeyroute.com | Anthropic SDKs, Claude Code, Claude Agent SDK |
Dedicated and on-premises installations have their own gateway address; the console shows it under Connect an app → Developer reference.
Authentication
Send an AgentKeyRoute API key in either header:
Authorization: Bearer <your API key>
# or
x-api-key: <your API key>Create keys in Connect an app (opens in a new tab) or API keys (opens in a new tab). A key carries its app, team and governance profile; it can expire and can be revoked instantly. Keep it in a secret manager: it's shown once.
Models
Use any model name your key may use. GET /v1/models returns exactly that list, filtered by the key's profile and policy. If you ask for a model policy doesn't allow for the data in a request, the gateway may redirect to an allowed one and name it in X-AIGov-Model.
curl https://gateway.agentkeyroute.com/v1/models -H "Authorization: Bearer <your API key>"Streaming
Set "stream": true as you would with the vendor API. Checks on the request happen before the first token; answer screening, when enabled, applies to the stream.