← 返回 Skills 市场
zzfly256

Openrouter Models Pricing

作者 Rytia · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ pending
0
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install openrouter-models
功能描述
拉取并分析 OpenRouter 模型目录——涵盖 8 项定价(prompt / completion / cache_read / cache_write / web_search / reasoning / image / audio)、上下文长度及输入输出模态(text、image、file、audio、v...
使用说明 (SKILL.md)

OpenRouter Models Analyzer

Pulls the live model catalog from https://openrouter.ai/api/v1/models, normalizes prices to $ / 1M tokens, and lets you filter / sort / compare models across providers.

Quick start

# 1. Fetch the catalog (no API key needed — endpoint is public)
python3 scripts/fetch_models.py
# -> writes models_raw.json next to the script

# 2. Analyze
python3 scripts/analyze.py --family anthropic/
python3 scripts/analyze.py --free --has-image
python3 scripts/analyze.py --has-cache --sort input_cache_read --limit 10
python3 scripts/analyze.py --has-image --min-ctx 1000000 --sort prompt --limit 20

The analyze.py script does not need network access — it works off the cached models_raw.json. Re-run fetch_models.py to refresh.

Tip: Always run fetch_models.py first to ensure the data is current.

What you get per model

  • id, name, context_length
  • modality (legacy string) plus input_modalities / output_modalities lists
  • tokenizer
  • 8 normalized prices in $ / 1M tokens (or $ / 1M calls for web_search): prompt, completion, input_cache_read, input_cache_write, web_search, internal_reasoning, image, audio

See references/pricing_fields.md for the full schema and unit gotchas (notably that web_search is per call, not per token, and -1 means variable pricing on router models).

Filter flags

Flag Effect
--family PREFIX id starts with PREFIX, e.g. anthropic/, openai/, qwen/
--keyword K case-insensitive substring match on id or name
--min-ctx / --max-ctx context-length window
--has-image / --has-audio / --has-video / --has-file input modality
--outputs-image output modality contains image
--free prompt == 0 AND completion == 0
--has-cache input_cache_read is priced
--has-reasoning-price internal_reasoning is priced

Sort keys

id (default), prompt, completion, input_cache_read, input_cache_write, web_search, internal_reasoning, ctx.

Missing values sort to the end regardless of direction.

Use --desc to sort in descending order (e.g. most expensive first).

Output formats

  • Default: aligned text table with all 8 pricing columns
  • --json: structured JSON output (ideal for programmatic consumption)
  • --stats: print coverage statistics (how many models have each pricing field, modality breakdown)

Typical analyses

# Cheapest cache_read among vision-capable 1M-context models
python3 scripts/analyze.py --has-image --min-ctx 1000000 \
    --has-cache --sort input_cache_read --limit 10

# All free models that take image input
python3 scripts/analyze.py --free --has-image

# Most expensive models (per prompt)
python3 scripts/analyze.py --sort prompt --desc --limit 15

# Reasoning-priced models
python3 scripts/analyze.py --has-reasoning-price

# Models with image output (image generators)
python3 scripts/analyze.py --outputs-image

# JSON output for programmatic use
python3 scripts/analyze.py --family anthropic/ --json

# Coverage statistics
python3 scripts/analyze.py --stats

Provider cheat sheet

See references/model_families.md for the full list of provider prefixes and naming conventions (-thinking, -vl, :free, etc.).

Common ones:

  • anthropic/, openai/, google/, x-ai/ — frontier
  • meta-llama/, deepseek/, qwen/, mistralai/, nvidia/, microsoft/, amazon/
  • openrouter/auto, openrouter/fusion — variable-price routers (-1)

Notes & caveats

  • web_search is per call, not per token — the script displays it as $/1M calls (i.e. the value is dollars per 1M invocations).
  • -1 for prompt / completion means variable pricing (router models). The script filters these out of numeric columns and renders -.
  • Not all models expose every pricing field. Use --stats to see current coverage for each field.
  • modality is the legacy compact string; the input_modalities / output_modalities lists are canonical.
  • top_provider.context_length may be smaller than the model's own context_length for a specific provider endpoint.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install openrouter-models
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /openrouter-models 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release: Fetches and analyzes the OpenRouter live model catalog. - Supports filtering and sorting by 8 price categories, context length, and input/output modalities (text, image, file, audio, video). - Enables comparison by provider, free/paid status, and specialized abilities (e.g., image input/output, cache, reasoning). - Offers output as aligned tables, JSON, or coverage statistics, suitable for data analysis or automation. - Usable for quick queries like "cheapest X-capable model", all models of a family, or free model listings. - Designed exclusively for models listed on OpenRouter, not for general LLM pricing or generation tasks.
元数据
Slug openrouter-models
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Openrouter Models Pricing 是什么?

拉取并分析 OpenRouter 模型目录——涵盖 8 项定价(prompt / completion / cache_read / cache_write / web_search / reasoning / image / audio)、上下文长度及输入输出模态(text、image、file、audio、v... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 0 次。

如何安装 Openrouter Models Pricing?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install openrouter-models」即可一键安装,无需额外配置。

Openrouter Models Pricing 是免费的吗?

是的,Openrouter Models Pricing 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Openrouter Models Pricing 支持哪些平台?

Openrouter Models Pricing 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Openrouter Models Pricing?

由 Rytia(@zzfly256)开发并维护,当前版本 v1.0.0。

💬 留言讨论