← Back to Tools

API · MCP

The normalized pricing, capability and leaderboard data behind this site is published as plain static JSON, free to fetch and without an API key. Point your code or an agent straight at it.

Endpoints

All models: canonical entry, official + cheapest channel price, blended prices, context, capabilities, Artificial Analysis scores and 30-day usage.

All providers: name, tier (first-party / cloud / gateway), model count, SDK, API base and docs.

Plain-text site summary for AI crawlers (llms.txt convention).

Served as static files from a CDN, so there are no rate limits. Please still cache responses rather than refetching on every request. Data refreshes on each build.

Key fields (models.json)

id, name, lab, kindCanonical id, display name, lab and model kind.
reference / cheapestReference (official/list) and cheapest paid channel, each with input/output/cache-read per 1M tokens.
blendedRef / blendedMin / blendedTrustedBlended unit price (input×0.75 + output×0.25) for the reference, lowest and lowest-trusted (gateways excluded) channels.
context, outputLimit, capabilitiesContext window, max output, and tri-state capability flags (true/false/null).
aa (idx, coding, agentic, speed, taskCost)Artificial Analysis intelligence, coding, agentic indices, output speed and cost per task (null when uncovered).
usage (rank, tokens, share)OpenRouter 30-day usage rank, total tokens and share (null when untracked).
hostCount, spreadHow many providers host the model and the cross-platform price spread.

Examples

Five cheapest models by blended price, with curl and jq:

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"])

Endpoints send Access-Control-Allow-Origin: *, so they work from the browser too.

MCP server

Because the data is clean JSON over HTTPS, any fetch-capable MCP server can expose it to an agent. For example, the reference fetch server:

{
  "mcpServers": {
    "llm-pricing": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    }
  }
}

Then ask the agent to read https://llmpricing.dev/api/models.json and reason over it: the cheapest model within a budget, the best intelligence per dollar, which providers host a given model.

A first-party MCP server with typed tools (search_models, cheapest, compare) is on the roadmap. Until then the JSON endpoints above are the stable interface.

License & attribution

Data is aggregated from models.dev (MIT), Artificial Analysis and OpenRouter. You may reuse it under CC BY 4.0, keeping attribution to LLM Pricing and the upstream sources.