PhaseoPhaseo
PhaseoPhaseo
Checking statusChecking statusVisit status page
Component-level status is unavailable.

Explore

  • Models
  • Chat
  • Providers
  • Apps
  • Rankings
  • Tools
  • Monitor

Resources

  • Compare
  • Migration Guides
  • Methodology
  • Blog

Community

  • Discord
  • GitHub
  • LinkedIn
  • Reddit
  • X

Build

  • Documentation
  • API Reference
  • Quickstart
  • SDKs

Company

  • About
  • Trust Centre
  • Mission
  • Pricing
  • Works With
  • Acknowledgements
  • Support
  • Privacy
  • Terms

Explore

  • Models
  • Chat
  • Providers
  • Apps
  • Rankings
  • Tools
  • Monitor

Build

  • Documentation
  • API Reference
  • Quickstart
  • SDKs

Resources

  • Compare
  • Migration Guides
  • Methodology
  • Blog

Company

  • About
  • Trust Centre
  • Mission
  • Pricing
  • Works With
  • Acknowledgements
  • Support
  • Privacy
  • Terms

Community

  • Discord
  • GitHub
  • LinkedIn
  • Reddit
  • X

© 2025 • Phaseo

Report:Issue·Support

Spotted a data issue or broken page?Open an issueorcontact support

PhaseoPhaseo
ModelsChatCompareProvidersAppsRankings
ModelsChatCompareProvidersAppsRankings
Back to all migration guides
OpenRouter10 min readUpdated 2026-08-19

OpenRouter Alternative: Migrate to Phaseo Gateway

Looking for an OpenRouter alternative? Migrate to Phaseo with an OpenAI-compatible endpoint, model checks, code examples, streaming tests, and rollback steps.

Try Phaseo Compare Phaseo and OpenRouter

For coding agents

Give this to your coding agent

Paste this into your coding agent when you want OpenRouter removed, not kept as a fallback. The prompt links to the maintained skill and defines when the cutover is done.

Read and follow the Phaseo OpenRouter migration skill before editing:
https://github.com/phaseoteam/Phaseo/blob/main/.agents/skills/openrouter-to-phaseo-migration/SKILL.md

Hard-cut this repository from OpenRouter to Phaseo Gateway. Make the changes. Do not stop after an audit or return only a migration plan.

Use the skill for inventory, model checks, behavior mapping, and validation. For this task, the hard cutover overrides its staged-rollout advice. Do not leave a dual-gateway switch, OpenRouter fallback, compatibility environment variable, or dormant OpenRouter client behind.

Find openrouter.ai, OPENROUTER_API_KEY, sk-or-v1, HTTP-Referer, X-Title, OpenRouter packages, provider options, model variants, and response fields across runtime code, tests, deployment config, secret references, examples, and user-facing docs. Replace the gateway boundary with https://api.phaseo.app/v1 and PHASEO_API_KEY. Preserve existing request, streaming, tool-calling, structured-output, and error behavior where Phaseo supports it.

Check every production model against /v1/models. Keep provider-prefixed ids when they are valid. Put required aliases and OpenRouter-only response handling in one boundary adapter. Translate supported routing controls deliberately. If Phaseo cannot match a behavior, fail clearly and record the gap instead of guessing or silently dropping it.

Remove OpenRouter runtime dependencies and obsolete configuration once callers use Phaseo. Never commit, print, or expose secret values. Do not make live provider calls unless suitable credentials are already available and the repository's test policy permits them.

Run the narrowest relevant tests while editing, then run the repository's normal quality gates. When credentials are available, verify /v1/health, /v1/models, one non-streaming request, one streaming request, and one invalid-key or invalid-model failure. If a live check cannot run, say exactly why and leave the command ready to execute.

Finish with the changed files, old-to-new credential names, model mappings, removed OpenRouter dependencies, test evidence, live-check evidence, remaining parity gaps, and a patch-level rollback procedure. The migration is complete only when no active runtime or deployment path still depends on OpenRouter.
Read the migration skill

Prerequisites

  • Access to your current OpenRouter integration code and deployment config.
  • A Phaseo API key stored as `PHASEO_API_KEY` in each target environment.
  • A list of production model IDs currently used by your application.

Is Phaseo an alternative to OpenRouter?

Yes. Phaseo is an OpenAI-compatible AI gateway for accessing models across providers through one API. An existing OpenRouter integration can usually move at the client boundary by changing the base URL, API key, and any model IDs that do not match the Phaseo catalog.

Stripe confirmed its acquisition of OpenRouter on 19 August 2026. Teams reviewing gateway concentration, portability, or vendor independence can use this guide to test Phaseo without committing all production traffic at once.

Checklist

  • Phaseo base URL: `https://api.phaseo.app/v1`.
  • Phaseo credential: `PHASEO_API_KEY`.
  • Authentication stays `Authorization: Bearer <key>`.
  • Chat Completions supports non-streaming and streaming requests.
  • Model IDs must be checked against `GET /v1/models` before cutover.

1. Inventory current OpenRouter usage

Start by identifying every place OpenRouter is referenced: endpoint URLs, keys, model IDs, and provider-specific headers.

Keeping the migration boundary small lowers risk. Usually, updating one gateway client module is enough.

Checklist

  • Find `openrouter.ai` endpoint references.
  • Find `OPENROUTER_API_KEY` usage in code, CI, and hosting env vars.
  • Find OpenRouter-only headers such as `HTTP-Referer` and `X-Title`.
  • Document currently used model IDs and any fallback chain logic.

2. Switch the base URL and credentials

Replace the OpenRouter base URL with Phaseo and move authentication to `PHASEO_API_KEY`.

Keep request payload shape unchanged first. Do behavior parity before optimization.

Before (OpenRouter + OpenAI SDK)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.OPENROUTER_API_KEY,
  baseURL: "https://openrouter.ai/api/v1",
});

const response = await client.chat.completions.create({
  model: "openai/gpt-4.1-mini",
  messages: [{ role: "user", content: "Summarize our migration plan." }],
});
After (Phaseo Gateway + OpenAI SDK)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.PHASEO_API_KEY,
  baseURL: "https://api.phaseo.app/v1",
});

const response = await client.chat.completions.create({
  model: "openai/gpt-4.1-mini",
  messages: [{ role: "user", content: "Summarize our migration plan." }],
});
Environment Variable Rename
# Before
OPENROUTER_API_KEY=...

# After
PHASEO_API_KEY=...

3. Validate model IDs and OpenRouter-specific behavior

Do not assume every old model alias is valid. Query `/v1/models` and verify each production model ID.

If your app consumed OpenRouter-specific response fields, adapt at one compatibility layer instead of changing every caller.

Checklist

  • Keep `Authorization: Bearer` format unchanged.
  • Retain attribution headers only if you still need them for analytics.
  • Test both non-streaming and streaming chat paths before rollout.
Check Model List From Phaseo
curl -s "https://api.phaseo.app/v1/models" \
  -H "Authorization: Bearer $PHASEO_API_KEY" | jq '.data[0:10] | map(.id)'
Optional Model Alias Compatibility Map
const MODEL_ALIASES: Record<string, string> = {
  "openai/gpt-4.1-mini": "openai/gpt-4.1-mini",
  "anthropic/claude-3.5-sonnet": "anthropic/claude-3.5-sonnet",
};

export function resolveModelId(input: string): string {
  return MODEL_ALIASES[input] ?? input;
}

4. Test streaming and roll out safely

Use a staged rollout: dev first, then a small production slice, then full traffic once metrics are stable.

Track latency, error rate, and token/cost drift. Roll back by switching only endpoint+key config if needed.

Checklist

  • Start with internal traffic only.
  • Move to 5-10% production traffic and compare quality/cost metrics.
  • Promote to 100% after parity is confirmed.

Validation steps

  1. curl -s "https://api.phaseo.app/v1/health"
  2. curl -s "https://api.phaseo.app/v1/models" -H "Authorization: Bearer $PHASEO_API_KEY"
  3. curl -s "https://api.phaseo.app/v1/chat/completions" -H "Content-Type: application/json" -H "Authorization: Bearer $PHASEO_API_KEY" -d '{"model":"openai/gpt-4.1-mini","messages":[{"role":"user","content":"Say hello"}]}'
  4. Run one streaming request through your app-level integration test.
  5. Run one negative test (invalid key or invalid model) to verify failure handling.

Frequently asked questions

What is the best alternative to OpenRouter?
The best alternative depends on your stack. Phaseo is a strong fit when you need one OpenAI-compatible API, multi-provider model access, public model and pricing intelligence, routing controls, and request observability. Test your own models, latency, output quality, and costs before moving production traffic.
Why migrate from OpenRouter after the Stripe acquisition?
An acquisition does not require an immediate migration. It is a sensible time to test a second gateway, document a rollback path, and reduce reliance on one routing and billing platform. Phaseo can run as a canary or fallback before a full cutover.
Do I need to rewrite prompts or message payloads?
No. Most teams keep payloads the same and only switch base URL, key source, and optional model alias mapping.
Can I keep provider-prefixed model IDs?
Often yes, but verify against `/v1/models`. If your existing aliases differ, normalize them in one boundary function.
Can I use Phaseo and OpenRouter at the same time?
Yes. Keep gateway configuration behind one client factory or environment switch, then send a small traffic percentage to Phaseo. This also gives you a fast rollback path while you compare reliability, latency, quality, and cost.
Can an agent migrate an OpenRouter integration automatically?
Yes. Ask the agent to find `openrouter.ai`, `OPENROUTER_API_KEY`, `sk-or-v1`, `HTTP-Referer`, and `X-Title`; replace the endpoint and secret name; verify models with `/v1/models`; then test health, non-streaming, streaming, and failure paths. Never place secret values in source control.

Migration resources

  • Compare Phaseo and OpenRouter
  • OpenRouter to Phaseo migration skill for coding agents

Want us to handle your migration?

Get in touch and we'll help move your OpenRouter integration to Phaseo for free, including the endpoint switch, model checks, and migration review.

Get Free Migration Help
Sign Up