API · MCP
本サイトの背後にある正規化済みの価格・機能・ランキングデータは、静的 JSON として公開しています。無料で取得でき、API キーは不要です。コードやエージェントから直接参照できます。
エンドポイント
全モデル:canonical エントリ、公式 + 最安チャネル価格、総合単価、コンテキスト、能力、Artificial Analysis スコア、30日間の使用量。
全プロバイダー:名称、階層(ファーストパーティ / クラウド / ゲートウェイ)、モデル数、SDK、API ベース、ドキュメント。
AI クローラー向けのプレーンテキストのサイト概要(llms.txt 慣習)。
CDN から静的ファイルとして配信しているため、レート制限はありません。それでもリクエストごとに取り直すのではなく、レスポンスをキャッシュしてください。データはビルドごとに更新されます。
主なフィールド(models.json)
id, name, lab, kindcanonical id、表示名、ラボ、モデル種別。reference / cheapestリファレンス(公式/定価)と最安の有料チャネル。それぞれ 1M トークンあたりの入力/出力/キャッシュ読み取り。blendedRef / blendedMin / blendedTrusted総合単価(入力×0.75 + 出力×0.25)を、リファレンス・最安・最安の信頼(ゲートウェイ除外)チャネルについて。context, outputLimit, capabilitiesコンテキストウィンドウ、最大出力、三値の能力フラグ(true/false/null)。aa (idx, coding, agentic, speed, taskCost)Artificial Analysis の知能・コーディング・エージェント指数、出力速度、タスクあたりコスト(対象外は null)。usage (rank, tokens, share)OpenRouter の30日使用量ランク、総トークン数、シェア(未追跡は null)。hostCount, spread何社のプロバイダーがそのモデルをホストするか、およびプラットフォーム間の価格差。例
curl と jq で総合単価が最も安い 5 モデルを取得:
curl -s https://llmpricing.dev/api/models.json \
| jq '.models
| map(select(.blendedMin != null))
| sort_by(.blendedMin)[:5]
| .[] | {name, blendedMin, cheapest: .cheapest.provider}'JavaScript(fetch):
const res = await fetch("https://llmpricing.dev/api/models.json");
const { meta, models } = await res.json();
// 5 cheapest by blended price (input x0.75 + output x0.25)
const cheapest = models
.filter((m) => m.blendedMin != null)
.sort((a, b) => a.blendedMin - b.blendedMin)
.slice(0, 5);
console.log(meta.syncedAt, cheapest);Python(requests):
import requests
data = requests.get("https://llmpricing.dev/api/models.json").json()
models = data["models"]
# highest Artificial Analysis intelligence with a public price
ranked = sorted(
(m for m in models if m["aa"] and m["aa"]["idx"] is not None),
key=lambda m: m["aa"]["idx"],
reverse=True,
)
for m in ranked[:5]:
print(m["name"], m["aa"]["idx"], m["blendedMin"])エンドポイントは Access-Control-Allow-Origin: * を送るため、ブラウザからも利用できます。
MCP サーバー
データは HTTPS 上のクリーンな JSON なので、fetch 可能な MCP サーバーならエージェントに公開できます。例として、リファレンスの fetch サーバー:
{
"mcpServers": {
"llm-pricing": {
"command": "uvx",
"args": ["mcp-server-fetch"]
}
}
}続いてエージェントに https://llmpricing.dev/api/models.json を読ませて推論させます。予算内で最も安いモデル、1 ドルあたりの知能が最も高いモデル、あるモデルをどの提供元がホストしているか、といった問いに答えられます。
ライセンスと表示
データは models.dev(MIT)、Artificial Analysis、OpenRouter を統合したものです。CC BY 4.0 のもとで再利用できます。LLM Pricing と上流ソースへの表示は残してください。