Switch from OpenAI to PrivateRouter in 5 minutes.
Drop-in OpenAI-compatible. Change two lines, keep your code, cut your bill. Estimate your savings below before you commit.
Step 1
Pick your current provider
We support drop-in migration from OpenAI, Anthropic, and OpenRouter. Pick whichever you're running today.
Step 2
Drop-in replacement code
Same OpenAI SDK, same request shape. Just change base_url and your model name.
Recommended PrivateRouter model: privaterouter/qwen3-32b
Before · openai
from openai import OpenAIclient = OpenAI(api_key="$OPENAI_API_KEY",# base_url defaults to https://api.openai.com/v1)resp = client.chat.completions.create(model="gpt-4o",messages=[{"role": "user", "content": "Hello!"}],)print(resp.choices[0].message.content)
After · PrivateRouter
from openai import OpenAIclient = OpenAI(api_key="$PRIVATEROUTER_API_KEY",base_url="https://api.privaterouter.com/v1",)resp = client.chat.completions.create(model="privaterouter/qwen3-32b",messages=[{"role": "user", "content": "Hello!"}],)print(resp.choices[0].message.content)
Step 3
Estimate your savings
Grab last month's token counts from your OpenAI dashboard and we'll show you what the same workload costs on PrivateRouter.
Ready when you are
Get $10 free credit to test
No credit card required. Run a side-by-side eval against your real prompts; switch over when the numbers check out.
Sign up for freeEstimates use publicly listed prices for OpenAI and Anthropic. Your actual savings will vary based on workload, context length, and cache hit rate.