# m7gtw: All your AI traffic, in plain sight.

One OpenAI-compatible API for every provider: routing, budgets, guardrails and costed traces, on your own infrastructure.

- Run the quickstart: https://m7gtw.com/docs/start/quickstart/
- Docs: https://m7gtw.com/docs/
- This page in Portuguese: https://m7gtw.com/pt-br/index.md

- 220 µs: p99 latency added per request
- 23,654: requests per second on four cores, no failures
- 54.6 MiB: memory under load
- 24: client-to-provider format pairs measured

## 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.

```python
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8080/v1",
    api_key=GATEWAY_KEY,
)
client.chat.completions.create(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.

1. **Connect providers.** 129 presets, OpenAI, Anthropic, Gemini, Vertex AI, Bedrock, Azure, Mistral, Groq and Cohere among them. Provider keys stay in the gateway. https://m7gtw.com/docs/features/feature-providers/
2. **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. https://m7gtw.com/docs/features/protocol-translation/
3. **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. https://m7gtw.com/docs/features/feature-routing/
4. **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. https://m7gtw.com/docs/features/budgets-and-tpm/
5. **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. https://m7gtw.com/docs/features/feature-guardrails/
6. **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. https://m7gtw.com/docs/features/traces/
7. **Evaluate quality.** Datasets, experiments and judges on real traffic. Judge calls are routed, budgeted, priced and linked both ways to what they judged. https://m7gtw.com/docs/features/feature-evals/
8. **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. https://m7gtw.com/docs/features/usage-valuation/
9. **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. https://m7gtw.com/docs/features/organizations/

**Deployment:** One Go binary with the console built in, plus PostgreSQL; Compose, a native binary or Kubernetes. No request passes through our servers.

## Seven gateways, one instrument.

Our private run of the public [On the Bench method](https://onthebench.ai/gateways): 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 |

The headline cell is openai → openai: an OpenAI client calling an OpenAI-compatible upstream.
See benchmarks: https://m7gtw.com/docs/benchmarks/reproduction/ · On the Bench leaderboard: https://onthebench.ai/gateways

## Running in about ten minutes.

Docker Compose starts the gateway, PostgreSQL and an OpenTelemetry Collector on your machine.

```sh
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
```

https://m7gtw.com/docs/start/quickstart/

## m7 ai

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.

- **Shared core:** The gateway and its console, from one Go binary and PostgreSQL.
- **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. contact@m7gtw.com
