Hello, MirAPI
What we built and why: one gateway in front of 200+ AI models, with three protocols and a single prepaid USD balance.
We’ve been building MirAPI for a while, and today we’re opening the doors. It’s for anyone who has juggled a dozen provider accounts, reconciled a dozen invoices or wished a coding agent could spend from one balance.
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 don’t use the OpenAI format |
| Gemini | Google’s SDKs and the Gemini CLI |
The same key works on all three, and every request draws from the same balance, so you don’t manage three sets of credentials for three ecosystems.
Billing you can predict
- Prepaid, in USD. There is no subscription, monthly fee or minimum commitment, and the balance never expires.
- Three pricing units. Text and multimodal chat are billed per token, with input, output and cache reads each priced separately per 1M tokens. Image generation is billed per image. Video is billed per second of output. Reasoning tokens count as output.
- The catalog is the source of truth.
GET /v1/modelsreturns the exact per-1M 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
Aggregators usually get these wrong, so we’re stating them up front:
- We never silently substitute a model. Most models are served by several upstream channels; you pick a primary and a backup, and if the primary degrades, we fail over to your backup automatically. If both are down, the request fails with an error. You’re never quietly switched to a different model and billed for it.
- A discount badge makes no claim about quality. It compares only MirAPI’s combined input-plus-output price with the vendor’s official list price.
Where to go next
- Quickstart: your first request in a few minutes
- Models & pricing: the catalog, channels and how failover works
- Billing & top-ups: the three pricing units in detail
- Integrations: Claude Code, Codex, Cursor, LangChain, n8n and more