Text Generator Brain Text Generator

LLM Routing: One API Key for Many Providers

Text Generator > Blog > LLM Routing: One API Key for Many Providers

LLM Routing: One API Key for Many Providers

Every model provider has its own SDK, key, billing page, and rate limits. A router gives you one front door instead. You send an OpenAI style request, name a model, and the router handles the rest.

What you get with one endpoint

  • One client library. Point any OpenAI SDK at https://api.text-generator.io/v1 and call /v1/chat/completions.
  • Many providers. The provider catalogue includes OpenAI, Anthropic, Google, xAI, Moonshot AI, DeepSeek, Mistral, Groq, OpenRouter, Together, MiniMax, Z.AI, NVIDIA, Fireworks, and Nous Research.
  • One bill. Usage is metered in one place, so comparing models on cost is easy.
  • Fallbacks. Models list alternates, for instance Kimi K3 can continue on an OpenRouter route or Kimi K2.5 if the primary route is unavailable.

Switching models is a string change

curl https://api.text-generator.io/v1/chat/completions \
              -H "Authorization: Bearer $API_KEY" \
              -H "Content-Type: application/json" \
              -d '{"model": "kimi-k3", "messages": [{"role": "user", "content": "Summarize this changelog"}]}'

Change kimi-k3 to gpt-5.4, deepseek-chat, or gemini-2.5-flash and the same request shape works. Aliases such as kimi and luna are available for convenience.

Routing patterns that work well

  1. Default to an auto profile. Use text-generator/auto for general traffic and let the router choose.
  2. Pin a model for regression tests. Fixed names give repeatable comparisons.
  3. Split by task. Send extraction to auto-cheap, coding to auto-code, screenshots to auto-vision.
  4. Route long documents to long windows. Several catalogue models offer 1M tokens of context.
  5. Record the model per request so you can trace quality or cost changes.

Bring your own keys

If you already hold provider keys, the platform supports bringing them, which lets you keep existing provider agreements while using one interface. See the docs for setup.

Discover models programmatically

The catalogue is available as JSON at /api/models and /api/providers, so your own tools can list available models, context sizes, and prices without scraping a page.

Create a key, send one request, then change the model name and compare the results. It takes a couple of minutes.

Get started free