LLM pricing API
List prices, prompt-cache rates, context windows and output limits for 66 AI models from 9 vendors, as free JSON and CSV. No key, no sign-up, open to browsers (CORS). Every row links to the vendor page it was read from and the day it was checked.
- Models
- 66
- 39 current, 27 legacy
- Vendors
- 9
- read from their own pages
- Every row checked since
- checks run weekly
- Licence
- CC BY 4.0
- free to reuse with credit
Files
/api/models.json
Every row with licence and check date
/api/models.csv
The same rows for spreadsheets and pandas
/api/models.schema.json
JSON Schema for validation and codegen
Also listed in the OpenAPI spec and in llms.txt. The files are static and carry an ETag, so a request with If-None-Match returns an empty 304 until the data changes.
Quick start
Shell (curl and jq)
curl -s https://aidevhub.io/api/models.json \
| jq '.models[] | select(.status == "current")
| {name, input_usd_per_mtok, output_usd_per_mtok}' Python, standard library
import json
import urllib.request
# Cloudflare, which serves these files, refuses Python's default
# user agent, so name your client.
request = urllib.request.Request(
"https://aidevhub.io/api/models.json",
headers={"User-Agent": "my-app/1.0"},
)
with urllib.request.urlopen(request) as response:
catalog = json.load(response)
for m in catalog["models"]:
if m["status"] == "current":
print(m["name"], m["input_usd_per_mtok"], m["output_usd_per_mtok"]) Python, pandas
import pandas as pd
models = pd.read_csv(
"https://aidevhub.io/api/models.csv",
storage_options={"User-Agent": "my-app/1.0"},
) JavaScript (browser or Node.js)
const { models } = await fetch("https://aidevhub.io/api/models.json").then((r) => r.json());
// Cost of one request at list price, in US dollars
const cost = (model, inputTokens, outputTokens) =>
(inputTokens * model.input_usd_per_mtok + outputTokens * model.output_usd_per_mtok) / 1e6;
const model = models.find((m) => m.id === "claude-fable-5-1");
console.log(cost(model, 10_000, 1_000)); One row
Claude Fable 5.1, exactly as /api/models.json serves it today:
{
"id": "claude-fable-5-1",
"name": "Claude Fable 5.1",
"provider": "Anthropic",
"status": "current",
"flagship": true,
"input_usd_per_mtok": 10,
"output_usd_per_mtok": 50,
"cached_input_usd_per_mtok": 0.25,
"cache_write_usd_per_mtok": 12.5,
"price_scope": "5-minute cache writes",
"context_window_tokens": 1000000,
"max_output_tokens": 128000,
"released": "2026-09",
"source": "https://platform.claude.com/docs/en/about-claude/models/overview",
"verified_at": "2026-10-03"
} Fields
The CSV has the same columns in this order; an empty cell is null. Fields may be added over time, but none is renamed or removed.
| Field | Type | Meaning |
|---|---|---|
| id | string | Stable catalog id of the model. |
| name | string | Model name as the vendor writes it. |
| provider | string | The company whose API sells the model at these prices. |
| status | "current" or "legacy" | current: in the vendor's present lineup. legacy: still on sale, but superseded by a newer model. |
| flagship | boolean | true for the provider's top model in this catalog. |
| input_usd_per_mtok | number | List price per million input tokens. Unit: USD per 1M tokens. |
| output_usd_per_mtok | number | List price per million output tokens. Unit: USD per 1M tokens. |
| cached_input_usd_per_mtok | number or null | Price per million input tokens served from the prompt cache. null when the catalog records no cached rate. Unit: USD per 1M tokens. |
| cache_write_usd_per_mtok | number or null | Price per million tokens written to the prompt cache. null when the vendor bills no separate write rate or the catalog records none. Unit: USD per 1M tokens. |
| price_scope | string or null | The condition the prices apply to when the vendor attaches one, such as a prompt-length band, a region, a cache duration or a promotion end date. null when none is recorded. |
| context_window_tokens | integer | Context window as the vendor states it. Unit: tokens. |
| max_output_tokens | integer or null | Most output tokens one response can have, as the vendor states it. null when not recorded. Unit: tokens. |
| released | string | Release month, YYYY-MM. |
| source | string | The vendor page this row was read from. |
| verified_at | string | The day this row was last checked against that page, YYYY-MM-DD. |
At the top level, prices_verified is the oldest verified_at in the file, and count is the number of rows.
How the data stays current
Vendor pricing and model pages are checked every week. A changed price or a new model is extracted, checked a second time independently, and only then published; the files are rebuilt with the site. The method and its limits are on how we source model data.
The same rows drive the AI model comparison table and the AI model pricing calculator, so the files and those pages show the same figures.
Licence and credit
The catalog data (the rows in models.json and models.csv) is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). You may copy, share and build on it, commercially too, if you credit AI Dev Hub with a link, link the licence and say whether you changed the data. The licence covers this dataset only, not the rest of the site.
A credit line that meets the licence:
Model prices: AI Dev Hub (https://aidevhub.io/llm-pricing-api/), CC BY 4.0 Model prices: <a href="https://aidevhub.io/llm-pricing-api/">AI Dev Hub</a>, <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a> Before you rely on a figure
These are list prices as each vendor published them on the day in verified_at. What you pay can differ: batch and priority tiers, regional and volume pricing, free tiers, taxes and prices for longer prompts are not in a row unless price_scope names them. Check the linked vendor page before you budget, bill or quote on a figure.
The data is provided as is, without any warranty of accuracy or completeness; our terms of use apply. Model and company names are trademarks of their owners. AI Dev Hub is not affiliated with or endorsed by any vendor listed.
Spotted an error? Email hello@aidevhub.io with the model and the vendor page that shows the correct figure.