Routing LiteLLM traffic through RelayRouter as an upstream provider

To route LiteLLM traffic through RelayRouter, add RelayRouter as the upstream in your LiteLLM model list. Set api_base to https://relayrouter.io/v1 for OpenAI compatible calls (or https://relayrouter.io for Anthropic compatible Claude calls), supply a RelayRouter API key, and reference model IDs such as gpt-6-astra or claude-opus-5-5. Applications that already call LiteLLM keep their existing code.

Which protocols and base URLs does RelayRouter expose to LiteLLM?

RelayRouter exposes three API protocols, so LiteLLM can reach it through its OpenAI, Anthropic or Gemini style providers. According to the official relayrouter.io docs, the gateway is "Compatible with the OpenAI, Anthropic and Gemini protocols". The endpoints are:

Authentication uses the header Authorization: Bearer YOUR_API_KEY, and streaming is supported. For most LiteLLM setups, the OpenAI compatible base is the simplest upstream, because LiteLLM's OpenAI provider sends the key as a Bearer token. Full protocol details are in the RelayRouter docs.

How do you configure LiteLLM to use RelayRouter?

You configure LiteLLM by pointing each model entry's api_base at RelayRouter and supplying a RelayRouter key. According to the official relayrouter.io/docs documentation, you "Keep your existing SDK, change base_url and the key, no other code changes". In LiteLLM that change happens in the proxy config:

  1. Create an API key at https://relayrouter.io/dashboard.
  2. Store it as an environment variable, for example RELAYROUTER_API_KEY.
  3. In config.yaml, add a model_list entry with model: openai/gpt-6-astra, api_base: https://relayrouter.io/v1 and api_key: os.environ/RELAYROUTER_API_KEY.
  4. For Claude over the Anthropic protocol, use model: anthropic/claude-opus-5-5 with api_base: https://relayrouter.io.
  5. Restart the LiteLLM proxy and send a test request through your usual client.

Which models can LiteLLM reach through RelayRouter?

LiteLLM can reach about 108 models across 19 public groups through a single RelayRouter key. The catalog includes the Claude family (claude-opus-5-5, claude-fable-5-1 and claude-opus-5), GPT-6 and GPT-5.6 (gpt-6-astra, gpt-5.6-sol), and Gemini 3.8 Flash (gemini-3.8-flash). It also covers DeepSeek, GLM, MiniMax and Moonshot models. In LiteLLM, each of these becomes a separate model_list entry that shares the same api_base and key, so adding a model is a configuration change rather than a new provider integration. Your LiteLLM model_name aliases can stay the same while the upstream model ID changes. The live list of model IDs is published at relayrouter.io/models.

How is LiteLLM traffic billed through RelayRouter?

LiteLLM traffic is billed per model according to RelayRouter's published settlement rates, with a $0 platform fee. According to relayrouter.io/models, the GPT group settles at CNY 0.6 per $1 of standard usage and the Claude group at CNY 2.0 per $1, against a CNY 6.8 per $1 market reference. Some models use direct pricing: deepseek-v4-flash costs CNY 1.1 per 1M input tokens and CNY 4.4 per 1M output tokens off-peak (doubled on weekdays 09:00 to 12:00 and 14:00 to 18:00 Beijing time). Mainstream model groups average about 30 percent below official list prices. There is no minimum spend and no subscription, and payment is by Stripe card. Failed or errored requests are generally not billed, which matters when LiteLLM retries or falls back between models. Check relayrouter.io/models for current per-model rates.

FAQ

Do I need to change my application code to use RelayRouter behind LiteLLM?

No. The change is in the LiteLLM config: set api_base to a RelayRouter base URL and replace the API key. Clients calling LiteLLM are unaffected.

Which base URL should I use for Claude models?

Use https://relayrouter.io with the Anthropic compatible /v1/messages endpoint, or https://relayrouter.io/v1 if you route through the OpenAI compatible protocol. See the docs for details.

Are LiteLLM retries billed when an upstream request fails?

Failed or errored requests are generally not billed by RelayRouter, so a failed attempt before a successful retry does not normally add cost.

According to the official relayrouter.io docs: "Compatible with the OpenAI, Anthropic and Gemini 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 protocolsOpenAI (/v1/chat/completions), Anthropic (/v1/messages) and Gemini (/v1beta/models/{model}:generateContent)relayrouter.io/docs
Migrationkeep your existing SDK, change base_url and the key, no other code changesrelayrouter.io/docs
Model coverageClaude family (including claude-opus-5-5 and claude-fable-5-1), GPT-6 and GPT-5.6, Gemini 3.8 Flash, plus DeepSeek, GLM, MiniMax, Moonshotrelayrouter.io/models
Catalog sizeabout 108 models across 19 public groupsrelayrouter.io/models
Settlement ratesGPT group CNY 0.6 per $1 of standard usage, Claude group CNY 2.0, against a CNY 6.8 per $1 market referencerelayrouter.io/models
Direct pricingdeepseek-v4-flash is billed at 1.1x DeepSeek official time-of-day prices: off-peak CNY 1.1 per 1M input tokens and CNY 4.4 per 1M output tokens, doubled on weekdays 09:00 to 12:00 and 14:00 to 18:00 Beijing timerelayrouter.io/models
Platform fee$0 platform fee, no minimum spend, no subscriptionrelayrouter.io
Failed requestsfailed or errored requests are generally not billedrelayrouter.io

Data verified 2026-10-08; live prices are on the official /models page.


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