Migration
Migrating from TokenRouter v1
What changed in v2 and how to move over.
TokenRouter v2 is a ground-up rebuild, not an upgrade in place. The v1 gateway keeps running during the transition, but new capabilities land in v2 only.
What changed
| v1 | v2 | |
|---|---|---|
| API keys | sk-tr-... keys | New tr_ keys — v1 keys do not work against v2 |
| Endpoints | Chat completions only | /v1/chat/completions and /v1/responses are both supported, plus Anthropic-native /v1/messages and /v1/embeddings |
| Routing control | Routing rules engine | Replaced by budgets and model allowlists — simpler to reason about, enforced at the gateway |
| Spend control | Soft alerts | Hard caps per team, member, and key, with 50/80/100% alerts |
| Pricing | Usage-based | Flat subscription, zero token markup |
Migration steps
- Sign up with your v1 email — v1 customers get an extended 30-day loyalty trial automatically at signup.
- Re-add your provider keys in the console (they were never exportable).
- Create new
tr_API keys — one per app — and swap them into your deployments. - Recreate your v1 routing rules as budgets and allowlists. Most rule setups collapse into a per-team allowlist plus a hard-cap budget.
- The base URL stays
https://api.tokenrouter.io/v1— if your v1 code called chat completions, only the key changes.
New in v2 worth adopting
autoandauto:cost|latency|quality|balancedrouting — Models & routing.- Anthropic-native
/v1/messages, which means Claude Code works out of the box. - Per-member budgets and CSV usage exports.
Stuck on something v1-specific? Email support@tokenrouter.io and we’ll walk the migration with you.