Hello, MirAPI
One gateway in front of 200+ AI models, three protocols, and a single prepaid USD balance — here is what we built and why.
We have been building MirAPI for a while, and today we are opening the doors. If you have ever juggled a dozen provider accounts, reconciled a dozen invoices, or wished your coding agent could just spend from one balance — this is for you.
What MirAPI is
MirAPI is an API gateway that sits in front of more than 200 models from every major vendor and exposes them through one account, one key, and one prepaid balance. You top up once, in USD, and route requests wherever you like, without signing up with each provider separately.
Three protocols, one key
Most gateways speak OpenAI’s protocol and stop there. MirAPI implements three, each on its own base URL:
| Protocol | What it covers |
|---|---|
| OpenAI-compatible | Anything written against the OpenAI SDK, plus most of the agent ecosystem |
| Anthropic Messages | Claude Code and the Anthropic SDKs, which do not speak the OpenAI shape |
| Gemini | Google’s SDKs and the Gemini CLI |
The same key works on all three and every request draws from the same balance. That is the part that matters day to day: you are not maintaining three sets of credentials to reach three ecosystems.
Billing you can predict
- Prepaid, in USD. No subscription, no monthly fee, no minimum commitment — and the balance never expires.
- Three pricing units. Text and multimodal chat bill per token, with input, output and cache-read priced separately per million. Image generation bills per image. Video bills per second of output. Reasoning tokens count as output.
- The catalogue is the source of truth.
GET /v1/modelsreturns the exact per-million rates alongside context length and capabilities. Check it before a large run. - Top-ups lock the rate. You pay in your local currency at the day’s exchange rate; the credited amount is recorded in USD and the rate is fixed at the moment you pay.
Getting started
Create an account, top up, and generate a key. Then point any OpenAI-compatible client at the gateway:
curl https://api.mirapi.ai/v1/chat/completions \ -H "Authorization: Bearer $MIRAPI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-chat", "messages": [ { "role": "user", "content": "Say hello from MirAPI!" } ] }'The response has the same shape OpenAI returns, so nothing above the transport layer has to change.
Two things we will not do
Worth stating up front, because they are what aggregators usually get wrong:
- We never silently substitute a model. Most models are served by several upstream channels, and we route around a degraded one automatically. But if every channel for the model you asked for is down, the request fails with an error. You do not get a quietly different model and a bill for it.
- A discount badge is a price comparison, not a quality claim. It compares MirAPI’s combined input plus output price against the vendor’s official list price. Nothing more is implied.
Where to go next
- Quickstart — first request in a few minutes
- Models & pricing — the catalogue, channels, and how failover works
- Billing & top-ups — the three pricing units in detail
- Integrations — Claude Code, Codex, Cursor, LangChain, n8n and more
Go build something.