Migration Guides

Migrate from OpenRouter to Railwail

Compare OpenRouter and Railwail. Both unify multiple AI models behind one API.

Railwail2 Min. Lesezeit

Mit KI-Unterstützung erstellt.

Migrate from OpenRouter to Railwail
01 · Das Wichtigste

TL;DR — Switch in Under 5 Minutes

  • Both APIs are OpenAI-compatible — change baseURL and key
  • Railwail has direct provider contracts (vs OpenRouter's mixed credit-pool approach)

Auf Railwail ausprobieren

Claude Sonnet 4.6 ausführen

Anthropic$ 3,60/1 Mio. InAbrechnung nach Verbrauch

Anthropic's balanced mid-tier model from February 2026. Best price/performance for production workloads: 5x cheaper than Opus, near-flagship quality.

02

Why Move Off OpenRouter?

OpenRouter is one of the original AI aggregators. It works well for personal projects and US-based teams.

03

Step 1 — Get a Railwail API Key

Sign up at railwail.com and generate a key.

04

Step 2 — Change Base URL

Before (OpenRouter):

import OpenAI from "openai";

const or = new OpenAI({
  apiKey: process.env.OPENROUTER_API_KEY,
  baseURL: "https://openrouter.ai/api/v1",
  defaultHeaders: {
    "HTTP-Referer": "https://your-app.com",
    "X-Title": "My App",
  },
});

const res = await or.chat.completions.create({
  model: "anthropic/claude-3.5-sonnet",
  messages: [{ role: "user", content: "Hello" }],
});

After (Railwail):

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.RAILWAIL_API_KEY,
  baseURL: "https://railwail.com/api/v1",
});

const res = await client.chat.completions.create({
  model: "claude-sonnet-4-6",
  messages: [{ role: "user", content: "Hello" }],
});

The OpenRouter-specific HTTP-Referer and X-Title headers are not needed.

05

API Endpoint Mapping

OpenRouter endpoint → Railwail equivalent
OpenRouterRailwailNotes
POST /api/v1/chat/completionsPOST /api/v1/chat/completionsIdentical
GET /api/v1/modelsGET /api/v1/models200+ models
GET /api/v1/generation/{id}GET /api/v1/jobs/{id}Per-call cost lookup
06

Model Mapping

OpenRouter slug → Railwail slug
OpenRouterLive auf RailwailRailwailNotes
openai/gpt-4o$ 3,00/1 Mio. Ingpt-4ogpt-4oSame OpenAI model
openai/gpt-4o-mini$ 0,18/1 Mio. Ingpt-4o-minigpt-4o-miniSame
anthropic/claude-3.5-sonnet$ 3,60/1 Mio. Inclaude-sonnet-4-6claude-sonnet-4-6Successor
anthropic/claude-3.5-haiku$ 1,20/1 Mio. Inclaude-haiku-4-5claude-haiku-4-5Successor
google/gemini-2.5-pro$ 1,50/1 Mio. Ingemini-2-5-progemini-2.5-proSame
deepseek/deepseek-chat$ 0,36/1 Mio. Indeepseek-v4-flashdeepseek-v4-flashSuccessor
deepseek/deepseek-r1$ 1,584/1 Mio. Indeepseek-v4-prodeepseek-v4-proSuccessor
07

Why Railwail Over OpenRouter

  • Direct provider contracts on Anthropic, OpenAI, Google (vs OpenRouter's mixed routing)
  • No required HTTP-Referer or X-Title headers
  • Built-in playground for model A/B testing in browser
  • Spend caps, per-key rate limits, audit logs
08

FAQ

Is the model catalog the same?

OpenRouter has ~250 models, Railwail has 200+. The major frontier models are mirrored on both. Long-tail community fine-tunes may only be on one or the other — check railwail.com/models?search=<model> first.

What about OpenRouter's auto-routing and fallback?

Railwail does not route or fall back automatically; you pick the model per call.

Can I keep my OpenRouter credits?

OpenRouter credits are non-transferable. Run both providers in parallel during the migration — use up your OpenRouter balance while ramping up Railwail traffic.

Are usage statistics exportable?

Yes. Railwail dashboard exports per-model usage as CSV.

Does it support structured output (json_schema)?

Yes. response_format with json_schema works for any model that supports it upstream (GPT-4o, Claude, Gemini).

09

Next Steps

  • Sign up at railwail.com
  • Generate an API key
  • Update baseURL to https://railwail.com/api/v1
  • Translate slugs (drop the provider/ prefix)
  • Read the reference at railwail.com/docs
  • Browse models at railwail.com/models
  • Compare pricing at railwail.com/pricing
  • View providers at railwail.com/providers
Live

Modelle in diesem Artikel

Aktuelle Preise nach den Railwail-Preisregeln, Stand 5. Dezember 2026.

≈ abgerechnet nach tatsächlichen Tokens bzw. GPU-Zeit

Nächster Schritt

Claude Sonnet 4.6 auf Railwail ausprobieren

Mit Google anmelden und 10 Gratis-Credits erhalten (nutzbar 24 Stunden nach der Anmeldung, Läufe bis 2 Credits) oder ab $ 5,00 aufladen. Nicht genutztes Guthaben verfällt nicht.

ThemenOpenRouterMigrationMulti-ModelAPIAggregator