Remote OpenClaw

Remote OpenClaw Blog

How to Use Free Models on OpenClaw via OpenRouter

7 min read ·

What Is OpenRouter?

OpenRouter is a unified API gateway that provides access to 300+ language models from every major provider — OpenAI, Anthropic, Google, Meta, Mistral, DeepSeek, and dozens of open-source model hosts — through a single API key. Instead of managing separate accounts with each provider, you use one OpenRouter key and switch between models by changing a single configuration field.

For OpenClaw operators, OpenRouter solves the multi-model problem. You can test GPT-5.4 in the morning, switch to Claude Opus at lunch, and run DeepSeek V3.2 overnight — all without changing your authentication, endpoint, or billing setup. It also provides automatic failover: if one provider has an outage, OpenRouter routes to an alternative backend.

The free tier is what makes OpenRouter particularly valuable for operators getting started. With 29 free models and 20 requests per minute, you can build, test, and run light production agents without spending a dollar on API costs.


The Free Tier Explained

OpenRouter's free tier works like this:

The 20 requests per minute limit translates to roughly 1,200 requests per hour or 28,800 per day. For a single-user agent or small team, this is a substantial amount of free compute.


Best Free Models for OpenClaw Agents

Not all 29 free models are equally useful for agent workflows. Here are the best options ranked by agent performance:

Tier 1: Best Free Models for Agents

Model OpenRouter ID Best For Context
GPT-OSS 20B openai/gpt-oss-20b:free Coding, general tasks 128K
GPT-5.4-nano openai/gpt-5.4-nano:free Classification, routing 128K
Llama 3.3 70B meta-llama/llama-3.3-70b:free General-purpose, writing 128K
DeepSeek R1 Distill deepseek/deepseek-r1-distill:free Reasoning, math, analysis 64K

Tier 2: Solid Free Options

Model OpenRouter ID Best For Context
Qwen3 32B qwen/qwen3-32b:free Multilingual, reasoning 32K
Gemma 3 27B google/gemma-3-27b:free Multimodal, general 32K
Mistral Small mistralai/mistral-small:free Fast responses, European langs 32K
Phi-4 14B microsoft/phi-4:free Reasoning, small footprint 16K

GPT-OSS 20B is the standout free model. Released by OpenAI under Apache 2.0, it matches o3-mini on coding benchmarks while being completely free on OpenRouter. For OpenClaw operators who want the strongest free coding agent, GPT-OSS 20B is the clear choice.

GPT-5.4-nano is free directly from OpenAI and also available free on OpenRouter. It is not powerful enough for complex agent tasks but excels as a router — analyzing incoming tasks and deciding which model should handle them.


Setup Guide: Free Models on OpenClaw

Step 1: Create an OpenRouter Account

Go to openrouter.ai and sign up with your email. No credit card required for free models.

Step 2: Generate an API Key

Navigate to the API Keys section in your OpenRouter dashboard and create a new key. Copy it — you will need it for the OpenClaw configuration.

Step 3: Configure OpenClaw

# In your OpenClaw config (e.g., ~/.openclaw/config.yaml)
llm:
  provider: openrouter
  model: openai/gpt-oss-20b:free    # Best free coding model
  api_key: your-openrouter-api-key
  temperature: 0.7
  max_tokens: 8192

Step 4: Start OpenClaw

openclaw start

That is it. Your agent is now running on a free model with zero ongoing costs. The only limitation is the 20 requests per minute rate limit.


Switching Between Models

One of OpenRouter's strengths is instant model switching. To change models, update a single line in your config:

# Switch to Llama 3.3 70B (free)
model: meta-llama/llama-3.3-70b:free

# Switch to DeepSeek R1 Distill (free)
model: deepseek/deepseek-r1-distill:free

# Switch to GPT-5.4-nano (free)
model: openai/gpt-5.4-nano:free

# Switch to a paid model (requires credits)
model: anthropic/claude-opus-4-6-1m

No API key changes, no endpoint changes, no authentication updates. This makes it easy to test different models on the same workflow and find the best fit before committing to a paid model for production.

Marketplace

Free skills and AI personas for OpenClaw — browse the marketplace.

Browse the Marketplace →

Cost-Free Agent Strategies

Here are proven strategies for running OpenClaw agents at zero cost:

Strategy 1: Free OpenRouter + Local Ollama Fallback

# Primary: OpenRouter free model
llm:
  provider: openrouter
  model: openai/gpt-oss-20b:free
  api_key: your-openrouter-api-key

# Fallback: Local Ollama (when rate-limited)
llm_fallback:
  provider: ollama
  model: qwen3:8b
  base_url: http://localhost:11434

Use OpenRouter for complex tasks (GPT-OSS 20B is stronger than local 8B models) and fall back to local Ollama when you hit the 20 req/min limit. This gives you unlimited capacity with the best model for each request.

Strategy 2: Model Router with GPT-5.4-nano

# Router: Free nano classifies tasks
router:
  model: openai/gpt-5.4-nano:free

# Complex tasks: Strong free model
complex:
  model: openai/gpt-oss-20b:free

# Simple tasks: Fast local model
simple:
  model: qwen3:8b  # via Ollama

Use the free GPT-5.4-nano to analyze each incoming task and route it to the appropriate model. Complex tasks go to GPT-OSS 20B; simple tasks go to your local Qwen3 8B. Total cost: zero.

Strategy 3: Development and Testing Pipeline

Use free models for all development and testing. Once your agent workflow is validated, switch to a paid model (DeepSeek V3.2 at $0.028/$0.10) for production. This approach means you never pay for failed experiments or debugging sessions.


Free Tier Limitations

  • 20 requests per minute: The primary constraint. For single-user agents this is rarely a problem, but multi-user applications or batch processing workflows will hit this limit quickly.
  • No SLA: Free models have no uptime guarantee. Response times can vary, and models may be temporarily unavailable during high-demand periods.
  • Model availability changes: OpenRouter can add or remove free models at any time. The specific models available today may not be available next month.
  • Lower priority: During peak load, paid requests are prioritized over free requests. This can mean slower response times during busy periods.
  • Limited model selection: Only 29 of 300+ models are free. The most powerful models (Claude Opus, GPT-5.4, etc.) require payment.

When to Upgrade to Paid

Consider adding credits to your OpenRouter account when:

  • You exceed 20 req/min consistently: If your agent regularly hits the rate limit, even $5 in credits removes the cap and gives access to all 300+ models.
  • You need higher reliability: Paid requests get priority routing and better uptime guarantees.
  • Task complexity outgrows free models: If your agent's tasks require Claude Opus (80.8% SWE-bench) or GPT-5.4 (75% OSWorld), no free model can match that capability.
  • You need vision or computer use: Most free models are text-only. Multimodal capabilities require paid models.

The transition is seamless — just add credits and change the model ID. No other configuration changes needed.


Frequently Asked Questions

Are OpenRouter free models actually free?

Yes, genuinely free — no credit card required, no trial period, no hidden charges. OpenRouter offers 29 models at zero cost, funded by model providers who want distribution and usage data. The trade-off is rate limiting: free tier users get 20 requests per minute, which is enough for development, testing, and light production use but not for high-volume agent workflows.

What is the best free model on OpenRouter for coding agents?

GPT-OSS 20B (openai/gpt-oss-20b) is currently the strongest free model for coding tasks, matching o3-mini on code generation benchmarks. DeepSeek R1 Distill (deepseek/deepseek-r1-distill:free) is a close second with strong reasoning capabilities. For smaller, faster coding tasks, Qwen3 8B via Ollama locally may outperform both due to zero latency overhead.

Can I use free models in production?

For low-volume production (under 20 requests per minute), yes. The free tier rate limit of 20 req/min is sufficient for personal agents, small team deployments, and low-traffic applications. For anything above that volume, you will need to add credits to your OpenRouter account or use a direct API. There is no SLA on free models — availability and response times are best-effort.

How do I switch between free and paid models in OpenClaw?

Change the model field in your OpenClaw config. Free models on OpenRouter typically have ':free' appended to their model ID (e.g., 'meta-llama/llama-3.3-70b:free'). To switch to a paid version, remove the ':free' suffix. Your OpenRouter API key works for both free and paid models — the billing is per-model, so free models cost nothing even on a funded account.


Further Reading