One endpoint, 12 models. Pay per token from credits, or per request with no key.
Point an OpenAI- or Anthropic-compatible client at opengateway.gitlawb.com and pass a model id, or "auto" to let the router choose. Pay from a credit balance with a key from your console, or let an agent pay per request over x402 with no key at all.
export OPENAI_BASE_URL=https://opengateway.gitlawb.com/v1
curl $OPENAI_BASE_URL/chat/completions -d '{"model":"auto", …}'
x-gateway-served-model: xiaomi/mimo-v2.5
x-gateway-cost-usd: 0.000412
200 OK, billed at the serving model's rate
- 1.74T
- tokens routed, all-time; live from the usage page
- 21.6M
- requests served, all-time; live
- 12
- models in the catalog, plus auto routing; live
- x402
- pay per request in USDC on Base, no key
What the gateway does. One integration, and you see what each call cost.
One endpoint, the catalog behind it
Point an OpenAI-compatible client at opengateway.gitlawb.com/v1 and pass the model. The gateway holds the provider secrets server-side, so your client never ships one.
Routing with model: auto
Send auto and the gateway picks the cheapest model expected to handle the request, and tries the next one up when an upstream fails. You are billed at the rate of the model that served it.
Anthropic-compatible too
The gateway also speaks the Anthropic Messages API. Point an Anthropic SDK at it with your key; streaming, tools and system prompts are translated.
Your own keys
Create keys in the console, one per app or environment, and revoke any of them on its own. Usage is attributed to the key that made the call.
Usage, yours and global
Your token spend per model and per key in the console, and the gateway's global usage on a public page.
Pay per request, no key
An agent can pay per call in USDC on Base over x402: send the request, get a 402 with the price, sign, retry. Prepaid credits work too.
Three steps. Key, base URL, first request.
Sign in and create a key
Use any sign-in the console offers, including Google, X and an email link. One key per project, environment or teammate, each revocable on its own.
Swap the base URL
Set
OPENAI_BASE_URL(orANTHROPIC_BASE_URL) to the gateway and pass a model id, orauto. Zero and other OpenAI-compatible clients work unchanged.Watch the usage
Tokens, spend and per-key breakdowns appear on your usage page within minutes. Top up credits when you need more than the free allowance.
Under the hood. Routing, keys, and two ways to pay.
One endpoint, many providers
Your client speaks the OpenAI API, or the Anthropic one. The gateway terminates the request, holds the provider secrets and forwards it to the provider behind the model you named. Changing providers is a change to the model string, not to your integration.
your client OPENAI_BASE_URL = opengateway.gitlawb.com/v1 ANTHROPIC_BASE_URL = opengateway.gitlawb.com gateway auth keys, credits, x402 route pick a model, retry on failure meter cost and usage per key providers MiMo · Gemini · MiniMax · Qwen …
Routing: stop picking models
The gateway looks at each request (context size, tool definitions, code, reasoning parameters) and routes it to the cheapest model expected to answer it well. When an upstream rate-limits, errors or returns nothing, it tries the next model up, up to three attempts.
Steer it with an optional route hint with the fields priority (cost, balanced or quality) and max_cost_usd, as in the request at the right; the hint is removed before the request reaches a provider. The x-gateway-served-model header names the model that answered.
curl https://opengateway.gitlawb.com/v1/chat/completions \
-H "authorization: Bearer ogw_live_…" \
-H "content-type: application/json" \
-d '{
"model": "auto",
"route": {"priority": "cost", "max_cost_usd": 0.01},
"messages": [{"role": "user", "content": "hello, router"}]
}'
# the response says which model served it:
# x-gateway-served-model: xiaomi/mimo-v2.5Keys and what you spent
Every request carries one of your keys as the bearer token: up to 20 active, revocable on their own. Non-streaming responses carry x-gateway-cost-usd (what the call billed) and x-gateway-balance-usd (your approximate balance); GET /v1/credits and GET /v1/usage/me return the same numbers.
# any OpenAI-compatible client export OPENAI_BASE_URL=https://opengateway.gitlawb.com/v1 export OPENAI_API_KEY=ogw_live_… # any Anthropic SDK export ANTHROPIC_BASE_URL=https://opengateway.gitlawb.com export ANTHROPIC_API_KEY=ogw_live_… # what the call cost, in the response headers # x-gateway-cost-usd: 0.000412 # x-gateway-balance-usd: 9.8731
Credits, or pay per request
Credits are the steady path: usage is metered per token and deducted from your balance. With a zero balance the free model still answers, and MiMo V2.5-Pro has a free allowance of 30 requests per 5-hour window.
An agent with no account can pay per request in USDC on Base over x402: send the call with no credential, receive a 402 with a PAYMENT-REQUIRED challenge, sign the EIP-3009 authorization, retry with PAYMENT-SIGNATURE, and the response carries PAYMENT-RESPONSE with the settlement transaction. It works on /v1/chat/completions and /v1/messages; each model's price is on GET /v1/models.
# 1. no key, no sign-up: just ask
POST https://opengateway.gitlawb.com/v1/chat/completions
{"model": "xiaomi/mimo-v2.5-pro", "messages": [...]}
# 2. the gateway names its price
HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: exact · Base mainnet · USDC
# 3. sign the EIP-3009 authorization, retry
POST https://opengateway.gitlawb.com/v1/chat/completions
PAYMENT-SIGNATURE: …
# 4. served, with the settlement receipt
HTTP/1.1 200 OK
PAYMENT-RESPONSE: {"transaction": "0x…"}Quickstart. Three lines to your first request.
If your client speaks the OpenAI API, it speaks OpenGateway. Swap the base URL, set your key, and pick a model from the catalog, or send auto and let the router choose.
curl https://opengateway.gitlawb.com/v1/chat/completions \
-H "authorization: Bearer ogw_live_…" \
-H "content-type: application/json" \
-d '{
"model": "mimo-v2.5-pro",
"messages": [
{"role": "user", "content": "hello, gateway"}
]
}'Live · gateway health, checked 09:34 UTC
Rates. Per 1M tokens, deducted from your credit balance.
All pricing| Model | Input | Cached input | Output |
|---|---|---|---|
Auto routingauto | Billed at the rate of the model that served it | ||
MiMo V2.5-Proxiaomi/mimo-v2.5-pro | $0.522 | $0.00432 | $1.04 |
MiMo V2.5xiaomi/mimo-v2.5 | $0.168 | $0.00336 | $0.336 |
Gemini 3.1 Flash Litegoogle/gemini-3.1-flash-lite | $0.30 | $0.03 | $1.80 |
MiniMax M3minimax/minimax-m3 | $0.36 | $0.072 | $1.44 |
Qwen 3.7 Maxqwen/qwen3.7-max | $1.50 | $0.30 | $4.50 |
Kimi K3moonshotai/kimi-k3 | $3.60 | $0.36 | $18.00 |
GLM 5.2z-ai/glm-5.2 | $1.68 | $0.312 | $5.28 |
Nemotron 3 Ultra (free)nvidia/nemotron-3-ultra-550b-a55b:freeFree, rate limited; no credits needed | $0 | $0 | $0 |
Nemotron 3 Ultranvidia/nemotron-3-ultra-550b-a55b | $0.72 | $0.24 | $4.32 |
Ling 3.0 Flashinclusionai/ling-3.0-flash | $0.072 | $0.0144 | $0.216 |
Tencent HY3tencent/hy3 | $0.24 | $0.06 | $0.96 |
Macaron V1 Tallmindai/macaron-v1-tall | $0.54 | $0.096 | $3.12 |
Macaron V1 Ventimindai/macaron-v1-venti | $1.80 | $0.36 | $5.40 |
Live from the gateway's model list, GET /v1/models, re-read every five minutes. USD per 1M tokens, as billed from a credit balance.