OpenRouter — Quick-reference

One API key · one OpenAI-compatible endpoint · 337 models · pass-through pricing, no markup

Base URL & endpoint

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.

Request headers

HeaderValue
AuthorizationBearer YOUR_KEY — your OpenRouter API key
Content-Typeapplication/json

Free model ids (: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 idPrice
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.

Pricing

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 modelPrompt / 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 test (free model)

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.

Python (openai SDK)

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

Use it from n8n

HTTP Request node fieldValue
MethodPOST
URLhttps://openrouter.ai/api/v1/chat/completions
HeaderAuthorization: Bearer YOUR_KEY
HeaderContent-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.

Free vs paid — quick decision

SituationUse
Experiments, prototyping, classroom exercisesA :free model
Compare how different models answer the same questionSwitch the model param, same body
Higher capability, fewer rate limits, production reliabilityA paid model (provider rate, 0% markup)
Try cheap first, escalate only when neededFallback routing — cheap model first, flagship as backup