RouterHub as an OpenRouter alternative
RouterHub offers a prepaid API with published token prices and exact model IDs, including abliterated GLM and DeepSeek entries. If your app already uses Chat Completions, you can try RouterHub without replacing the SDK. Some OpenRouter features and request options do not carry over.
When to use each service
- Try RouterHub if the model you want is in the RouterHub catalogue and you want to compare published rates for standard and abliterated variants. Start with the model you intend to call and verify its protocol before changing the client.
- Keep OpenRouter if your application relies on its provider selection options or an integration that you have not tested on RouterHub. Check OpenRouter’s current documentation for its supported features.
RouterHub and OpenRouter are separate services. This is a first-party RouterHub migration guide, not an independent benchmark or a claim that one service is always cheaper.
Choose a RouterHub model ID
Do not copy a model slug from another service without checking it. For example, glm-5.3-abliterated and deepseek-v4.1-flash-abliterated are RouterHub IDs that use Chat Completions. See the abliterated model catalogue or the GLM 5.3 comparison for current prices and options. The model name alone does not guarantee behavior or identify the weights used.
Move a Chat Completions client to RouterHub
- Create a RouterHub API key with an appropriate spend limit. Store it locally as
ROUTERHUB_API_KEY; don’t reuse a key from a different service. - Set the OpenAI SDK base URL to
https://routerhub.si/v1. Select the exact RouterHub model ID and remove service-specific routing options from the test request. - Run one small request. The example consumes prepaid credits and disables automatic retries so a failed attempt is easier to reconcile.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://routerhub.si/v1",
api_key=os.environ["ROUTERHUB_API_KEY"],
max_retries=0,
)
result = client.chat.completions.create(
model="glm-5.3-abliterated",
messages=[{"role": "user", "content": "Explain a cache hit in two sentences."}],
max_tokens=128,
)
print(result.choices[0].message.content)
For an existing OpenCode or Continue installation, follow the OpenCode guide or the Continue guide. If your application instead needs Responses or Anthropic Messages, choose a compatible entry from the public catalogue; the GLM example is Chat Completions only.
What to verify before switching traffic
Test response parsing, streaming completion, and any tool calls your application uses. Compare cost per successful task rather than only input price. Include output, reported cache usage, retries, and latency. Keep your current configuration available until the new path passes these checks. If a request times out, check Usage before retrying a paid call.
References: OpenRouter quickstart, RouterHub quickstart, and RouterHub OpenAPI schema.