NativeAIHub
OpenRouter logo

OpenRouter

api

by openrouter

One API key for 400+ AI models. Access GPT, Claude, Gemini, Llama, and more through a single, OpenAI compatible endpoint.

Key features

Unified API (OpenAI Compatible)
400+ Models from 60+ Providers
Intelligent Provider Routing
Automatic Fallbacks
BYOK (Bring Your Own Key)
Structured Outputs and Tool Calling
Pricing

Free tier available

Best For

Developers who want one API key for every AI model instead of managing accounts with OpenAI, Anthropic, Google, and others separately

Verdict

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 more

400+ 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 more

Intelligent 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 more

Automatic 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 more

BYOK (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 more

Structured 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 more

Model 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 more

Privacy 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

Free

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)

Free

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

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

1

Create an OpenRouter account

Sign up at openrouter.ai. You can start with free models immediately, no payment method required.

2

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.

3

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).

4

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.

Get notified about updates

We'll email you when this tool's pricing or features change.

Last updated: 2026-03-01