All your AI traffic, in plain sight.
One OpenAI-compatible API for every provider: routing, budgets, guardrails and costed traces, on your own infrastructure.
| Status | Time | Principal | Team | Model | Provider | Latency | Cost |
|---|---|---|---|---|---|---|---|
| 200 | 12:00:04 | checkout-service | platform | chat-default | openai | 185 ms | $0.0021 |
| 200 | 12:00:03 | support-agent | support | claude-fast | anthropic | 412 ms | $0.0064 |
| 429 | 12:00:03 | batch-summaries | data | chat-default | openai → bedrock | 903 ms | $0.0048 |
| 200 | 12:00:02 | search-rerank | search | embed-small | cohere | 61 ms | $0.0001 |
| 200 | 12:00:01 | ide-assistant | platform | code-large | vertex | 1.24 s | $0.0312 |
| 403 | 12:00:01 | intern-notebook | data | code-large | — | 2 ms | $0.0000 |
| 200 | 12:00:00 | checkout-service | platform | chat-default | cache | 4 ms | $0.0000 |
Row 3: the provider answered 429 and the fallback served it. Row 6: the key's policy does not allow that model, so nothing left the building.
Every call is priced when it happens. A team that reaches its budget is stopped before the provider is called, not on next month's invoice.
Apps keep calling one alias. Weights, canaries, latency or cost rules and the fallback order change in the console, with no deploy.
The console ships inside the gateway, at /ui/. These views are drawn from its screens; the rows are made up.
One SDK, any model.
Point the OpenAI SDK or curl at the gateway. Each model name is an alias your operator defines, running on OpenAI, Anthropic, Gemini, Bedrock, Cohere or any OpenAI-compatible provider.
from openai import OpenAI client = OpenAI( base_url="http://localhost:8080/v1", # your gateway api_key=GATEWAY_KEY, # a gateway key, never a provider's) # Aliases your operator defines; each one can run on a different provider. for model in ["gpt-5", "claude-sonnet", "gemini-pro"]: client.chat.completions.create( model=model, messages=[{"role": "user", "content": "Hello"}], )
curl http://localhost:8080/v1/chat/completions \ -H "Authorization: Bearer $GATEWAY_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"claude-sonnet","messages":[{"role":"user","content":"Hello"}]}'
From the first provider to production.
Every step runs inside m7gtw, on the same traffic, ledger and permissions.
Connect providers
129 presets, OpenAI, Anthropic, Gemini, Vertex AI, Bedrock, Azure, Mistral, Groq and Cohere among them. Provider keys stay in the gateway.
/docs/features/feature-providers/One API for your apps
Apps call one alias with the OpenAI SDK, or keep Anthropic, Responses or Gemini code. Four client dialects reach six provider dialects.
/docs/features/protocol-translation/Route and fall back
Weights, sticky canaries, latency and health-aware ordering, retries and circuit breakers, plus exact and semantic cache, changed without a deploy.
/docs/features/feature-routing/Budgets and limits
Budgets and token limits per team, key and end user are checked before any provider call. Spend stops at the limit, not at the invoice.
/docs/features/budgets-and-tpm/Guardrails and privacy
Mask personal data, block requests, enforce a system prompt. Logs and spans hold metadata only; prompts are kept only under a policy you enable.
/docs/features/feature-guardrails/Traces and logs
Each request is a tree of timed, costed spans in the gateway's own PostgreSQL. Coding-agent runs are grouped from the traffic itself.
/docs/features/traces/Evaluate quality
Datasets, experiments and judges on real traffic. Judge calls are routed, budgeted, priced and linked both ways to what they judged.
/docs/features/feature-evals/Analytics and cost
An automatic price book prices every provider attempt, retries and fallbacks included, by team, key and model. Metrics and alerts export over OTLP.
/docs/features/usage-valuation/Teams and organizations
Organizations cap the models their teams may use; custom roles, SSO with OIDC, SCIM and an audit trail. MCP tools and A2A agents use the same keys.
/docs/features/organizations/Seven gateways, one instrument.
Our private run of the public On the Bench method: other gateways on 30–31 October 2026, m7gtw on 19 November 2026, on new boxes of the same type with the same instrument, where the October build of m7gtw first reproduced its October numbers.
m7gtw adds 220 µs at p99 and carries 23,654 req/s on four cores.
Busbar leads this cell at 92 µs and 59,039 req/s; the other five are slower.
| Gateway | p99 µs | p50 µs | CPU µs/req | req/s | MiB | Cells |
|---|---|---|---|---|---|---|
| Busbar 1.5.5 | 92 | 80 | 69 | 59,039 | 21 | 7 |
| m7gtw | 220 | 178 | 171 | 23,654 | 55 | 24 |
| m7gtw · October build | 432 | 181 | 186 | 20,090 | 33 | 24 |
| Bifrost v1.6.11 | 1,211 | 601 | 912 | 4,638 | 759 | 6 |
| GoModel 0.1.82 | 2,713 | 679 | 1,118 | 2,577 | 84 | 8 |
| Portkey 1.15.2 | 3,741 | 1,193 | 1,526 | 855 | 243 | 8 |
| LiteLLM · Python v1.98.0 | 7,656 | 6,106 | 5,933 | 176 | 781 | 8 |
| One-API v0.6.10 | 1,430,396 | 34,008 | 3,256 | 37 | 143 | 1 |
m7gtw row: build of 19 November 2026; m7gtw (October build) and the other rows: 30–31 October 2026. p99/p50 added at concurrency 1 on openai → openai; CPU per request; req/s in the best failure-free window; MiB under load. Cells: client-to-provider pairs measured in this run. The October build of m7gtw added 432 µs at p99 and carried 20,090 req/s on the same cell.
The headline cell is openai → openai: an OpenAI client calling an OpenAI-compatible upstream.
Running in about ten minutes.
Docker Compose starts the gateway, PostgreSQL and an OpenTelemetry Collector on your machine.
Start it
Clone the repository, build the image (until the first public release), write the local secrets with your OpenAI key in OPENAI_API_KEY, and start the services; the first start runs the migrations.
/docs/start/quickstart/Also runs as a single binary, with npx, or on Kubernetes (Helm or Kustomize).
git clone https://github.com/m7gtw/gateway.git m7gtw && cd m7gtw export GATEWAY_IMAGE=gateway:local scripts/build-image.sh "$GATEWAY_IMAGE" python3 scripts/bootstrap-local-secrets.py --target docker docker compose --env-file deploy/docker/.env.local \ -f deploy/docker/compose.yaml up --no-build -d --wait
Send the first request
chat-default routes to an OpenAI model in the example configuration.
/docs/start/quickstart/curl http://localhost:8080/v1/chat/completions \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"model":"chat-default","messages":[{"role":"user","content":"Hello!"}]}'
Open the console
Sign in with the admin token, find the call in Logs → Requests, create an app key.
/docs/features/console/http://localhost:8080/ui/
Start from the docs.
Quickstart
Run it locally, make the first call, open the console.
/docs/start/quickstart/How it works
What happens to a request, stage by stage.
/docs/start/how-it-works/Deploy and operate
Compose, a native binary or Kubernetes, and what you supply.
/docs/operate/deployment-modes/Benchmarks
The full reproduction, with its kit and audit trail.
/docs/benchmarks/reproduction/For agents and LLMs: /llms.txt indexes the site and the docs, /docs/llms-full.txt holds the docs in one file, and every page has a .md twin.
Ask m7 ai about the gateway.
m7 ai answers only about m7gtw, from the docs, citing the page. It never runs commands or acts for anyone.
It runs on the open-weight gpt-oss-20b model on Cloudflare Workers AI, with a daily limit. Questions are not stored.
One core, two editions.
Both editions are the same binary. Enterprise turns on with a signed licence key, checked locally with no network call.
Enterprise
The same binary with an Enterprise licence key. A 14-day trial key is supported.
What each edition includes, prices and support terms are not published yet. Write to us and we will tell you where things stand.
Questions people ask first.
What is m7gtw?
A self-hosted AI gateway in Go: one OpenAI-compatible API with routing, budgets, guardrails, traces and evaluations, for teams with roles and permissions.
How fast is it, and is it the fastest?
No. On openai → openai it adds 220 µs at p99 (build of 19 November 2026); Busbar adds 92 µs. The other five were slower.
Where does it run, and where does my data go?
On your infrastructure, next to your PostgreSQL. Requests go from your apps to the gateway to your providers, never through our servers.
Do I have to change my code?
Only the base URL and the key. Use the OpenAI SDK for every model; existing Anthropic, Responses or Gemini code works too.
How were the numbers measured?
A private run of the public On the Bench method, each gateway on its own AWS m7g.4xlarge. Report, kit and raw data are in the docs.
What do the editions cost?
Prices are not published yet; write to contact@m7gtw.com.
What does m7 ai answer?
Questions about m7gtw, from the docs, with a link to the page. Nothing else.
Tell us what you are routing.
Editions, deployments or the benchmark: we answer by e-mail.