12 Jun 2026 ยท Agentbot Team
Opengateway Explained โ One OpenAI-Compatible Endpoint for Every Model
Every app you build needs the same three things from an LLM provider: an endpoint that doesn't change, a key you can revoke, and a bill you can read. Opengateway โ the Agentbot inference gateway at agentbot.sh/vercel-gateway โ gives you all three behind a single OpenAI-compatible URL.
The problem it solves
Model providers churn. Pricing changes, rate limits appear mid-launch, a model gets deprecated the week you ship. If your code talks to one provider directly, every one of those events is a code change. The standard answer is a gateway: your app talks to one stable endpoint, and routing decisions happen server-side where they can change without a deploy.
That's what powers the Agentbot platform itself. The Playground streams every app it builds through this gateway, agent containers route their inference through it, and the same infrastructure is open for your own keys.
How it works
The gateway exposes POST /v1/chat/completions on agentbot.sh โ the exact shape of the OpenAI API. Behind it, requests fan out to configured upstreams (Vercel AI Gateway first, OpenRouter as fallback) with automatic failover: if an upstream returns a retryable error, the gateway moves to the next one before your client ever sees a failure.
Because the surface is OpenAI-compatible, adopting it is a one-line change in any SDK:
import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://agentbot.sh/v1',
apiKey: 'ogw_live_...',
})
const reply = await client.chat.completions.create({
model: 'mimo-v2.5-pro',
messages: [{ role: 'user', content: 'hello, gateway' }],
})Or straight from the terminal:
curl https://agentbot.sh/v1/chat/completions \
-H "authorization: Bearer ogw_live_..." \
-H "content-type: application/json" \
-d '{"model": "mimo-v2.5-pro", "messages": [{"role": "user", "content": "hello"}]}'Keys that behave like production keys
Sign in at /vercel-gateway, name a key, and copy it once โ that's the only time you'll see it. Keys are stored as SHA-256 hashes, never raw, and revoking one is a single click. This is the same fail-closed pattern we covered in our security audit write-up: if a key can't be verified, the request doesn't go through.
Usage you can actually read
The console shows your requests, your token counts, and global gateway traffic broken down by model โ refreshed live from the same tables the gateway writes on every request. No waiting for a monthly invoice to discover what your agent spent. Cost tracking is per-user and per-model, so when something spikes you know which model and which workload did it.
Free inference, sponsored
The default model is Xiaomi's MiMo-V2.5-Pro, available through the gateway for free. It's the same model that powers the Playground's app builder โ good enough to generate working multi-file React apps, fast enough to stream them live. Bring requests for other models and the gateway routes them through the configured upstreams with the same key and the same endpoint.
Operational transparency
Gateway health is public: the console pings upstream providers and reports status, active provider, and latency on every load. There's also a raw health endpoint at /api/vercel-gateway/health if you want to wire it into your own monitoring โ it returns provider-level checks and fails honestly when nothing is configured.
Get started
Open agentbot.sh/vercel-gateway, create a key, and swap your base URL. If you want to see the gateway working before writing any code, open the Playground and build something โ every token of that generation flows through the endpoint you just read about.