Skip to main content
OpenRouter is a unified API gateway to hundreds of models from every major provider (Anthropic, OpenAI, Google, Mistral, Meta, DeepSeek, and more). One API key, one billing relationship, hundreds of models. This is the right pick when you want to A/B test models freely, avoid lock-in, or simplify procurement.

Installation

Environment Setup

Get an API key at openrouter.ai/keys.

Quick Start

OpenRouter model names follow the pattern openrouter/<provider>/<model>:
Browse the full catalog for hundreds more.

Tool Use

Tools work on OpenRouter for any underlying model that supports function calling:

Streaming

A/B Testing Models

Because every model is available through the same key, OpenRouter is ideal for running side-by-side comparisons:

Provider Routing

OpenRouter automatically routes between provider hosts for the same model. You can pin to a specific provider or let OpenRouter pick the cheapest/fastest:

Production Defaults

Next Steps