OpenGateway documentation
OpenGateway is the open-source AI gateway for the best open-weight models. Point any OpenAI- or Anthropic-compatible client at one base URL and call Kimi, MiniMax, Qwen, DeepSeek, GLM and GPT-OSS — routed across live inference providers at the edge.
These docs cover the public /oss lane — 100% open-weight, self-hostable models. No proprietary frontier lock-in in the default path.
One base-URL swap
OpenGateway runs as a Cloudflare Worker at the edge and speaks
both the OpenAI and Anthropic wire protocols on the
/oss lane. Bring your existing coding agent or SDK, change
the base URL, and it just works — no code changes, no forks.
# OpenAI-compatible — just swap the base URL curl https://api.opengateway.one/oss/v1/chat/completions \ -H "Authorization: Bearer $OPENGATEWAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "glm-5.2", "messages": [{"role": "user", "content": "Refactor this function"}] }'
Base URLs
Everything public lives under https://api.opengateway.one/oss.
| Surface | URL | Use for |
|---|---|---|
| OSS lane root | https://api.opengateway.one/oss | Anthropic SDK, Claude Code (CLI/IDE/Desktop) |
| OpenAI-compatible | https://api.opengateway.one/oss/v1 | OpenAI SDK, Codex, Cursor |
| Model discovery | https://api.opengateway.one/oss/v1/models | Catalog + agent pickers |
| Live status | https://api.opengateway.one/status/api | Machine-readable health |
The OpenAI base URL includes /v1. The Anthropic base URL excludes it — the SDK appends its own /v1/messages. Both land on the gateway's /v1/* routes.
Why OpenGateway
- One API for any open model — drop-in compatible with the OpenAI and Anthropic SDKs.
- Higher availability — every model is hosted by multiple providers; the gateway routes to a healthy one and fails over automatically.
- Price & performance — pick a routing policy per request:
:preferred,:fastestor:cheapest. - 100% open weights — every model is open-weight and self-hostable, so you keep portability and control of your data.
- Measured telemetry — real provider data on status.opengateway.one, never vanity metrics.
Start here
Swap your base URL and send your first /oss request in under five minutes.
How the /oss catalog and :fastest/:cheapest/:preferred policies work.
Chat completions, messages, models and embeddings — with copy-paste examples.
Copy-paste config for Claude Code (CLI, IDE, Desktop), Cursor and Codex.