Migration

Migrate from OpenRouter

Same model id format. Same OpenAI compat. Better governance, single bill, predictable pricing.

FIG.
FIG. 00 · MIGRATE FROM OPENROUTEROpenRouter · DROP-IN

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.

FIG. 01DROP-IN SWAP
SCHEMATIC
Same `creator/slug` model ids, same OpenAI-compatible wire format, same `providerOptions.gateway.{order, only, sort, models}`. The only deltas are the base URL, the key, and the per-project governance you didn't have before.

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

AspectOpenRouterSynapse Garden
Base URLhttps://openrouter.ai/api/v1https://synapse.garden/api/v1
API keysk-or-v1-...mg_live_...
Model idcreator/slugSame
OpenAI compatYesYes
Anthropic compatNoYes (/v1/messages)
Per-project keysNoYes
Spend capsAccount-level onlyPer-project
Model allowlistsNoYes
Audit logNoYes (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, sort all work the same way.
  • Model fallback chains — providerOptions.gateway.models works the same.
  • Vision, JSON mode, function calling — all unchanged.

Migration steps

01

Sign up + create a key

synapse.garden/signup → workspace → Keys → New API key.

02

Swap the env

- OPENROUTER_API_KEY=sk-or-v1-...
+ MG_KEY=mg_live_...
03

Swap the base URL in your client

Two-line config change. Model ids stay the same.

04

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).

05

Configure governance

Split traffic into projects. Set caps. Lock production to specific models.

06

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/api with the Anthropic SDK).