Skip to main content
Glama
AICostBudget AI API Pricing

AICostBudget AI API Pricing

AI API Pricing Dataset: LLM prices as JSON, CSV and a free API

Current input, output, cached-input and batch prices for OpenAI, Anthropic Claude, Google Gemini, xAI Grok, DeepSeek, Mistral AI, Cohere, Moonshot AI (Kimi), Alibaba Qwen, Meta, Perplexity, Amazon Nova, Z.ai (Zhipu) and MiniMax. Every record links to the provider's own pricing page and carries the date it was last checked. Unknown prices stay null, never 0.

Last verified Models npm downloads Validate Code license: MIT Data license: CC BY 4.0

curl -L https://aicostbudget.github.io/ai-api-pricing-data/api/v1/prices.json

Compare every model side by side → · Estimate your monthly bill · See recent price changes

Prices at a glance

USD per 1M tokens, standard list price. 191 models tracked, last verified 2026-11-10.

Provider

Active token-priced models

Lowest output price (input / output)

Highest output price (input / output)

OpenAI

16

GPT-6 Luna $0.10 / $0.50

GPT-5.5 Pro $30.00 / $180.00

Anthropic

13

Claude Haiku 5.5 $0.10 / $0.50

Claude Mythos 5.1 $10.00 / $50.00

Google Gemini

11

Gemini 3.1 Flash-Lite $0.25 / $1.50

Gemini 3.5 Transcribe Live $3.50 / $21.00

xAI

6

Grok 4.20 (Non-Reasoning) $1.25 / $2.50

Grok 4.7 $2.00 / $6.00

DeepSeek

2

DeepSeek V4.1 Flash $0.30 / $1.20

DeepSeek V4 Pro $1.32 / $3.96

Mistral AI

5

Ministral 3 3B $0.10 / $0.10

Codestral $0.30 / $0.90

Cohere

2

Aya Expanse 32B $0.50 / $1.50

Command R+ 08-2024 $2.50 / $10.00

Moonshot AI (Kimi)

3

Kimi K3.1 Pro $2.00 / $10.00

Kimi K3.1 Pro Highspeed $4.00 / $20.00

Alibaba Qwen

4

Qwen Flash $0.05 / $0.40

Qwen3.8 Max $2.00 / $6.00

Meta

1

Muse Spark 1.3 $1.25 / $4.25

same model

Perplexity

1

Sonar $0.25 / $2.50

same model

Amazon Nova

6

Nova Micro $0.035 / $0.14

Nova Pro $0.80 / $3.20

Z.ai (Zhipu)

6

GLM-5.3-Flash $0.15 / $0.50

GLM-5.3 $1.40 / $4.40

MiniMax

2

MiniMax M3.1 Flash $0.15 / $0.60

MiniMax M3 $0.30 / $1.20

Batch, cached-input, cache-write, long-context and non-token prices are in the full data.

Click a provider for its full price list, or a model for its JSON record. If this saves you a scrape, a ⭐ helps other developers find it. To hear about price changes, subscribe to the price-change Atom feed.

Related MCP server: Price Tracker AI MCP

Get the data

Format

Where

JSON

api/v1/prices.json

CSV

api/v1/prices.csv

One model

api/v1/models/<provider>/<model>.json, e.g. openai/gpt-4.1

Build metadata

api/v1/meta.json (generated_at, last_verified_at)

Hugging Face

aicostbudget-ai/ai-api-pricing and the price history dataset

JavaScript / TypeScript

npm install ai-api-pricing: prices, comparisons and token-cost estimates (docs)

AI assistants (MCP)

npx -y ai-api-pricing-mcp: read-only tools for prices, monthly estimates, comparisons and price changes (setup)

Documentation: dataset page · model schema · pricing contract · methodology · distribution projections

Code examples

Python

import json
import urllib.request

url = "https://aicostbudget.github.io/ai-api-pricing-data/api/v1/models/openai/gpt-4.1.json"
with urllib.request.urlopen(url) as response:
    model = json.load(response)

print(model["provider_id"], model["model_id"], model["pricing"]["input"])

JavaScript

const url = "https://aicostbudget.github.io/ai-api-pricing-data/api/v1/models/openai/gpt-4.1.json";

async function main() {
  const response = await fetch(url);
  const model = await response.json();

  console.log(model.provider_id, model.model_id, model.pricing.input);
}

main();

Interactive Tools

Pricing Beyond Chat Tokens

Some APIs bill per character, per image or per page instead of per chat token. These website pages compare them:

Explore Pricing by Provider

Provider

Pricing page

Coverage

OpenAI

OpenAI API pricing

GPT models, cached input, cache-write pricing, batch and alternative processing modes, and long-context tiers

Anthropic

Anthropic API pricing

Claude models, prompt caching, cache-write pricing, and batch pricing

Google Gemini

Google Gemini API pricing

Gemini models, multimodal pricing, TTS, batch pricing, and cached input

xAI

xAI API pricing

Grok models, long-context tiers, processing-mode pricing, and speech/transcription pricing

DeepSeek

DeepSeek API pricing

DeepSeek chat and reasoning models, including cached-input pricing where available

Mistral AI

Mistral AI API pricing

Mistral model pricing with structured source and verification metadata

Cohere

Cohere API pricing

Cohere model pricing and supported non-token services

Moonshot AI

Moonshot AI API pricing

Kimi model pricing with automatic prefix-cache hit rates

Alibaba Qwen

Alibaba Qwen API pricing

Qwen list prices for the International (Singapore) scope, including per-request 256K tiers

Meta

Meta Muse API pricing

Muse Wonder and Muse Spark Standard-mode prices from Meta Model API

Perplexity

Perplexity Sonar API pricing

Sonar token prices, plus the per-call web search and fetch fees billed on top

Amazon Nova

Amazon Nova API pricing

Nova 2 Lite, Pro, Lite and Micro on Amazon Bedrock, with batch and cached input rates

Z.ai (Zhipu)

Z.ai GLM API pricing

GLM-5.3, GLM-5 and GLM-4.7 international USD prices with cached input

MiniMax

MiniMax API pricing

MiniMax M3 and M3.1 Flash international USD prices with long-context, Priority and cached input rates

Dataset Trust & Freshness

This repository publishes a versioned dataset and read-only static API for AI API pricing. It is designed for developers, SaaS builders, FinOps teams, researchers, technical writers, and AI systems that need maintained pricing records instead of ad hoc scraped snippets.

This project is maintained as an independent public dataset by AICostBudget.

Why this dataset?

  • Source-linked pricing records

  • Unknown or unverified values remain null, never 0

  • Versioned JSON and CSV outputs

  • Per-model history files

  • Dated full snapshots

  • Read-only static API

  • Suitable for calculators, dashboards, cost analysis, and AI FinOps tooling

The weekly freshness workflow checks source URLs and stale last_verified_at values. It does not guess, infer, or overwrite prices automatically.

Use Cases

  • Compare AI model prices

  • Estimate monthly AI API cost

  • Build LLM cost dashboards

  • Plan SaaS AI feature budgets

  • Track model pricing changes

Dataset Coverage

The dataset covers multiple AI providers and supports both token-based and non-token pricing structures.

Coverage includes:

  • Standard input and output token pricing

  • Cached input and cache-write pricing

  • Batch and alternative processing modes

  • Long-context, usage-tier, and conditional pricing

  • Multimodal and non-token pricing

  • TTS, speech, and transcription pricing

  • Model lifecycle, provenance, and verification metadata

  • Structured conditional pricing components

Fields

The CSV output uses the following fields:

Field

Meaning

provider_id

Stable provider identifier.

model_id

Stable model identifier within the provider.

display_name

Human-readable model name.

model_family

Model family or grouping when available.

status

Model availability or lifecycle status.

currency

Pricing currency.

unit

Pricing unit, such as per-token or per-million-token billing units.

input

Input token price for the listed unit.

output

Output token price for the listed unit.

cached_input

Cached input token price when available.

cache_write

Cache write price when available.

batch_input

Batch input token price when available.

batch_output

Batch output token price when available.

official_source_url

Provider page or document URL used for source checking.

accessed_at

Date when the source was accessed.

last_verified_at

Date when the record was last verified.

effective_from

Date when the listed pricing became effective, if known.

notes

Additional context or caveats for the record.

API Reference

The static API is published through GitHub Pages:

  • /api/v1/prices.json

  • /api/v1/prices.csv

  • /api/v1/meta.json

  • /api/v1/providers/<provider>.json

  • /api/v1/models/<provider>/<model>.json

Unknown or unverified prices are represented as null, never 0.

The CSV output includes normalized pricing fields for provider, model, pricing unit, source URL, verification dates, and notes.

Historical Pricing

To read the history instead of parsing it, see the LLM API price history page.

Per-model history files are stored under:

data/history/<provider>/<model>.jsonl

Dated full snapshots are stored under:

data/snapshots/<YYYY-MM-DD>/prices.json
data/snapshots/<YYYY-MM-DD>/prices.csv

The first pricing release of a UTC day uses the plain date. A later release on the same UTC day gets a sequence suffix (2026-10-21-2, 2026-10-21-3, …) so earlier snapshots are never rewritten. Snapshots order by date, then sequence; the date part is the event detected_at date.

Price changes between snapshots are recorded as events in data/price-change-events/events.jsonl; see price change events for the rules.

Older price changes from OpenAI, Anthropic, Google, DeepSeek, Mistral and xAI, going back to 2024, are in data/archive-history/price-changes-2024-2026.v1.json. Each one links the archived pricing page before and after the change; see archived price changes.

Cost per successful task

Token prices are only half of the bill: retries and fallbacks decide what one correct answer costs. examples/llm_cost_diagnostics.py splits first-attempt, retry and fallback spend from your own attempt logs, and the open LLM cost-per-task benchmark measures it on 16 tasks with your own API keys. Its first run found a flagship model matching a cheap one on accuracy at 5–9× the cost per successful task.

Methodology

Prices are accepted only from official provider pricing pages, official documentation, official APIs, or official announcements. Third-party calculators, SEO pages, Reddit posts, and competitor aggregators are not used as final price sources.

See METHODOLOGY.md.

Cite this dataset

For reproducible research, cite the frozen v1.1.0 release:

AICostBudget. AICostBudget AI API Pricing Dataset, v1.1.0 (snapshot 2026-09-30). https://doi.org/10.5281/zenodo.23087250.

The DOI identifies this fixed release, not the latest data. CITATION.cff provides its machine-readable citation metadata. The canonical live dataset continues to update; for current operational use, cite that URL with your access date. The export's generated_at and last_verified_at timestamps are separate from the access date. See the release process for projection and checksum rules.

Contributing

Contributions are welcome when they include official sources and preserve null for unknown values. See CONTRIBUTING.md.

License

Code is licensed under MIT in LICENSE-CODE. Data is licensed under Creative Commons Attribution 4.0 in LICENSE-DATA.

Disclaimer

AI API prices change frequently. Always verify official provider pricing pages before making production budget decisions.

This dataset is informational and may lag provider pricing changes. Provider names and trademarks belong to their respective owners. This project is not affiliated with, endorsed by, or sponsored by any listed provider.

Available Tools

5 tools
compare_modelsCompare modelsB
Read-onlyIdempotent

Compare monthly costs for multiple models and sort them from lowest to highest total.

Inputs: models (required), requests_per_month (required), input_tokens_per_request (required), output_tokens_per_request (require… Returns: data, source, verified_at, aicostbudget_url, +2 more

estimate_monthly_costEstimate monthly costB
Read-onlyIdempotent

Estimate monthly token cost from request volume, with optional cached-input and batch pricing.

Inputs: model (required), requests_per_month (required), input_tokens_per_request (required), output_tokens_per_request (required… Returns: data, source, verified_at, aicostbudget_url, +2 more

get_model_priceGet model priceA
Read-onlyIdempotent

Find a model by ID or display name and return source-linked prices.

Inputs: model (required). Returns: data, source, verified_at, aicostbudget_url, +2 more

list_modelsList modelsB
Read-onlyIdempotent

List source-linked models, optionally filtering by provider and maximum token prices.

Inputs: provider, max_input_price, max_output_price. Returns: data, source, verified_at, aicostbudget_url, +2 more

price_changesPrice changesB
Read-onlyIdempotent

List up to 20 newest source-linked price-change events.

Inputs: since, provider. Returns: data, source, verified_at, aicostbudget_url, +2 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 5 tools

    Disambiguation4/5

    Each tool targets a distinct operation: listing models, looking up a price, estimating cost, comparing costs, and tracking price changes. compare_models and estimate_monthly_cost both compute costs, but their inputs (multiple models vs. request volume) and outputs are clearly differentiated.

    Naming Consistency4/5

    Four of five names follow a verb_noun snake_case pattern (compare_models, estimate_monthly_cost, get_model_price, list_models); price_changes is a noun phrase but still readable and consistent in casing.

    Tool Count5/5

    5 tools is well-scoped for a pricing data server; each tool covers a distinct capability (list, get, estimate, compare, change history) without redundancy.

    Completeness4/5

    Core lifecycle for pricing data (list, get, estimate, compare, change history) is covered. Minor gaps include no batch estimation across different request volumes or provider-specific metadata beyond price filtering.

    Maintenance

    ActivityActive
    ResponsivenessUsually handled

    Related MCP Connectors

    Related MCP Servers

    Appeared in Searches