AI Model TrackerLLM prices & token cost calculator

Open data and API

The endpoints below are free. They need no API key and no sign-up, and they send Access-Control-Allow-Origin: * so a page in the browser can call them directly. Prices are in USD per 1 million tokens and are refreshed daily from OpenRouter's public models API.

Last updated Dec 3, 2026 · 269 active models

Model catalog

GET https://aimodels.apphelp.net/data/models

CORS: Access-Control-Allow-Origin: *.

One object per active model, plus the dataset date, the upstream source and the currency.

Model fields

FieldMeaning
idModel id, as provider/name.
nameDisplay name.
providerProvider display name.
input_per_1mInput price, USD per 1M tokens.
output_per_1mOutput price, USD per 1M tokens.
cached_input_per_1mCached-input price, USD per 1M tokens, or null when the provider does not publish one.
cache_write_per_1mCache-write price, USD per 1M tokens, or null when the provider does not publish one.
contextContext window, in tokens, or null.
max_outputMaximum output tokens, or null.
releasedRelease date (YYYY-MM-DD), or null.
urlPricing page for this model on AI Model Tracker.

Top-level fields

FieldMeaning
updatedDate this dataset was refreshed (YYYY-MM-DD).
sourcePublic API the prices were read from.
currencyAlways USD. Every price is per 1M tokens.

Example response

Two models taken from the dataset when this page is built. The live response includes every active model.

{
  "updated": "2026-12-03",
  "source": "https://openrouter.ai/api/v1/models",
  "currency": "USD",
  "models": [
    {
      "id": "anthropic/claude-sonnet-4.5",
      "name": "Claude Sonnet 4.5",
      "provider": "Anthropic",
      "input_per_1m": 3,
      "output_per_1m": 15,
      "cached_input_per_1m": 0.3,
      "cache_write_per_1m": 3.75,
      "context": 1000000,
      "max_output": 64000,
      "released": "2025-09-29",
      "url": "https://aimodels.apphelp.net/en/models/anthropic-claude-sonnet-4-5"
    },
    {
      "id": "z-ai/glm-5.4",
      "name": "GLM 5.4",
      "provider": "Z.ai (Zhipu)",
      "input_per_1m": 1.4,
      "output_per_1m": 4.4,
      "cached_input_per_1m": 0.26,
      "cache_write_per_1m": null,
      "context": 1048576,
      "max_output": 943718,
      "released": "2026-12-02",
      "url": "https://aimodels.apphelp.net/en/models/z-ai-glm-5-4"
    }
  ]
}

Compact rows

GET https://aimodels.apphelp.net/data/rows

CORS: Access-Control-Allow-Origin: *.

The same models as a short array for model pickers and cost calculators. Each row uses single-letter keys.

Row keys

FieldMeaning
sURL slug for the model page.
nDisplay name.
pProvider display name.
iInput price, USD per 1M tokens.
oOutput price, USD per 1M tokens.
kCached-input price, USD per 1M tokens, or null.
wCache-write price, USD per 1M tokens, or null.
cContext window in tokens, or null.
rRelease date (YYYY-MM-DD), or null.

Feeds and discovery

Code examples

curl

curl "https://aimodels.apphelp.net/data/models"

JavaScript

Cost of 10,000 input tokens and 2,000 output tokens for one model.

const response = await fetch("https://aimodels.apphelp.net/data/models");
const data = await response.json();
const model = data.models.find((item) => item.id === "anthropic/claude-sonnet-4.5");
const inputTokens = 10000;
const outputTokens = 2000;
const usd = (model.input_per_1m * inputTokens + model.output_per_1m * outputTokens) / 1000000;
console.log(usd);

Python

Standard library only (urllib). Same calculation: 10,000 input tokens and 2,000 output tokens.

import json
import urllib.request

with urllib.request.urlopen("https://aimodels.apphelp.net/data/models") as response:
    data = json.load(response)

model = next(item for item in data["models"] if item["id"] == "anthropic/claude-sonnet-4.5")
input_tokens = 10000
output_tokens = 2000
usd = (model["input_per_1m"] * input_tokens + model["output_per_1m"] * output_tokens) / 1000000
print(usd)

License and attribution

This data is free to use under the Creative Commons Attribution 4.0 license. Attribution is a visible link to this site, with the text “Data: AI Model Tracker by AppHelp”. Pricing facts come from OpenRouter's public API and may differ from a provider's own prices. The data is provided with no warranty.

CC BY 4.0

Data: AI Model Tracker by AppHelp

Copy-paste HTML

Data: <a href="https://aimodels.apphelp.net">AI Model Tracker by AppHelp</a>

Please cache

The dataset changes at most once a day. Cache the response instead of requesting it on every page view.

Open-source dataset & TypeScript library (llm-prices)

Code is MIT. The dataset is CC BY 4.0. Daily JSON and CSV, plus an estimateCost() helper.

View on GitHub

Install

Install the library from the GitHub repository.

npm i github:onlylhf/llm-prices
BlogPressOpen dataGitHub · llm-prices