OpenRouter is the right tool when you're a solo developer poking at models. Once you're shipping AI to real users, the cracks show: a platform fee on every token, no real cost-and-quality routing, no team budgets, USD-only billing, and an analytics surface that doesn't tell you what a customer costs. Mesh API is built for the next stage.
Quick Migration
- base_url = "https://openrouter.ai/api/v1"+ base_url = "https://api.meshapi.ai/v1"- api_key = os.environ["OPENROUTER_API_KEY"]+ api_key = os.environ["MESH_API_KEY"]Why teams switch from OpenRouter
Migration steps
1. Sign up and grab a key
Takes a minute.
2. Map your models
OpenRouter uses provider-prefixed IDs (e.g., openai/gpt-4.1, anthropic/claude-opus-4-7). Mesh accepts the same strings, plus bare model IDs (gpt-4.1, claude-opus-4-7) and auto.
| OpenRouter model | Mesh API model |
|---|---|
| openai/gpt-4.1 | openai/gpt-4.1 or gpt-4.1 |
| anthropic/claude-opus-4-7 | anthropic/claude-opus-4-7 or claude-opus-4-7 |
| google/gemini-2.5-pro | google/gemini-2.5-pro or gemini-2.5-pro |
| qwen/qwen3-max | qwen/qwen3-max or qwen3-max |
| openrouter/auto | auto (and you can actually see what it picked) |
3. Swap base URL and key
Python:
from openai import OpenAI # Before | OpenRouterclient = OpenAI( base_url="https://openrouter.ai/api/v1", api_key=os.environ["OPENROUTER_API_KEY"],) # After | Mesh APIclient = OpenAI( base_url="https://api.meshapi.ai/v1", api_key=os.environ["MESH_API_KEY"],) resp = client.chat.completions.create( model="auto", messages=[{"role": "user", "content": "Hello!"}],)TypeScript:
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.meshapi.ai/v1", apiKey: process.env.MESH_API_KEY,});cURL:
curl https://api.meshapi.ai/v1/chat/completions \ -H "Authorization: Bearer $MESH_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "auto", "messages": [{"role":"user","content":"Hello!"}] }'4. Move team management into Mesh
If you've been juggling shared OpenRouter keys in a Slack channel, this is the part you'll feel right away. Create per-developer and per-environment keys with their own monthly cap, role-based access, and a single billing line.
5. Watch the spend chart drop
Mesh's smart routing picks the cheapest model that meets the quality bar for each request. Combined with zero platform fee and pre-negotiated provider rates, the blended bill typically lands ~40% lower than equivalent OpenRouter usage. Then you can decide whether to bank the savings or move to bigger models for the same budget.
What you gain on Mesh
- Zero platform fee. Whatever the model lists at, that's what you pay (often less, thanks to negotiated rates).
- Routing you can audit. Every "auto" decision shows the candidates, the scores, and the winner.
- Built for teams. RBAC, SSO, per-team budgets, audit log, ZDR.
- Multi-currency. Recharge in INR, USD, EUR, GBP, AED, and more. Useful if you're not on a US balance sheet.
- Real support. A founder is on the other end of the email, not a forum.