OpenRouter
apiby openrouter
One API key for 400+ AI models. Access GPT, Claude, Gemini, Llama, and more through a single, OpenAI compatible endpoint.
Key features
Free tier available
Developers who want one API key for every AI model instead of managing accounts with OpenAI, Anthropic, Google, and others separately
One API key, one billing account, and one integration for 400+ models. Massively reduces the overhead of working with multiple AI providers.
What it does
Unified API (OpenAI Compatible)
A single endpoint that accepts the same format as the OpenAI API. Switch between any of the 400+ models by changing a single parameter. Most OpenAI SDK code works with no changes beyond the base URL.
Learn more400+ Models from 60+ Providers
Access models from OpenAI, Anthropic, Google, Meta, Mistral, Cohere, and dozens of other providers. New models are typically available within hours of launch.
Learn moreIntelligent Provider Routing
OpenRouter automatically routes your requests to the fastest, cheapest, or most reliable provider for each model. You can also set routing preferences manually.
Learn moreAutomatic Fallbacks
If a provider goes down or returns an error, OpenRouter automatically retries with another provider hosting the same model. Your application stays online even when individual providers have outages.
Learn moreBYOK (Bring Your Own Key)
Use your own API keys from providers like OpenAI or Anthropic while still benefiting from OpenRouter's routing and fallback infrastructure. Pay only a 5% routing fee instead of the standard markup.
Learn moreStructured Outputs and Tool Calling
Full support for JSON mode, structured outputs, and function/tool calling across supported models. Build reliable integrations with guaranteed output formats.
Free Models
Approximately 25 models are available for free at any time, including capable open source models. Great for prototyping, learning, and low volume applications.
Learn moreModel Variants
Append suffixes like :online (web search enabled), :nitro (faster inference), or :floor (cheapest provider) to any model name to customize behavior without changing your code.
Learn morePrivacy Controls
Choose whether your prompts can be used for model training. Set privacy preferences globally or per request for full control over your data.
Pricing
Pay as You Go
No subscription. Purchase credits and pay per token at each model's listed rate. A 5.5% platform fee applies on credit card purchases (5% on crypto). Free models are available with no credits required.
- Access to all 400+ models
- Pay per token at each model's rate
- 5.5% platform fee (credit card)
- 5% fee on crypto payments
- ~25 free models available
- Automatic fallbacks included
- No minimum spend
BYOK (Bring Your Own Key)
Use your existing API keys from providers. Pay the provider directly for model usage and a 5% routing fee to OpenRouter for infrastructure.
- Use existing provider API keys
- 5% routing fee only
- Provider routing and fallbacks
- Unified logging and monitoring
- No credit purchase needed
Enterprise
Custom pricing for high volume teams with dedicated support, SLAs, and volume discounts.
- Custom pricing and volume discounts
- Dedicated support and SLAs
- Custom rate limits
- Priority routing
- Enterprise security features
Pros & Cons
Pros
- One API key, one billing account, and one integration for 400+ models. Massively reduces the overhead of working with multiple AI providers.
- Fully compatible with the OpenAI API format, so existing code and SDKs work with minimal changes.
- Automatic fallbacks mean your app keeps working even when individual providers go down.
- Approximately 25 free models available at all times, making it easy to experiment without spending money.
- BYOK lets you keep existing provider relationships while still benefiting from OpenRouter's routing infrastructure.
- New models are typically available within hours of launch, so you are always working with the latest options.
Cons
- The 5.5% platform fee on credit card purchases adds cost compared to using providers directly, though BYOK reduces this to 5%.
- Adds a middleware layer between your app and the model provider, which can introduce small amounts of additional latency.
- Some advanced provider specific features (like Anthropic's prompt caching or OpenAI's Assistants API) may not be fully supported through the unified endpoint.
- Rate limits are shared across all OpenRouter users for each provider, so you may hit limits faster during peak times compared to a direct provider account.
How to get started
Create an OpenRouter account
Sign up at openrouter.ai. You can start with free models immediately, no payment method required.
Get your API key
Go to the API Keys page in your dashboard and create a new key. This single key works with every model on the platform.
Make your first API call
Use the OpenAI SDK or any HTTP client. Point the base URL to https://openrouter.ai/api/v1 and pass your OpenRouter key. Choose any model by its ID (like anthropic/claude-sonnet-4-6 or openai/gpt-4.1).
Explore models and add credits
Browse the models page to compare pricing, speed, and capabilities. When you are ready for paid models, add credits to your account. There is no minimum purchase.
Deep dive
Detailed guides with comparisons, tips, and visuals for each feature.
How the Unified API Works
How OpenRouter provides a single endpoint for hundreds of AI models, and what OpenAI compatibility means in practice.
Provider Routing and Fallbacks
How OpenRouter chooses between providers, handles outages automatically, and keeps your application running.
Bring Your Own Key (BYOK)
Use your existing provider API keys with OpenRouter's routing infrastructure for maximum flexibility and lower fees.
Models, Variants, and Free Tiers
Navigating the 400+ model catalog, understanding model variants like :nitro and :floor, and making the most of free models.
Cost Optimization Strategies
How to minimize costs on OpenRouter through routing preferences, model selection, and smart usage patterns.
OpenRouter vs Direct API Keys
When OpenRouter makes sense and when you should go directly to a single provider.
Links
Similar Tools
OpenAI API
openai
apiThe developer platform for accessing GPT-5.4, GPT-5, GPT-4.1, o3, o4-mini, image generation, real time voice, embeddings, and more. Pay per token with no subscriptions required.
Anthropic API
anthropic
apiDirect access to Claude models via a developer API. Pay per token pricing for text generation, tool use, vision, extended thinking, computer use, and more.
Gemini API
Google's developer API for building with Gemini models programmatically. Multimodal input, 1M+ token context windows, function calling, and generous free tier.
Get notified about updates
We'll email you when this tool's pricing or features change.
Last updated: 2026-03-01