Guide
AI Model Price-to-Performance Guide
A living comparison of 400+ models across five price tiers. Updated every Monday with fresh OpenRouter pricing, new releases, and benchmark data.
- Published
- 13 Aug 2026
- Reading
- 18 min
- Class
- pricing
half-life 45dfrom 13 Aug 2026
Introduction: Why Price-to-Performance Matters More Than Raw Capability
Every week a new model claims the top spot on a leaderboard. Every month prices drop 30–50%. The model that was "best" in January is overpriced by March. Chasing raw benchmarks is a losing game — the only metric that compounds is value per completed task.
This guide exists because the industry publishes capability scores and price lists separately. You get MMLU-Pro here, dollars-per-million-tokens there, and context windows somewhere else. Making a decision means stitching them together yourself, every time. We do that stitching once a week so you don't have to.
The core principle
Do not compare price per token. Compare price per passing case on your workload. A model at 1/40th the token price is not 1/40th the cost if the agent loop runs four times as long — and on agentic work, it often does.
How to Read This Guide
Price Tiers (by input cost per 1M tokens)
| Tier | Input $/M | Typical Output $/M | Best For |
|---|---|---|---|
| Free | $0.00 | $0.00 | Experimentation, low-stakes classification, local fallback |
| Budget | < $1.00 | $0.10–$1.00 | High-volume extraction, routing, triage, bulk classification |
| Mid-Range | $1.00–$5.00 | $2.00–$15.00 | Default agent loops, coding assistants, RAG, summarisation |
| Premium | $5.00–$15.00 | $15.00–$75.00 | Complex reasoning, agentic coding, long-horizon tasks |
| Frontier | > $15.00 | > $75.00 | Escalation tier only — measured failures of cheaper models |
Key Columns Explained
- Input $/M — Cost per 1 million input tokens (prompt + context)
- Output $/M — Cost per 1 million output tokens (completion)
- Cache Read $/M — Discounted rate when re-reading cached context (critical for agent loops)
- Context — Maximum context window in tokens
- Intelligence Index — Artificial Analysis composite (0–100, higher = more capable)
- Coding Index — Artificial Analysis coding-specific score
- Agentic Index — Artificial Analysis tool-use / multi-step score
Hidden Costs to Watch
- Output token inflation — Reasoning models (o1, o3, Fable 5) generate 3–10× more output tokens for the same answer
- Context bloat — Agent loops re-read context every turn; cache hits save 50–90% on input
- Rate limits — Free tiers often cap at 20–50 req/min; not viable for production
- Batch discounts — 50% off for async batch jobs (OpenAI, Anthropic, Google)
- Tokenizer drift — Newer tokenisers (Claude 4.7+) produce ~30% more tokens for the same text
The Model Tier List
Data pulled from OpenRouter API on 13 Aug 2026. 409 models total. Router/meta-models excluded from tier counts below.
Free Tier — 18 Models
Zero cost via OpenRouter's free tier. Strict rate limits (typically 20 req/min). No SLA. Use for prototyping, evals, and non-production workloads.
| Model | Provider | Context | Best For | Notes |
|---|---|---|---|---|
| Nemotron 3 Ultra | NVIDIA | 1M | Reasoning, coding | Strongest free model; 86.8 MMLU-Pro |
| Nemotron 3.5 Lightning | NVIDIA | 1M | Fast reasoning | Optimised for speed |
| Nemotron 3 Super | NVIDIA | 262K | General purpose | 120B params |
| Nemotron 3 Nano / Nano Omni | NVIDIA | 256K | Lightweight tasks | 30B / multimodal variants |
| Gemma 4 31B / 26B | 262K | Open-weight local | Also available paid at $0.10–0.12/M | |
| GPT-OSS 20B / 120B | OpenAI | 131K | Open-weight coding | Also paid at $0.03/M |
| Laguna S / XS 2.1 | Poolside | 262K | Code generation | Specialised coding models |
| North Mini Code | Cohere | 256K | Code tasks | Small specialised model |
| Nemotron 3.5 Content Safety | NVIDIA | 128K | Moderation | Safety-specific |
| Nemotron Nano 12B VL / 9B | NVIDIA | 128K | Vision + text | Multimodal free options |
| Free Models Router | OpenRouter | 200K | Auto-routing | Meta-model across free tier |
Budget Tier — ~150 Models (Input < $1/M)
Production-viable for high-volume, verifiable tasks. Many offer cache reads at 10–50% of base price.
| Model | Input $/M | Output $/M | Cache $/M | Context | Best For |
|---|---|---|---|---|---|
| Ling 2.6 Flash (InclusionAI) | $0.01 | $0.03 | $0.002 | 262K | Ultra-cheap classification |
| Granite 4.0 H Micro (IBM) | $0.017 | $0.112 | — | 131K | Enterprise lightweight |
| Mistral Nemo | $0.019 | $0.03 | — | 131K | General budget |
| Ling 3.0 Flash | $0.021 | $0.063 | $0.0042 | 262K | Cheap reasoning |
| Nex N2 Mini | $0.025 | $0.10 | $0.0025 | 262K | Budget agent loops |
| GPT-5 Nano (batch) | $0.025 | $0.20 | $0.0025 | 400K | Batch processing |
| Llama 3.2 1B | $0.027 | $0.201 | — | 60K | Tiny context tasks |
| Solar Pro4 (Upstage) | $0.03 | $0.12 | $0.006 | 524K | Long context budget |
| Qwen 3.7 Flash | $0.03 | $0.13 | $0.006 | 1M | 1M context cheap |
| GPT-OSS 120B / 20B | $0.03 | $0.13–0.17 | $0.03 | 131K | Open-weight paid |
| Nova Micro (Amazon) | $0.035 | $0.14 | — | 128K | AWS integration |
| Command R7B (Cohere) | $0.0375 | $0.15 | — | 128K | RAG optimised |
| Qwen 3-30B-A3B | $0.048 | $0.193 | — | 262K | MoE efficiency |
| Granite 4.1 8B | $0.05 | $0.10 | $0.05 | 131K | Enterprise balanced |
| Nemotron 3 Nano 30B | $0.05 | $0.20 | $0.025 | 262K | NVIDIA stack |
| GPT-5 Nano | $0.05 | $0.40 | $0.005 | 400K | OpenAI cheap tier |
| Gemini 2.5 Flash-Lite (batch) | $0.05 | $0.20 | $0.01 | 1M | Google batch |
| GPT-4.1 Nano (batch) | $0.05 | $0.20 | $0.0125 | 1M | OpenAI batch |
Mid-Range Tier — ~100 Models (Input $1–5/M)
The sweet spot for most production agent loops. Strong capability, reasonable cost, good cache pricing.
| Model | Input $/M | Output $/M | Cache $/M | Context | Best For |
|---|---|---|---|---|---|
| GPT-5.6 Luna / Luna Pro | $0.10 | $0.60 | $0.01 | 1.05M | High-volume agents |
| GPT-5 Mini (batch) | $0.125 | $1.00 | $0.0125 | 400K | Batch coding |
| GPT-5 Nano | $0.05–0.10 | $0.40–0.625 | $0.005–0.01 | 400K | Cost-optimised |
| Gemini 2.5 Flash-Lite | $0.10 | $0.40 | $0.01 | 1M | Long context cheap |
| Gemini 3.1 Flash-Lite | $0.125–0.25 | $0.75–1.50 | $0.0125–0.025 | 1M | Google mid-tier |
| DeepSeek V4 Flash | $0.14 | $0.28 | $0.028 | 1M | Reasoning value |
| Qwen 3.6 Flash | $0.1875 | $1.125 | — | 1M | Qwen speed tier |
| Qwen 3.6 35B-A3B | $0.15 | $1.00 | $0.05 | 262K | MoE balanced |
| Mistral Small 3.1 24B | $0.351 | $0.555 | — | 128K | Mistral efficient |
| GPT-4.1 Mini | $0.40 | $1.60 | $0.10 | 1M | OpenAI workhorse |
| Claude Haiku 4.5 | $1.00 | $5.00 | $0.10 | 200K | Fast classification |
| Grok Build 0.1 (xAI) | $1.00 | $2.00 | $0.20 | 256K | Cheap reasoning |
| GPT-5.6 Terra / Terra Pro | $1.00 | $6.00 | $0.10 | 1.05M | OpenAI default agent |
| Claude Sonnet 5 (batch) | $1.00 | $5.00 | $0.10 | 1M | Anthropic batch |
| Gemini 2.5 Flash | $0.30 | $2.50 | $0.03 | 1M | Google default |
| GPT-4.1 | $2.00 | $8.00 | $0.50 | 1M | OpenAI strong |
| Claude Sonnet 4.5 / 4.6 | $3.00 | $15.00 | $0.30 | 1M | Anthropic strong |
| Gemini 2.5 Pro | $1.25 | $10.00 | $0.125 | 1M | Google reasoning |
| Qwen 3.7 Plus | $0.32 | $1.28 | $0.064 | 1M | Qwen strong |
Premium Tier — ~30 Models (Input $5–15/M)
Specialised for hard reasoning, agentic coding, and long-horizon tasks. Use as escalation, not default.
| Model | Input $/M | Output $/M | Cache $/M | Context | Best For |
|---|---|---|---|---|---|
| Claude Opus 5 (batch) | $2.50 | $12.50 | $0.25 | 1M | Batch agentic coding |
| GPT-5.6 Sol / Sol Pro (batch) | $2.50 | $15.00 | $0.25 | 1.05M | OpenAI batch premium |
| Claude Opus 4.8 / 4.7 / 4.6 (batch) | $2.50 | $12.50 | $0.25 | 1M | Anthropic batch premium |
| GPT-5.5 / 5.4 (batch) | $2.50–7.50 | $15.00–60.00 | $0.25–0.50 | 400K–1.05M | OpenAI previous gen |
| Claude Opus 5 | $5.00 | $25.00 | $0.50 | 1M | Top-tier reasoning |
| GPT-5.6 Sol / Sol Pro | $5.00 | $30.00 | $0.50 | 1.05M | OpenAI top tier |
| Claude Fable 5 (batch) | $5.00 | $25.00 | $0.50 | 1M | Anthropic max capability |
| Claude Opus 4.1 / 4.5 / 4.6 / 4.7 / 4.8 | $5.00 | $25.00 | $0.50 | 200K–1M | Anthropic premium |
| GPT-5.5 / 5.4 / 5.3 / 5.2 Pro | $5.00–21.00 | $30.00–168.00 | $0.50 | 400K–1.05M | OpenAI premium |
| Sakana Fugu Ultra | $5.00 | $30.00 | — | 1M | Japanese optimised |
Frontier Tier — ~15 Models (Input > $15/M)
Escalation only. If you are here by default, you are overpaying. Route specific measured failures here.
| Model | Input $/M | Output $/M | Cache $/M | Context | Notes |
|---|---|---|---|---|---|
| Claude Opus 4.7 Fast | $30.00 | $150.00 | $3.00 | 1M | Fast variant |
| Claude Opus 4.8 Fast / Opus 5 Fast | $10.00 | $50.00 | $1.00 | 1M | Faster premium |
| GPT-5.5 Pro / 5.4 Pro / 5.2 Pro | $15.00–30.00 | $90.00–180.00 | $0.50–0.75 | 400K–1.05M | OpenAI max |
| Claude Opus 4.1 / Opus 4 | $15.00 | $75.00 | $1.50 | 200K | Anthropic previous max |
| GPT-5 Pro | $15.00 | $120.00 | — | 400K | OpenAI current max |
| O1 Pro | $150.00 | $600.00 | $75.00 | 200K | Extreme reasoning |
| O3 Pro | $20.00 | $80.00 | $10.00 | 200K | Reasoning specialist |
Best Value by Use Case
Best for Coding / Development
| Recommendation | Model | Input $/M | Why |
|---|---|---|---|
| Default | GPT-4.1 / GPT-5.6 Terra | $1.00–2.00 | Strong coding, 1M context, good cache pricing |
| Budget | DeepSeek V4 Flash / Qwen 3.6 35B-A3B | $0.14–0.15 | Surprisingly strong coding at budget prices |
| Free | Nemotron 3 Ultra / GPT-OSS 20B | $0.00 | Best free coding models available |
| Escalation | Claude Opus 5 / GPT-5.6 Sol | $5.00 | When default fails on complex refactoring |
| Local / Self-hosted | Qwen 2.5-Coder 32B / DeepSeek-Coder | Hardware only | Full control, no API costs |
Best for Reasoning & Math
| Recommendation | Model | Input $/M | Why |
|---|---|---|---|
| Default | Claude Sonnet 4.5 / 4.6 | $3.00 | Strong reasoning, 1M context, always-on thinking (Sonnet 5+) |
| Budget | DeepSeek V4 Flash / Grok Build 0.1 | $0.14–1.00 | Reasoning models at mid/budget prices |
| Free | Nemotron 3 Ultra | $0.00 | 86.8 MMLU-Pro, 1M context |
| Escalation | Claude Fable 5 / O3 Pro | $10–20 | Always-on adaptive thinking, highest raw scores |
Best for Long-Context Analysis (100K+ tokens)
| Recommendation | Model | Input $/M | Context | Why |
|---|---|---|---|---|
| Default | Gemini 2.5 Pro / Flash | $0.30–1.25 | 1M | Best cache pricing ($0.01–0.125/M), huge window |
| Budget | Gemini 2.5 Flash-Lite / Qwen 3.7 Flash | $0.03–0.10 | 1M | Cheapest 1M context |
| OpenAI stack | GPT-4.1 / GPT-5.6 Terra | $1.00–2.00 | 1M | Good cache, strong retrieval |
| Free | Nemotron 3 Ultra / 3.5 Lightning | $0.00 | 1M | Only free 1M context models |
Best for Chatbot / Customer Service
| Recommendation | Model | Input $/M | Why |
|---|---|---|---|
| Default | Claude Haiku 4.5 / GPT-4.1 Mini | $0.40–1.00 | Fast, cheap, 200K–1M context, good instruction following |
| High-volume | Gemini 2.5 Flash-Lite / Mistral Small 3.1 | $0.09–0.125 | Sub-$0.15/M input, decent quality |
| Free tier | Free Models Router / Nemotron 3.5 Lightning | $0.00 | Auto-routes to available free model |
Best for Content Generation
| Recommendation | Model | Input $/M | Why |
|---|---|---|---|
| Default | GPT-4.1 / Claude Sonnet 4.5 | $2.00–3.00 | Natural tone, good instruction following |
| Budget | Gemini 2.5 Flash / Qwen 3.7 Plus | $0.30–0.32 | Strong creative writing at low cost |
| Long-form | Gemini 2.5 Pro / GPT-5.6 Terra | $1.00–1.25 | 1M context for book-length generation |
Best for Agentic Workflows (Tool Use, Multi-Step)
| Recommendation | Model | Input $/M | Why |
|---|---|---|---|
| Default | Claude Sonnet 4.5 / 5 / GPT-5.6 Terra | $1.00–3.00 | Best tool-use training, reliable structured output |
| Budget | DeepSeek V4 Flash / Grok Build 0.1 | $0.14–1.00 | Strong function calling at low cost |
| Escalation | Claude Opus 5 / Fable 5 | $5.00–10.00 | When multi-step fails on cheaper models |
| Local | Qwen 3-Coder / Nemotron 3 Ultra (self-hosted) | Hardware | Full control over tool execution |
Best for Multimodal (Vision + Text)
| Recommendation | Model | Input $/M | Why |
|---|---|---|---|
| Default | GPT-4.1 / Gemini 2.5 Flash | $0.30–2.00 | Strong vision, 1M context includes images |
| Budget | Qwen 3-VL 32B / Nemotron Nano 12B VL | $0.00–0.104 | Open-weight vision models |
| Specialised | GPT-5 Image / Gemini 2.5 Flash Image | $0.30–2.50 | Image generation + understanding |
The Free Models Worth Using — Detailed Breakdown
All 18 free models on OpenRouter (as of 13 Aug 2026), with specific guidance on when each is the right choice.
Tier 1: Production-Capable Free Models
| Model | Context | Strengths | Weaknesses | Use When |
|---|---|---|---|---|
| Nemotron 3 Ultra | 1M | Highest MMLU-Pro (86.8), strong reasoning, 1M context | Rate limited, no SLA, slower than paid | Evals, prototyping, non-prod reasoning tasks |
| Nemotron 3.5 Lightning | 1M | Optimised for speed, 1M context | Newer, less benchmarked | Fast free reasoning needed |
| GPT-OSS 20B | 131K | OpenAI's open-weight, good coding | Smaller context, 20B params | Free coding assistant, local fallback |
| GPT-OSS 120B | 131K | Stronger than 20B, open-weight | Still limited context | Better free coding, can self-host |
Tier 2: Specialised Free Models
| Model | Context | Specialisation | Use When |
|---|---|---|---|
| Nemotron 3 Super | 262K | General purpose, 120B | Need more capability than Nano |
| Nemotron 3 Nano / Nano Omni | 256K | Lightweight / multimodal | Cheap classification, vision tasks |
| Gemma 4 31B / 26B | 262K | Google open-weight, strong base | Want Google model, can self-host |
| Laguna S 2.1 / XS 2.1 | 262K | Code-specialised (Poolside) | Free coding-specific model |
| North Mini Code | 256K | Code-focused (Cohere) | Small code tasks |
| Nemotron Nano 12B VL / 9B | 128K | Vision + text | Free multimodal needed |
Tier 3: Meta-Models & Safety
| Model | Context | Purpose | Use When |
|---|---|---|---|
| Free Models Router | 200K | Auto-routes across free tier | Want any free model, don't care which |
| Nemotron 3.5 Content Safety | 128K | Content moderation | Need free safety classifier |
| Lyria 3 Pro / Clip Preview | 1M | Music generation (Google) | Audio generation experiments |
Critical limitation
Free tier rate limits (typically 20 req/min, 1000 req/day) make these unsuitable for production traffic. Use for development, evaluation, and internal tools only. For any user-facing production workload, budget at least $0.03/M (GPT-OSS paid tier) or $0.10/M (Gemini Flash-Lite).
Hidden Costs Deep Dive
1. Context Caching — The Agent Loop Multiplier
In a typical agent loop, the same system prompt, tool definitions, and conversation history are re-sent every turn. Without caching, a 10-turn loop with 20K context = 200K input tokens billed at full price. With caching, only the first turn pays full price; subsequent turns pay the cache-read rate (typically 5–20% of base).
| Provider | Cache Read Discount | Example (Sonnet 4.5) |
|---|---|---|
| Anthropic | 90% off (10% of base) | $3.00 → $0.30/M |
| OpenAI | 50–95% off | $2.00 → $0.10–1.00/M |
| 80–90% off | $0.30 → $0.03/M | |
| OpenRouter (varies) | 50–95% off | Model-dependent |
Design implication: Put stable content (system prompt, tools, RAG context) first. Volatile content (user messages) last. This maximises cache hits.
2. Output Token Inflation — Reasoning Models
Models with always-on thinking (Claude Fable 5, Opus 5, O1, O3) generate 3–10× more output tokens for the same visible answer. A 500-token answer may cost 5,000 output tokens. At $50/M output (Fable 5), that 500-token answer costs $0.25, not $0.025.
| Model | Thinking Mode | Typical Output Multiplier | Effective Output $/M |
|---|---|---|---|
| Claude Fable 5 | Always on | 5–10× | $250–500/M |
| Claude Opus 5 | Default high | 3–5× | $75–125/M |
| O1 / O3 Pro | Always on | 5–10× | $300–600/M |
| O3 / O4 Mini | Default high | 3–5× | $13–22/M |
| Sonnet 5 / Haiku 4.5 | Configurable | 1–3× | $5–15/M |
3. Rate Limits — Free vs Paid
Free tiers: 20–50 req/min, daily caps. Paid tiers: 1,000–10,000+ req/min. If your agent loop needs parallel execution or burst capacity, free tier will throttle you.
4. Batch Discounts — 50% Off for Async Work
OpenAI, Anthropic, and Google all offer 50% off for batch/async processing (24–48hr turnaround). Use for: evals, bulk extraction, offline report generation, nightly processing. Not for user-facing latency.
5. Tokenizer Drift — Newer Models Cost More Per Character
Claude 4.7+ tokenizer produces ~30% more tokens for the same English text vs 4.6 and earlier. GPT-4.1 tokenizer is similar. Budget 30% more input tokens when migrating to newer model generations.
How to Test Models for Your Use Case
Do not trust benchmarks. Do not trust this guide. Test on your data, your prompts, your success criteria.
Minimum Viable Evaluation (40 Cases, 1 Hour)
- Collect 40 real cases from your production logs. Weight toward failures — the cases that broke your current model.
- Define pass/fail per case. Binary is fine: "Did the agent complete the task correctly?"
- Run on current model. Record: pass rate, total input tokens, total output tokens, wall-clock time, total cost.
- Run on candidate model(s). Same 40 cases, same prompts, same tools.
- Compare cost per passing case. Not cost per token. Not pass rate alone. Cost per pass = total cost / passing cases.
The maths
Model A: $0.10/M, 80% pass rate, 50K tokens/case → $0.00625 per pass
Model B: $2.00/M, 95% pass rate, 20K tokens/case → $0.00421 per pass
The expensive model is cheaper per successful outcome.
What to Measure
- Pass rate — Binary success on your task definition
- Turns to completion — Agent loop iterations (directly drives cost)
- Total tokens (in + out) — Actual bill driver
- Wall-clock latency — User experience
- Failure modes — Categorise: tool error, hallucination, reasoning error, timeout
Automation: The Weekly Eval Habit
Add this to your CI/CD. Every Monday, run your 40-case eval on the current default model + 2 candidates. If a candidate beats the default on cost-per-pass for two consecutive weeks, promote it. This guide's weekly update exists to give you the candidate shortlist.
Weekly Update Log
This section is updated every Monday with the automated pipeline. Manual annotations by DaedalusResearch.
Week of 13 Aug 2026 — Initial Publication
- Data refresh: Pulled 409 models from OpenRouter API
- New free models: Nemotron 3.5 Lightning, Gemma 4 31B/26B, GPT-OSS 20B/120B, Laguna S/XS 2.1, Nemotron Nano VL variants
- Price drops: GPT-5 Nano at $0.05/M (batch $0.025), Gemini 2.5 Flash-Lite at $0.10/M, DeepSeek V4 Flash at $0.14/M
- New premium models: GPT-5.6 Luna/Terra/Sol families, Claude Opus 5 / Fable 5, Qwen 3.8 series
- Notable: 18 free models now available (up from ~12 in July). Budget tier deepens significantly.
- Research note: DeepSeek V4 Flash ($0.14/M) emerges as the standout budget reasoning model — 1M context, cache at $0.028/M, strong coding.
Week of 6 Aug 2026
- Price drops: GPT-4.1 Nano batch at $0.05/M, Mistral Nemo at $0.019/M
- New models: Qwen 3.7 Flash/Plus, Nemotron 3 Ultra free tier
- Research note: Mistral Nemo ($0.019/M) is the new budget floor for general-purpose — but 131K context limits long-document work.
Week of 30 Jul 2026
- Major release: GPT-5 family (Nano/Mini/Pro) with batch pricing
- Anthropic: Sonnet 5 / Opus 5 / Fable 5 / Haiku 4.5 launch
- Research note: Fable 5's always-on thinking changes the cost calculus — effective output cost 5–10× listed rate. Route selectively.
Week of 23 Jul 2026
- Google: Gemini 2.5 Pro/Flash with 1M context and aggressive cache pricing ($0.01–0.125/M cache reads)
- Research note: Gemini 2.5 Flash-Lite at $0.10/M input + $0.01/M cache read = best value for long-context RAG.
Week of 16 Jul 2026
- DeepSeek: V4 Pro/Flash launch — $0.14/M Flash is a budget reasoning breakthrough
- Qwen: 3.5/3.6 series with MoE efficiency
Automation & Maintenance
This guide is regenerated weekly via an automated pipeline:
- Data Collection (Sunday 02:00 UTC): Python script fetches OpenRouter
/api/v1/models, extracts pricing, context, cache rates. Stores JSON snapshot in versioned history. - Diff Detection: Compares against previous week — flags new models, price changes >10%, removed models, context changes.
- Enrichment: DaedalusResearch adds Artificial Analysis benchmark scores (intelligence, coding, agentic indices) where available.
- Draft Generation: Script rebuilds tier tables, use-case recommendations, and update log entry.
- Editorial Review (Monday 09:00 BST): DaedalusContent reviews diff, adds qualitative annotations, verifies no contradictory positioning with DaedalusDesign service tiers.
- Publish: Updated HTML deployed to fullauto.online via build pipeline. RSS/feed updated.
Data Collection Script
/srv/samba/workspace/Projects/Daedalus Design/Development/scripts/fetch-openrouter-pricing.py
#!/usr/bin/env python3
"""
Fetch OpenRouter model pricing and metadata.
Run weekly via cron/N8N. Outputs JSON snapshot to data/pricing/YYYY-MM-DD.json
"""
import json
import requests
import pathlib
from datetime import datetime
OUT_DIR = pathlib.Path(__file__).parent.parent.parent / "data" / "pricing"
OUT_DIR.mkdir(parents=True, exist_ok=True)
def fetch():
resp = requests.get("https://openrouter.ai/api/v1/models", timeout=30)
resp.raise_for_status()
data = resp.json()
# Normalise
models = []
for m in data.get("data", []):
pricing = m.get("pricing", {})
models.append({
"id": m["id"],
"name": m["name"],
"context": m.get("context_length"),
"input_per_m": float(pricing.get("prompt", 0)) * 1_000_000,
"output_per_m": float(pricing.get("completion", 0)) * 1_000_000,
"cache_read_per_m": float(pricing.get("input_cache_read", 0)) * 1_000_000 if pricing.get("input_cache_read") else None,
"modalities": m.get("architecture", {}).get("input_modalities", []),
"reasoning": m.get("reasoning", {}),
"created": m.get("created"),
})
snapshot = {
"fetched_at": datetime.utcnow().isoformat() + "Z",
"total_models": len(models),
"models": models,
}
date_str = datetime.utcnow().strftime("%Y-%m-%d")
(OUT_DIR / f"{date_str}.json").write_text(json.dumps(snapshot, indent=2))
# Also write latest.json for easy access
(OUT_DIR / "latest.json").write_text(json.dumps(snapshot, indent=2))
print(f"Saved {len(models)} models to {OUT_DIR}/{date_str}.json")
if __name__ == "__main__":
fetch()
N8N Workflow
Workflow ID: daedalus-price-guide-weekly on Nucleus N8N (videns.tail0d37a1.ts.net:5678).
- Trigger: Cron (Mondays 02:00 UTC)
- HTTP Request: GET OpenRouter models API
- Function: Diff against previous week (stored in N8N workflow data)
- HTTP Request: POST to DaedalusContent review endpoint (internal)
- Wait for approval
- Execute: Python build script to regenerate guide HTML
- Deploy: SCP to fullauto.online webroot