引言
OpenRouter 用统一 OpenAI 兼容端点聚合数百模型,带 :free 后缀的可零成本调用,是个人开发者的"免费模型超市"。
长期可用免费模型
meta-llama/llama-3.1-8b-instruct:free — 通用对话、摘要。
meta-llama/llama-3.3-70b-instruct:free — 复杂推理(额度紧)。
qwen/qwen-2.5-7b-instruct:free — 中英双语优秀。
qwen/qwen-2.5-coder-32b-instruct:free — 代码生成首选。
google/gemma-2-9b-it:free — 轻量、响应快。
mistralai/mistral-7b-instruct:free — 指令遵循稳。
deepseek/deepseek-r1:free — 推理链,数学/代码强。
deepseek/deepseek-chat:free — 通用对话。
调用示例
from openai import OpenAI
client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key="sk-or-...")
resp = client.chat.completions.create(
model="deepseek/deepseek-r1:free",
messages=[{"role": "user", "content": "证明根号2是无理数"}])
print(resp.choices[0].message.content)
速率与策略
免费模型共享全站配额:约 20 RPM、50 请求/天。建议 8B 设默认、70B 仅难任务;用 route: fallbacks 让免费模型做付费兜底;监控 x-or-rate-limit-* 头提前退避。
Introduction
OpenRouter aggregates hundreds of models behind a single OpenAI-compatible endpoint. Any model whose ID ends with :free costs nothing to call, which makes OpenRouter a "free model supermarket" for solo developers and a natural default for cost-sensitive prototypes. The catalog rotates as upstream providers change policy, but a core set of free models has remained stable for over a year. This article catalogs the ones worth depending on, with one-line use cases so you can pick without re-reading every model card. A subtlety worth knowing: OpenRouter's free models are sourced from multiple upstream providers, so the same model ID may be served by different infra on different days. Quality is generally consistent, but latency and exact token limits can drift, which is why pinning a model in production without monitoring is risky even when the price stays zero.
Long-Term Free Models
meta-llama/llama-3.1-8b-instruct:free — general chat and summarization, the workhorse default.
meta-llama/llama-3.3-70b-instruct:free — heavier reasoning, but with a tighter daily quota.
qwen/qwen-2.5-7b-instruct:free — strong bilingual (English/Chinese) quality.
qwen/qwen-2.5-coder-32b-instruct:free — go-to for code generation and refactoring.
google/gemma-2-9b-it:free — lightweight and snappy, good for classification tasks.
mistralai/mistral-7b-instruct:free — solid instruction following, EU-hosted.
deepseek/deepseek-r1:free — reasoning chain model, strong at math and code.
deepseek/deepseek-chat:free — general chat, often the highest-quality free option.
Call Example
from openai import OpenAI
client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key="sk-or-...")
resp = client.chat.completions.create(
model="deepseek/deepseek-r1:free",
messages=[{"role": "user", "content": "Prove sqrt(2) is irrational."}],
)
print(resp.choices[0].message.content)
Rate Limits and Strategy
Free models share a site-wide quota: roughly 20 requests per minute and 50 requests per day (always verify on the dashboard). Three practices keep you productive within those limits. First, default to 8B models and reserve 70B for genuinely hard tasks, since 70B burns the daily quota faster. Second, use OpenRouter's route: fallbacks field so a free model backs up your paid calls — if the paid model fails, the free one takes over automatically. Third, monitor the x-or-rate-limit-* response headers and back off proactively before hitting 429. For production, treat free models as a best-effort tier, not a primary one, and always pair them with at least one paid fallback. One more consideration: free models on OpenRouter do not always support the full OpenAI parameter surface. Streaming, tool calling, and JSON mode work on most, but logprobs, seed, and some vision inputs are model-dependent. Test the specific parameter you need against a given :free model before building around it, and keep a documented fallback model that does support it.