openrouter-pricing-basics

Featured

Understand OpenRouter pricing, calculate costs, and optimize spend. Use when budgeting, comparing model costs, or tracking spend. Triggers: 'openrouter pricing', 'openrouter cost', 'model pricing', 'openrouter budget', 'how much does openrouter cost'.

AI & Automation 2,940 stars 439 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# OpenRouter Pricing Basics ## Overview OpenRouter charges per token with separate rates for prompt (input) and completion (output) tokens. Prices are listed per token in the models API (multiply by 1M for per-million rates). Credits are prepaid with a 5.5% processing fee ($0.80 minimum). Free models are available for testing and low-volume use. ## How Pricing Works 1. **Buy credits** at [openrouter.ai/credits](https://openrouter.ai/credits) (5.5% fee, $0.80 minimum) 2. **Each request** deducts `(prompt_tokens * prompt_rate) + (completion_tokens * completion_rate)` 3. **Check balance** via `GET /api/v1/auth/key` or the dashboard 4. **Auto-topup** is available to prevent service interruption ## Query Model Pricing ```bash # Get pricing for all models curl -s https://openrouter.ai/api/v1/models | jq '.data[] | select(.id == "anthropic/claude-3.5-sonnet") | { id: .id, prompt_per_M: ((.pricing.prompt | tonumber) * 1000000), completion_per_M: ((.pricing.completion | tonumber) * 1000000), context: .context_length }' # → { "id": "anthropic/claude-3.5-sonnet", "prompt_per_M": 3, "completion_per_M": 15, "context": 200000 } ``` ## Cost Tiers (Representative) | Tier | Example Model | Prompt/1M | Completion/1M | Use Case | |------|--------------|-----------|---------------|----------| | Free | `google/gemma-2-9b-it:free` | $0.00 | $0.00 | Testing, prototyping | | Budget | `meta-llama/llama-3.1-8b-instruct` | $0.06 | $0.06 | Simple Q&A, classification | | Mid | `openai/gpt...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category