Skip to content
NEWgpt-6-luna removed from Codex Plus / Codex Pro: switch to gpt-5.6-lunaView pricing
HopBase
← Back to blog

One API Key, Multiple Routing Groups: How Group-Based Routing Cuts LLM API Costs

One API Key, Multiple Routing Groups: How Group-Based Routing Cuts LLM API Costs

The short answer: on a gateway, the same model is priced differently depending on which group your key uses, and choosing the right group often saves more than switching to a cheaper model. HopBase groups trade service quality against price, and they typically fall into three types (actual group names in the console vary): a stable tier offers multi-source redundancy and automatic request-level failover at the standard rate, a fast tier prioritizes first-token latency at a slightly higher rate, and an economy tier has the lowest rate but may queue at peak. Two groups serving the same model cannot share a key, so keep tiers on separate keys and switch by swapping keys or editing a key's groups in the console, with no code changes. A solo developer can use a stable-tier group for coding and an economy-tier group for tests and batch scripts; a team can put production on the stable tier and CI on the economy tier; bulk content jobs can run on the economy tier off-peak. Optimize in this order: capture prompt-cache savings first, pick the right group second, and only then consider changing models.

When optimizing LLM API costs, most people's first instinct is "pick a cheaper model." But in the real bills we see, the bigger savings usually come from "same model, different routing path." This article explains how group routing works and how to dial in a cost-saving setup that fits your usage pattern.

What Are Groups?

A gateway organizes model access into groups by "service quality × price." The same model costs differently depending on which group's key you use. The table shows three typical group types; actual group names in the console vary:

Group typePositioningBest for
Stable tierMulti-source redundancy, automatic failover, standard rateProduction integrations, daily development workhorse
Fast tierFirst-token latency priority, slightly higher rateLatency-sensitive interactive sessions
Economy tierLowest rate, may queue at peakBatch jobs, offline processing, testing

A key can include one or more groups, but two groups that serve the same model can't share a key — so tiers of the same model live on separate keys. Switching tiers doesn't require code changes — just swap which key you use or change the key's groups in the console.

Automatic Failover Means What?

Stable-tier groups run on redundant routes. If one route gets throttled or unstable, the gateway switches automatically at request level — your caller only sees "that one was a bit slower," not a 5xx error. You don't have to write retry logic, circuit breakers, or multi-vendor adapters yourself — that's the whole point of a gateway.

Setup Recommendations for Three Profiles

  1. Solo developer: One key on a stable-tier group for coding; a second key on an economy-tier group for test runs and batch scripts. Two keys, separate billing views, crystal-clear cost breakdown.
  2. Small team: Distribute keys by role (frontend, CI, production). Production uses the stable tier, CI the economy tier. CI pulls full caching discounts — often your bill rounds down to negligible.
  3. Content / data bulk processing: Route everything through the economy tier, schedule batch runs in off-peak hours. Any time-sensitive final validation goes to the stable tier.

Order of Cost Optimization

First, capture cache discounts (prompt rewrite, zero cost). Second, pick the right group (architecture decision, configure once). Third, consider model changes (quality tradeoff, move carefully). Follow that order and most bills drop noticeably without sacrificing quality — your usage page never lies.