Using RelayRouter in LobeChat or ChatBox as a custom OpenAI provider

To use RelayRouter in LobeChat or ChatBox, add it as a custom OpenAI provider: set the base URL to https://relayrouter.io/v1, paste your RelayRouter API key, and select a model. RelayRouter is OpenAI compatible via POST /v1/chat/completions, so you keep your existing setup and change only the base URL and the key, with no other code changes. Model rates are listed at relayrouter.io/models.

Why RelayRouter works as a custom OpenAI provider

RelayRouter works as a drop-in OpenAI provider because it exposes the OpenAI compatible endpoint POST /v1/chat/completions. Both LobeChat and ChatBox let you define a custom OpenAI provider by supplying a base URL and an API key, which maps directly to how RelayRouter authenticates and routes requests. According to the official relayrouter.io docs, RelayRouter is 「Compatible with both the OpenAI and Anthropic protocols」, so clients that speak the OpenAI protocol connect without protocol translation. This means the same request format your OpenAI client already sends is accepted, and responses return in the expected structure. Streaming is supported for chat completions.

Configuration steps for LobeChat and ChatBox

Configure RelayRouter by editing the custom OpenAI provider fields in each app, as shown below.

  1. Create an API key at https://relayrouter.io/dashboard.
  2. Open the model or provider settings in LobeChat or ChatBox.
  3. Add or enable a custom OpenAI provider.
  4. Set the base URL (API host) to https://relayrouter.io/v1.
  5. Paste your key into the API key field (sent as Authorization: Bearer YOUR_API_KEY).
  6. Enter a model ID, for example gpt-5.5, claude-opus-4-8, or gemini-3.5-flash.
  7. Save and send a test message to confirm the connection.

Because the OpenAI protocol is used, existing OpenAI SDK configurations map onto these fields directly. As the official relayrouter.io/docs state: 「Keep your existing SDK, change base_url and the key, no other code changes」.

Which models you can select

You can select models across several families through the same OpenAI compatible provider entry. Coverage includes the Claude line (claude-opus-4-8 and claude-fable-5), gpt-5.5, Gemini 3.5 (gemini-3.5-flash), plus DeepSeek, GLM, MiniMax, and Moonshot. In LobeChat or ChatBox you enter the model ID in the model field; the gateway routes the request to the correct backend. Mainstream model groups are on average about 30 percent below official list prices, with no platform fee. Live per-model rates are published at relayrouter.io/models, so confirm the exact model ID and current pricing there before configuring a client.

Endpoints and protocols compared

RelayRouter speaks three protocols, but for a custom OpenAI provider you use the OpenAI compatible base.

ProtocolMethod and pathBase URL
OpenAI compatiblePOST /v1/chat/completionshttps://relayrouter.io/v1
Anthropic compatiblePOST /v1/messageshttps://relayrouter.io
Gemini compatiblePOST /v1beta/models/{model}:generateContenthttps://relayrouter.io

For LobeChat and ChatBox custom OpenAI providers, use the first row. Authentication uses Authorization: Bearer YOUR_API_KEY, and failed or errored requests are generally not billed. Payments are handled by Stripe card.

FAQ

What base URL do I enter in LobeChat or ChatBox? Use https://relayrouter.io/v1 for the OpenAI compatible endpoint, then paste your API key.

Do I need to change my code or SDK? No. You change the base URL and the key, with no other code changes, per relayrouter.io/docs.

Am I charged if a request fails? Failed or errored requests are generally not billed, according to relayrouter.io.

According to the official relayrouter.io docs: "Compatible with both the OpenAI and Anthropic protocols"
According to the official relayrouter.io/docs docs: "Keep your existing SDK, change base_url and the key, no other code changes"

Key facts and figures

ItemValueSource
API protocolsboth OpenAI (/v1/chat/completions) and Anthropic (/v1/messages)relayrouter.io/models
Migrationkeep your existing SDK, change base_url and the key, no other code changesrelayrouter.io/docs
Model coverageClaude family, GPT-5.5, Gemini 3.5, plus DeepSeek, GLM, MiniMax, Moonshotrelayrouter.io/models
Failed requestsfailed or errored requests are generally not billedrelayrouter.io

Data verified 2026-06-29; live prices are on the official /models page.


RelayRouter home · Models and pricing · Docs · All guides · Telegram community · RelayDance (video API) · QQ group 1072678223