OpenRouter API Key in 2026: Setup, Free Models, and What It Costs
Guide

OpenRouter API Key in 2026: Setup, Free Models, and What It Costs

How to create an OpenRouter API key and make a first call, how the free models and their daily caps work, the fee on credits, rate limits, and common errors.

To get an OpenRouter API key, sign up at openrouter.ai, open the API keys page at openrouter.ai/keys, create a key, give it a name and set a credit limit. One key then works across every model OpenRouter lists, including a set of free ones. This guide covers setup, a first request, how the free models and their daily caps work, what OpenRouter charges on top of model prices, rate limits, common errors, and the startup credit program.

What an OpenRouter API Key Does

OpenRouter is a router, not a model maker. It puts models from OpenAI, Anthropic, Google, DeepSeek and many others behind one OpenAI-compatible API and one bill. Its pricing page lists more than 600 models from more than 80 providers. You change models by changing one string in your request.

When a provider returns an error, OpenRouter falls back to the next provider for that model automatically. It bills inference at the provider's list price and makes its money from a fee on credit purchases, covered below.

How to Get an OpenRouter API Key

Step 1: Create an account. Sign up at openrouter.ai. Accounts start on the Free plan, which includes chat and API access to the free models.

Step 2: Create a key. Open openrouter.ai/keys and create a key. Give it a name that says where it will run. OpenRouter keys start with sk-or-v1-. Copy the key into a secrets manager straight away.

Step 3: Set a credit limit on the key. You can cap what each key may spend, as a fixed total or with a daily, weekly or monthly reset. OpenRouter recommends a limit on every key, because a key with no limit lets a leak or a runaway agent spend your whole balance, including auto top-ups.

Step 4: Set the environment variable. OpenRouter's docs use OPENROUTER_API_KEY.

export OPENROUTER_API_KEY="sk-or-v1-your_key_here"

Step 5: Add credits when you need paid models. Buy credits on the Credits page, by hand or with auto top-up. You can skip this step while you only use free models.

Five steps to an OpenRouter API key: create an account at openrouter.ai, create a key at openrouter.ai/keys, set a credit limit on the key, set OPENROUTER_API_KEY, and pick a model such as openrouter/free or any paid model slug

This video walks through creating an OpenRouter API key.

Your First OpenRouter API Call

Send the key as a Bearer token to https://openrouter.ai/api/v1. This curl request uses openrouter/free, a router that picks one of the free models for you, so it costs nothing:

curl https://openrouter.ai/api/v1/responses \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openrouter/free",
    "input": "Explain what an API key is in one sentence."
  }'

And the same request with the OpenAI Python SDK, pointed at OpenRouter:

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key=os.environ.get("OPENROUTER_API_KEY"),
)

response = client.responses.create(
    model="openrouter/free",
    input="Explain what an API key is in one sentence.",
)

print(response.output_text)

Pass the key explicitly, as above. The OpenAI SDK falls back to OPENAI_API_KEY when no key is given, and OpenRouter rejects that key with a 401. To use a paid model, swap the model string for a slug from openrouter.ai/models, such as openai/gpt-6.2-sol. The /chat/completions endpoint works too.

OpenRouter Free Models

Free models have IDs ending in :free and cost $0 per token. You can call them without buying credits. The limits are on requests, and they depend on how many credits your account has ever bought:

Credits purchased, all timeRequests per minuteRequests per day
Less than $102050
$10 or more201,000

OpenRouter free model limits: accounts that have bought under $10 in credits get 50 requests per day and 20 per minute on models tagged :free; after buying $10 of credits once, the daily cap rises to 1,000. Paid models have no plan-based rate limit and pass through the provider's own limits

The caps are shared across all free models and all your keys, so extra keys or accounts do not raise them. Failed attempts count toward the daily cap, and a negative credit balance blocks free models until you top up.

Which models are free. The lineup changes often. On November 20, 2026, OpenRouter's public model list showed 12 models with the :free tag. Examples:

ModelModel IDContext
Google Gemma 4 31Bgoogle/gemma-4-31b-it:free262K
NVIDIA Nemotron 3 Ultranvidia/nemotron-3-ultra-550b-a55b:free1M
Baidu ERNIE 5.5 Flash Previewbaidu/ernie-5.5-flash-preview:free1M
LiquidAI LFM3 1.7Bliquid/lfm-3-1.7b:free262K
Free Models Routeropenrouter/free200K

For the current list, filter the models page by price at openrouter.ai/models?max_price=0. If you do not care which model answers, openrouter/free picks one at random from the free models that support what your request needs, such as tool calling or image input.

Two things to watch. If you put a :free model in a fallback list alongside paid models, OpenRouter moves to the paid one when the free one is rate-limited or unavailable, and bills it. To keep a request free, list only free models. Also, free models come from different providers with different data policies. OpenRouter says it does not log your prompts by default, but check the provider behind each model before sending anything sensitive.

For free tiers at other providers, see our free AI API comparison.

OpenRouter Pricing

There is no subscription. You buy credits in US dollars and each request deducts its cost. OpenRouter says it adds no markup to token prices on any plan. Its fee is charged when you buy credits. These are the plans as of November 2026:

PlanFee on credit purchasesModelsRate limits
FreeNone; no credits boughtFree models only50 requests per day
Standard (pay-as-you-go)5.5%, $0.80 minimum600+Passed through from providers
Business (pay-as-you-go)8%600+Passed through from providers
EnterpriseBy contract600+Higher allowances available

On Standard, a $10 credit purchase costs $10.80 and a $100 purchase costs $105.50. Crypto payments carry a 5% fee.

Model prices are per million tokens and vary by model. A sample of listed rates as of November 2026:

Model IDInput / 1MOutput / 1M
openai/gpt-6.2-sol$2.00$10.00
anthropic/claude-sonnet-5.5$2.00$10.00
google/gemini-4-hydrogen$1.50$7.50
x-ai/grok-4.7$2.00$6.00
deepseek/deepseek-v4.1-flash$0.30$1.20
openai/gpt-oss-120b$0.09$0.36

Other billing details:

ItemHow it works
Your own provider keys (BYOK)The provider bills you directly. The first $25,000 of list-price inference per month carries no OpenRouter fee on Standard and Business, then 5%
Failed requestsAn attempt that errors is not charged for model tokens, so with fallback you pay only for the run that answers
Credit expiryOpenRouter reserves the right to expire unused credits one year after purchase
RefundsUnused credits can be refunded within 24 hours of purchase; fees are not refunded, and crypto payments are never refundable

Whether a direct key is cheaper depends on the provider. To compare, see our guides to the OpenAI API key, the Anthropic API key, the Gemini API key, the Grok API and the DeepSeek API.

OpenRouter Rate Limits

OpenRouter sets no plan-based rate limit on paid models. A limit you hit there normally comes from the underlying provider, and fallback routing retries other providers for you.

Free models are the exception, with the caps above. To see where a key stands, call the key endpoint. The response includes the key's credit limit, what is left of it, and your free-model daily counter.

curl https://openrouter.ai/api/v1/key \
  -H "Authorization: Bearer $OPENROUTER_API_KEY"

Common OpenRouter Errors

ErrorWhat it meansFix
401, "this is not an OpenRouter API key"You sent another provider's key, usually because the SDK fell back to OPENAI_API_KEYPass the OpenRouter key explicitly
401, "No API key in the Authorization header"The environment variable is unsetSet it, then restart the shell or app
402The account or the key is out of creditsAdd credits or raise the key's limit; lower max_tokens if one large request is the cause
429Rate limited, most often the free-model capWait for the Retry-After header, or buy $10 in credits for the 1,000 per day cap
502The chosen model is down or returned an invalid responseRetry, or allow fallback to another provider or model
503No provider meets your routing requirementsLoosen provider or privacy settings

If a key leaks, delete it on the keys page and create a new one. OpenRouter is a GitHub secret scanning partner and emails you when it detects an exposed key.

OpenRouter for Startups

OpenRouter runs a startup program at openrouter.ai/startups. Approved startups get up to $3,000 in inference credits that work across its models, plus 0% processing fees for 12 months, covering both the credit purchase fee and BYOK fees. Most credits expire six months after they are issued.

You must meet every requirement:

  • Pre-Series B and venture-scalable
  • Building an AI-native product full-time
  • A referral from an approved OpenRouter partner
  • A public company website and an application from an email on that domain
  • Less than $500 in lifetime OpenRouter spend
  • No previous OpenRouter startup credits

The referral is the hard part. OpenRouter does not publish its partner list, and suggests checking the perks portal of your VC or accelerator for its startup program. Because of the $500 spend ceiling, apply before you scale up usage, not after.

Frequently Asked Questions

How do I get an OpenRouter API key?

Sign up at openrouter.ai, open openrouter.ai/keys and create a key. Give it a name and a credit limit, then store it as an environment variable called OPENROUTER_API_KEY. Keys start with sk-or-v1-.

Is OpenRouter free?

Creating an account and a key is free, and models tagged :free cost nothing per token. Free models are limited to 20 requests per minute and 50 per day, or 1,000 per day once your account has bought at least $10 in credits. Paid models are billed per token from prepaid credits.

Which OpenRouter models are free?

Any model whose ID ends in :free. The lineup changes often. On November 20, 2026 it included Google Gemma 4 31B, NVIDIA Nemotron 3 Ultra and Baidu ERNIE 5.5 Flash Preview. The openrouter/free router picks a free model for you. See the current list at openrouter.ai/models?max_price=0.

How much does OpenRouter cost?

OpenRouter bills tokens at each provider's list price with no markup. As of November 2026 it charges a 5.5% fee, with a $0.80 minimum, when you buy credits on the Standard plan, and 8% on the Business plan. Crypto payments carry a 5% fee.

Does OpenRouter have rate limits?

Not plan-based ones on paid models. Limits there come from the underlying provider, and OpenRouter retries other providers automatically. Free models are capped at 20 requests per minute and 50 or 1,000 requests per day, depending on whether you have bought $10 in credits.

Do OpenRouter credits expire?

OpenRouter's terms reserve the right to expire unused credits one year after purchase. Unused credits can be refunded within 24 hours of purchase, minus fees. Crypto payments are not refundable.

Can I use the OpenAI SDK with OpenRouter?

Yes. Set the base URL to https://openrouter.ai/api/v1 and pass your OpenRouter key explicitly. If you leave the key out, the SDK falls back to OPENAI_API_KEY and OpenRouter returns a 401.

Does OpenRouter offer startup credits?

Yes. OpenRouter for Startups offers up to $3,000 in inference credits and 0% processing fees for 12 months. You need to be pre-Series B, building an AI-native product full-time, under $500 in lifetime OpenRouter spend, and referred by an approved OpenRouter partner.

Next Steps

Create a key with a credit limit and run the curl example against openrouter/free. If the 50 requests per day cap gets in the way, a one-time $10 credit purchase raises it to 1,000. Before you spend more, ask your investor or accelerator whether they are an OpenRouter partner, since the startup program closes to you after $500 in spend. For other ways to cut your model bill, see our free AI API comparison and the AI credits index.

Brady Heinrich Written by Brady Heinrich, Founder of Credit for Startups

Related Articles

Join 7,000+ startup founders

Get monthly updates on new credits, perks, and funding opportunities. Join founders who've already discovered over $10M in startup resources.

Monthly Refreshes
Get curated updates on new funding opportunities, exclusive deals, and early access to upcoming startup resources.
No spam
Just valuable funding opportunities and resources. One email per month, and you can unsubscribe anytime.

Takes 10 seconds

We ask once and remember your answers.