OpenRouter AI Models Guide

SkillProductivity

Guide to OpenRouter — the unified API for 200+ AI models from OpenAI, Anthropic, Google, Meta, Mistral, and more. Covers model selection, pricing, routing strategies, fallback chains, and integration with SperaxOS for optimal model usage per task.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the OpenRouter AI Models Guide skill

What this skill tells your AI

The instructions your AI receives, as published by nirholas/three.ws in data/skills/general/openrouter-ai-models-guide/SKILL.md and read by ahel’s review.

OpenRouter provides a unified API for 200+ AI models. This guide covers model selection, pricing, routing, and integration with SperaxOS.

What Is OpenRouter?

A single API endpoint that routes requests to 200+ models:

Your App → OpenRouter API → Model Provider
                              ├── OpenAI (GPT-4, o1, o3)
                              ├── Anthropic (Claude 4, Sonnet, Haiku)
                              ├── Google (Gemini 2.5, Pro, Flash)
                              ├── Meta (Llama 4, Maverick)
                              ├── Mistral (Large, Medium)
                              ├── DeepSeek (V3, R1)
                              └── 50+ more providers

Quick Start

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-4-20250514",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Model Selection Guide

By Task

TaskRecommended ModelWhy
Complex reasoningclaude-sonnet-4, o3Best logical reasoning
Codingclaude-sonnet-4, deepseek-v3Best code generation
Creative writingclaude-sonnet-4, gpt-4oMost creative output
Fast responsesgemini-flash, claude-haikuLowest latency
Long contextgemini-pro-2.5 (1M), claude-sonnet-4 (200K)Largest context windows
DeFi analysisclaude-sonnet-4, gpt-4oBest structured data handling
Vision/imagesgpt-4o, gemini-proBest image understanding
JSON outputclaude-sonnet-4, gpt-4oMost reliable structured output
Budgetdeepseek-v3, llama-4Cheapest per token

By Price (per 1M tokens)

TierInputOutputModels
Free$0$0Selected models with limits
Budget$0.10-0.50$0.30-1.50DeepSeek, Llama, Gemma
Standard$1-5$3-15GPT-4o, Claude Sonnet, Gemini Pro
Premium$10-15$30-60o3, Claude Opus

By Context Window

ModelContextBest For
Gemini 2.5 Pro1,048,576Entire codebases
Claude Sonnet 4200,000Long documents
GPT-4o128,000Standard tasks
DeepSeek V364,000Budget long-context

Routing Strategies

Automatic Routing

Let OpenRouter pick the best model:

{
  "model": "openrouter/auto",
  "messages": [...]
}

Fallback Chain

Define fallback models if primary is unavailable:

{
  "model": "anthropic/claude-sonnet-4-20250514",
  "route": "fallback",
  "models": [
    "anthropic/claude-sonnet-4-20250514",
    "openai/gpt-4o",
    "google/gemini-2.5-pro"
  ]
}

Cheapest Route

Use the cheapest available model for a task:

{
  "model": "openrouter/cheapest",
  "max_price": { "prompt": 0.001, "completion": 0.003 }
}

SperaxOS Integration

SperaxOS uses OpenRouter as a model provider:

Configuration

# .env
OPENROUTER_API_KEY=sk-or-...
OPENROUTER_MODEL_LIST=anthropic/claude-sonnet-4-20250514,openai/gpt-4o,google/gemini-2.5-pro

Model Data File

SperaxOS maintains a curated model list at data/openrouter-models.ts:

  • Pre-selected models optimized for DeFi/crypto tasks
  • Pricing and capability metadata
  • Context window sizes
  • Feature flags (vision, function calling, JSON mode)

Per-Agent Model Selection

Different SperaxOS agents can use different models:

  • DeFi Advisor: Claude Sonnet 4 (best reasoning)
  • Quick Chat: Gemini Flash (fastest response)
  • Code Assistant: DeepSeek V3 (budget coding)
  • Research Agent: Gemini 2.5 Pro (largest context)

API Compatibility

OpenRouter is compatible with:

  • OpenAI SDK (just change base URL)
  • LangChain
  • LlamaIndex
  • Vercel AI SDK
  • Any OpenAI-compatible client
import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://openrouter.ai/api/v1',
  apiKey: process.env.OPENROUTER_API_KEY,
});

Links

Signals

GitHub stars
114
Forks
29
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
openrouter-ai-models-guide
Source
github.com/nirholas/three.ws