Migrate from OpenRouter
Same model id format. Same OpenAI compat. Better governance, single bill, predictable pricing.
OpenRouter and Synapse Garden share the same creator/model-slug model id format and OpenAI-compatible wire shape. Migration is just a base URL and an API key — and the same swap works for the AI SDK's streamText when you want a more idiomatic TypeScript surface.
Diff
import OpenAI from "openai"
const client = new OpenAI({
- apiKey: process.env.OPENROUTER_API_KEY,
- baseURL: "https://openrouter.ai/api/v1",
+ apiKey: process.env.MG_KEY,
+ baseURL: "https://synapse.garden/api/v1",
})
await client.chat.completions.create({
model: "anthropic/claude-opus-4.6", // ← same format, no change needed
messages: [{ role: "user", content: "..." }],
})Model names with creator/slug syntax — already what you're using on OpenRouter — pass straight through.
What changes
| Aspect | OpenRouter | Synapse Garden |
|---|---|---|
| Base URL | https://openrouter.ai/api/v1 | https://synapse.garden/api/v1 |
| API key | sk-or-v1-... | mg_live_... |
| Model id | creator/slug | Same |
| OpenAI compat | Yes | Yes |
| Anthropic compat | No | Yes (/v1/messages) |
| Per-project keys | No | Yes |
| Spend caps | Account-level only | Per-project |
| Model allowlists | No | Yes |
| Audit log | No | Yes (90-day Pro+) |
What you gain
- Multiple compat surfaces. OpenAI and Anthropic SDKs both work — pick whichever your team prefers.
- Per-project governance. OpenRouter is account-scoped; we're project-scoped. Spend caps, allowlists, rate limits are all configurable per project.
- Audit log. Every key action and mutation is logged. Useful for SOC 2, internal compliance, postmortems.
- Predictable plan + overage — flat included tokens per plan, overage at list rate. No "credits expire" surprises.
What stays the same
- Streaming.
- Tool use.
- Provider routing semantics —
providerOptions.gateway.order,only,sortall work the same way. - Model fallback chains —
providerOptions.gateway.modelsworks the same. - Vision, JSON mode, function calling — all unchanged.
Migration steps
Sign up + create a key
synapse.garden/signup → workspace → Keys → New API key.
Swap the env
- OPENROUTER_API_KEY=sk-or-v1-...
+ MG_KEY=mg_live_...Swap the base URL in your client
Two-line config change. Model ids stay the same.
Confirm token usage in the dashboard
Dashboard → Usage → Recent requests. Token counts and costs should match what you saw on OpenRouter (we pull from the same upstream providers).
Configure governance
Split traffic into projects. Set caps. Lock production to specific models.
Decommission OpenRouter
Once you've run a week clean, revoke the OpenRouter key.
Provider routing translation
Both platforms use providerOptions.gateway.{order, only, sort, models} — drop your OpenRouter routing config in unchanged:
providerOptions: {
gateway: {
order: ["bedrock", "anthropic"],
sort: "cost",
models: ["openai/gpt-5.4-mini"], // fallback chain
},
}Resolution order is identical: order first, sort for the rest, only filters, models provides cross-model fallback.
Pricing
Compare your OpenRouter bill (per-token rate × usage) against our /pricing page. For most accounts, Synapse Garden is comparable on the per-token rate, with a small included-tokens floor at the plan tier.
If you're a heavy OpenRouter user (>10M tokens/mo), our Pro ($50/mo, 100M included) or Agency ($200/mo, 500M included) plans usually come out ahead.
Caveats
- Provider preferences — OpenRouter has its own provider preference UI; ours is the same
providerOptions.gateway.*API. Per-account preference UI is on the dashboard roadmap. - Model availability — every model in OpenRouter's catalog is in ours, but new models can land at slightly different times. Check /models for current availability.
- Free tier — both platforms have free tiers; ours is plan-based (1M tokens/mo) rather than per-model.
- Anthropic SDK compat — OpenRouter doesn't speak the Anthropic Messages format directly; we do (
https://synapse.garden/apiwith the Anthropic SDK).