How to get started with OpenRouter for beginners: OpenRouter gives you one endpoint to hundreds of AI models, and its free tier offers 50 requests per day with no credit card required, rising to 1,000 per day after you buy $10 in credits OpenRouter FAQ.
Verdict
StacksFree Verdict: 8/10 — OpenRouter’s free tier is genuinely useful for prototyping without a credit card, but the 50-request daily cap limits heavy experimentation. It shines when you want to test multiple models quickly, but serious usage pushes you into paid credits fast.
How This Guide Was Built
This guide is based on the official OpenRouter documentation, the OpenRouter FAQ, and community reports — we did not run the tool hands-on. We verified the free-tier rate limits, the signup flow, the quickstart API example, and OpenAI-SDK compatibility. We did not test paid credits beyond the free allowance. Last verified: August 2026.
What is OpenRouter?
OpenRouter is a unified API gateway that lets you reach hundreds of AI models — including Llama, Qwen, Gemini, and Claude — through a single OpenAI-compatible endpoint at https://openrouter.ai/api/v1/chat/completions OpenRouter Quickstart. Instead of managing separate API keys and endpoints for each model provider, you call one URL and OpenRouter routes your request to the best available provider, automatically falling back if one errors. This makes it a strong fit for indie hackers who want to experiment across models without vendor lock-in. You can browse the full catalog at openrouter.ai/models, filtering for free models by setting max_price=0 OpenRouter Models. For bootstrappers staying within free tiers, OpenRouter’s free tier on StacksFree breaks down the exact limits and model options.
How do I get started with OpenRouter?
To get started with OpenRouter, you create a free account, generate an API key from the dashboard, and send your first request to the unified endpoint using any :free model — no credit card needed OpenRouter Quickstart.
Follow these six steps to make your first API call:
- Sign up at openrouter.ai — no credit card required. All new users receive a small free allowance to test OpenRouter OpenRouter FAQ.
- Create an API key in your dashboard settings. Your key looks like
sk-or-v1-.... - Set the environment variable in your terminal:
export OPENROUTER_API_KEY="sk-or-v1-your-key-here" - Make your first call with curl, using a
:freemodel:curl https://openrouter.ai/api/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $OPENROUTER_API_KEY" \ -d '{ "model": "meta-llama/llama-3.1-8b-instruct:free", "messages": [{"role": "user", "content": "Hello, what can you do?"}] }' - Check your quota by calling
GET /api/v1/keywith your API key:curl https://openrouter.ai/api/v1/key \ -H "Authorization: Bearer $OPENROUTER_API_KEY" - Optional: add context headers — set
HTTP-Referer(your site URL for rankings) andX-OpenRouter-Title(your app name) to appear in OpenRouter’s public usage stats.
OpenRouter Free Tier Limits
OpenRouter’s free tier gives you 50 requests per day across all :free models, rising to 1,000 per day once you’ve purchased at least $10 in credits — and no credit card is required to sign up OpenRouter FAQ.
The 50-request daily cap applies in total across every free model, not per model — so if you switch between Llama, Qwen, and Gemini free variants, your combined usage still counts toward the same 50-request limit. This is enough for testing, learning prompt patterns, and prototyping small features, but it fills up quickly if you’re iterating on a real app. Once you buy $10 in credits, your limit jumps to 1,000 free requests per day, which is enough for much heavier daily experimentation. You can also use the special model id openrouter/free, which automatically selects a free model for your requests OpenRouter FAQ. Browse all free options at openrouter.ai/models with the max_price=0 filter OpenRouter Models.
Using OpenRouter with the OpenAI SDK
You can use the OpenAI SDK as a drop-in replacement by pointing base_url to OpenRouter’s endpoint and passing any :free model name — the syntax stays identical to the official OpenAI client OpenRouter Quickstart.
Here’s a minimal Python example:
from openai import OpenAI
client = OpenAI(
base_url="https://openrouter.ai/api/v1",
api_key="sk-or-v1-your-key-here",
)
completion = client.chat.completions.create(
model="meta-llama/llama-3.1-8b-instruct:free",
messages=[{"role": "user", "content": "Explain the difference between REST and GraphQL."}],
)
print(completion.choices[0].message.content)
OpenRouter also releases its own SDKs — @openrouter/sdk for npm, openrouter for pip, and @openrouter/agent for agent-style workflows OpenRouter Quickstart. The drop-in compatibility means you can swap between OpenRouter and OpenAI with a single config change, which is handy when comparing model behavior.
Streaming Responses with OpenRouter
OpenRouter supports streaming just like the OpenAI API, so you can return tokens as they arrive instead of waiting for the full completion — useful for chat UIs and agent loops OpenRouter API Reference. Add "stream": true to your request body and read the Server-Sent Events stream:
curl https://openrouter.ai/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENR..._KEY" \
-d '{
"model": "meta-llama/llama-3.1-8b-instruct:free",
"stream": true,
"messages": [{"role": "user", "content": "Write a haiku about APIs."}]
}'
Each line in the response is a data: chunk whose delta field holds the next piece of text, and the stream ends with a data: [DONE] line OpenRouter API Reference. Because the endpoint is OpenAI-compatible, the same streaming code you use against OpenAI works against OpenRouter with only the base_url change shown above.
Which Free Models Are Worth Trying
The :free variants of small instruct models are the most reliable starting point because they are fast and rarely hit the shared capacity limits OpenRouter FAQ. A practical starter set is Llama 3.1 8B for general chat, Qwen 2.5 7B for code and math, and a small Gemini variant when you want a different tokenizer and style OpenRouter Models. Use the max_price=0 filter when browsing the catalog to see only models with free variants OpenRouter Models. Note that free variants can be paused or swapped by the provider at any time, so pin the model id you rely on and re-check the catalog if a model stops responding OpenRouter FAQ.
Tips to Make the Most of the Free Tier
Batch your experiments by sending multiple prompts in a single request, cache repeated results to avoid burning through your 50-request quota, and prefer smaller models like Llama 3.1 8B over larger ones for faster, cheaper responses OpenRouter FAQ.
- Cache results: Store outputs locally or use a managed cache like Redis to avoid re-calling the same prompt. See our Upstash free tier guide for a no-cost caching setup.
- Use smaller models: The
:freevariants of Llama 3.1 8B or Qwen 2.5 7B are fast and sufficient for most prototyping tasks. - Switch models without code changes: Because OpenRouter uses one endpoint, you can swap model names in config and test alternatives instantly.
- Handle 429 errors: If you hit the daily rate limit, back off and retry — or upgrade to $10 in credits for 1,000 requests per day OpenRouter FAQ.
- Use
openrouter/free: This auto-selects a free model, removing the need to pick one manually OpenRouter FAQ.
Common Mistakes Beginners Make
Beginners often forget to set the base_url correctly when using the OpenAI SDK, or they try to call non-free models without realizing they carry a cost OpenRouter Quickstart.
Other frequent errors include:
- Not creating a key first: You must generate an API key in the dashboard before any request will work.
- Using paid models by accident: Always append
:freeto your model name (e.g.,meta-llama/llama-3.1-8b-instruct:free) to stay within the free tier OpenRouter FAQ. - Hitting rate limits without retrying: If you get a 429, reduce your request frequency or purchase $10 in credits for a higher daily cap OpenRouter FAQ.
- Skipping the Referer header: While optional, setting
HTTP-Refererhelps your project appear in OpenRouter’s public rankings.
FAQ
Is OpenRouter free?
OpenRouter offers a free tier with no credit card required, giving you 50 requests per day across all :free models OpenRouter FAQ.
How many free requests do I get per day?
You get 50 free requests per day for accounts with less than 10 credits purchased, rising to 1,000 per day after buying $10 in credits OpenRouter FAQ.
Do I need a credit card for OpenRouter?
No, you do not need a credit card to sign up or use the free tier — but purchasing $10 in credits raises the limit to 1,000 free requests per day OpenRouter FAQ.
Where to Go Next
Once you’re comfortable with the free tier, try swapping models to compare outputs, experiment with streaming responses using stream: true for real-time UIs, or test structured outputs via response_format for JSON extraction OpenRouter API Reference. OpenRouter also supports images and PDFs as input, so you can build multimodal prototypes without leaving the same endpoint.
For more free-tier comparisons, check out our Groq free tier guide and our Google Gemini API free tier guide — each breaks down the exact limits and best use cases for these alternative AI APIs.
