One API key · one OpenAI-compatible endpoint · 337 models · pass-through pricing, no markup
Base URL
https://openrouter.ai/api/v1
Chat completions endpoint
https://openrouter.ai/api/v1/chat/completions
This is an OpenAI-compatible endpoint. Any tool or SDK that accepts a custom base_url — the Python openai package, n8n's HTTP Request node, Hermes, AnythingLLM, your own scripts — can point at OpenRouter and reach every model through it. Authenticate with Authorization: Bearer YOUR_KEY.
| Header | Value |
|---|---|
Authorization | Bearer YOUR_KEY — your OpenRouter API key |
Content-Type | application/json |
:free)26 genuinely free models ($0 prompt + $0 completion) were live on the models API this session, out of 337 total. Free ids end in :free. The homepage frames this as "start free with 20+ zero-cost models." Free models carry low rate limits, with a higher daily request cap once you have purchased at least a credit threshold.
| Model id | Price |
|---|---|
google/gemma-4-31b-it:free | $0 / $0 |
nvidia/nemotron-3-super-120b-a12b:free | $0 / $0 |
Browse the full live catalogue at https://openrouter.ai/api/v1/models — filter for ids ending in :free.
Inference is pass-through with no markup. Per the live FAQ, verbatim: "We pass through the pricing of the underlying model providers without any markup, so you pay the same rate as you would directly with the provider."
| Example model | Prompt / completion (per token) |
|---|---|
google/gemma-4-31b-it:free | $0 / $0 |
anthropic/claude-fable-5 | $0.00001 / $0.00005 |
Per-token rates confirmed live from the models API this session. Track spend per model in the usage dashboard on openrouter.ai.
curl https://openrouter.ai/api/v1/chat/completions \
-H 'Authorization: Bearer YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "google/gemma-4-31b-it:free",
"messages": [
{"role": "user", "content": "Summarise the role of p53 in tumour suppression in 3 sentences."}
]
}'
A free model answers — no paid subscription needed. The reply text is in choices[0].message.content.
# pip install openai
from openai import OpenAI
client = OpenAI(
base_url="https://openrouter.ai/api/v1",
api_key="YOUR_KEY"
)
response = client.chat.completions.create(
model="google/gemma-4-31b-it:free",
messages=[
{"role": "user", "content": "Explain mRNA translation in 2 sentences."}
]
)
print(response.choices[0].message.content)
Switch model with one parameter. Change model to any id in the catalogue — e.g. anthropic/claude-fable-5 — and nothing else about the request changes. Latest-alias ids auto-resolve to the newest flagship without editing your code.
| HTTP Request node field | Value |
|---|---|
| Method | POST |
| URL | https://openrouter.ai/api/v1/chat/completions |
| Header | Authorization: Bearer YOUR_KEY |
| Header | Content-Type: application/json |
| Body (JSON) | {"model": "google/gemma-4-31b-it:free", "messages": [...]} |
One HTTP Request node makes OpenRouter the LLM backend for any n8n workflow. Switch between any model — free or paid — by changing the model value in the body.
| Situation | Use |
|---|---|
| Experiments, prototyping, classroom exercises | A :free model |
| Compare how different models answer the same question | Switch the model param, same body |
| Higher capability, fewer rate limits, production reliability | A paid model (provider rate, 0% markup) |
| Try cheap first, escalate only when needed | Fallback routing — cheap model first, flagship as backup |