Framework · Orchestration Frameworks

OpenRouter

Hosted LLM aggregator that exposes a single OpenAI-compatible endpoint over hundreds of models from many providers, with built-in provider routing, automatic fallback, price-weighted load balancing, and an Auto Router that picks the best model per prompt.

Description

OpenRouter is a commercial LLM aggregation service. Applications point at a single OpenAI-compatible endpoint and select a model by string identifier; OpenRouter handles authentication to the underlying provider, load-balances across providers prioritising price, falls back to the next provider on error, and offers an Auto Router (openrouter/auto, powered by NotDiamond) that selects the best model per prompt. Callers can customise routing via a `provider` object (e.g. explicit `order` of provider slugs). It is not a developer SDK in the build-your-agent sense — it is a hosted service end-user applications consume.

Solution

Hosted routing gateway. The application issues an OpenAI-style chat completion request to OpenRouter's endpoint with a model identifier (a specific model or a routing variant such as openrouter/auto). OpenRouter dispatches to one of the backing providers — by default load-balancing across the top providers weighted by inverse-square of price — applies fallback on errors, accounts cost, and streams the response back. Stateless per request; routing policy lives in the model slug, the optional `provider` object, and account settings.

Primary use cases

  • unified access to many model providers from one endpoint
  • provider fallback and price-weighted load distribution
  • cost-aware automatic model selection via Auto Router
  • OpenAI-compatible drop-in for multi-provider apps

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.