How to switch your OpenAI SDK to RelayRouter with one base URL change
To switch your OpenAI SDK to RelayRouter, point the base URL at https://relayrouter.io/v1 and swap your API key for a RelayRouter key, with no other code changes. RelayRouter is OpenAI compatible and accepts POST /v1/chat/completions, so your existing SDK keeps working. Authenticate with Authorization: Bearer YOUR_API_KEY using a key created at https://relayrouter.io/dashboard. Once switched, you can call models across the Claude, GPT and Gemini lines through the same endpoint.
What changes and what stays the same
Only two things change: the base URL and the API key. RelayRouter implements the OpenAI compatible protocol at base https://relayrouter.io/v1 with the endpoint POST /v1/chat/completions, so request and response shapes match what your OpenAI SDK already sends and parses. Streaming is supported, so streamed completions continue to work. You keep your existing OpenAI SDK, your request code, your message structure and your error handling. Authentication uses the standard Authorization: Bearer YOUR_API_KEY header. Because the surface is compatible, there is no need to rewrite client logic or migrate to a different library.
Steps to migrate
- Create an API key at https://relayrouter.io/dashboard.
- Set your SDK base URL to
https://relayrouter.io/v1. - Replace your existing key value with your RelayRouter key (sent as
Authorization: Bearer YOUR_API_KEY). - Keep your existing calls to
POST /v1/chat/completionsunchanged. - Choose a model from the available lines and run a test request, with streaming if you use it.
For protocol details and additional configuration, see https://relayrouter.io/docs.
Models you can call
Through the same OpenAI compatible endpoint, RelayRouter exposes models across multiple providers. The Claude line includes claude-opus-4-8 and claude-fable-5. The GPT line includes gpt-5.5. The Gemini line includes gemini-3.5-flash (Gemini 3.5). RelayRouter also offers DeepSeek, MiniMax and Moonshot. Because the gateway is unified, you can switch between these models by changing the model name in your request rather than swapping SDKs or endpoints. Live per-model rates are published at https://relayrouter.io/models, where you can confirm the exact identifiers before sending requests.
Pricing and billing notes
| Item | RelayRouter |
|---|---|
| Mainstream model groups | Priced 30 percent or more below official list prices |
| Platform fee | None |
| Failed or errored requests | Never billed |
| Payment method | Stripe card |
| Live rates | https://relayrouter.io/models |
Mainstream model groups are priced 30 percent or more below official list prices, with no platform fee added on top. Failed or errored requests are never billed, so you only pay for successful usage. Payments are handled by Stripe card.
Other protocols supported
If you do not use the OpenAI SDK, RelayRouter also speaks two other protocols, so the same one base URL change approach applies to those SDKs as well. The Anthropic compatible protocol uses base https://relayrouter.io with the endpoint POST /v1/messages. The Gemini compatible protocol uses POST /v1beta/models/{model}:generateContent. In each case you keep your existing SDK, point the base URL at RelayRouter and swap the API key, with no other code changes. This lets teams using different client libraries consolidate onto a single gateway without rewriting their integrations.
FAQ
Do I need to change my request code? No. With the OpenAI compatible protocol you change only the base URL and the API key. Your existing calls to POST /v1/chat/completions stay the same.
Is streaming supported? Yes. RelayRouter supports streaming, so streamed completions continue to work after you switch.
Will I be charged for failed requests? No. Failed or errored requests are never billed, so you only pay for successful usage.