Skip to content
optera

Open data · prices checked October 12, 2026

LLM API prices as open data

Every list price on iOPTERA in one JSON or CSV file: 29 current models from OpenAI, Anthropic, Google, xAI and DeepSeek, plus older ones, 44 rows in all. Each price is checked against the provider's own pricing page. Free to use, with a link back.
Current models
29
44 rows with older models
Providers
5
first-party APIs only
Last full check
Oct 12, 2026
against every pricing page
Licence
CC BY 4.0
free with credit

Current prices

USD per million tokens, standard tier, shortest-context band. The files also hold deprecated and retired models with their last list price.

ModelInputOutput
Claude Haiku 5.5Anthropic$0.10$0.50
GPT-6.1 SolOpenAI$2.00$10.00
Claude Sonnet 5.5Anthropic$2.00$10.00
Claude Opus 5.5Anthropic$4.00$20.00
GPT-6 LunaOpenAI$0.10$0.50
GPT-6 SolOpenAI$2.00$10.00
Grok 4.7xAI$2.00$6.00
DeepSeek V4.1 FlashDeepSeek$0.30$1.20
GPT-6 AstraOpenAI$10.00$50.00
Gemini 3.8 FlashGoogle$0.75$3.75
Claude Fable 5.1Anthropic$10.00$50.00
Claude Opus 5Anthropic$5.00$25.00
GPT-5.6 LunaOpenAI$0.20$1.20
GPT-5.6 SolOpenAI$4.00$20.00
GPT-5.6 TerraOpenAI$2.00$12.00
Grok 4.5xAI$2.00$6.00
Claude Sonnet 5Anthropic$2.00$10.00
Claude Fable 5Anthropic$10.00$50.00
Claude Opus 4.8Anthropic$5.00$25.00
Gemini 3.1 Flash-LiteGoogle$0.25$1.50
DeepSeek V4 ProDeepSeek$1.32$3.96
Gemini 3.1 ProGoogle$2.00$12.00
Claude Sonnet 4.6Anthropic$3.00$15.00
Claude Opus 4.6Anthropic$5.00$25.00
GPT-5.2OpenAI$1.75$14.00
Claude Haiku 4.5Anthropic$1.00$5.00
GPT-4.1OpenAI$2.00$8.00
GPT-4o MiniOpenAI$0.15$0.60
GPT-4oOpenAI$2.50$10.00

Use it from code

One request returns the whole table. No key, no sign-up.

curl + jq

curl -s https://ioptera.com/data/llm-prices.json | jq '.models[] | select(.status == "active") | {name, inputPerMillion, outputPerMillion}'

Python

import requests

prices = requests.get("https://ioptera.com/data/llm-prices.json", timeout=10).json()
for m in prices["models"]:
    if m["status"] == "active":
        print(m["name"], m["inputPerMillion"], m["outputPerMillion"])

JavaScript

const res = await fetch("https://ioptera.com/data/llm-prices.json");
const { models } = await res.json();
const cost = (id, inputTokens, outputTokens) => {
  const m = models.find((x) => x.id === id);
  return (inputTokens * m.inputPerMillion + outputTokens * m.outputPerMillion) / 1e6;
};

Both files allow cross-origin requests, so a web page can fetch them directly. Prices change a few times a month at most; fetching once a day is plenty.

What each row contains

All prices are in US dollars per million tokens.

FieldMeaning
idStable model id, also the last part of the model's page address. Never renamed.
statusactive, deprecated (shutdown announced), superseded, or retired (no longer served by the provider).
inputPerMillionList price for input tokens; outputPerMillion is the same for output tokens.
cachedInputPerMillionPrice of input read from the prompt cache. null when the provider publishes none.
longContextRates for long prompts: the threshold in tokens and the higher input and output prices. “none” when the provider bills the whole context window at the list price, null when nothing is published.
batchDiscountDiscount on the provider's batch API as a fraction (0.5 = half price); 0 when there is no batch API.
contextWindowMaximum tokens per request.
retiresAtAnnounced shutdown date, or null. releasedAt is the launch date.
scheduledPriceA published price change that has not happened yet: the day it starts and the new prices. null when there is none.
priceVerifiedAtThe day this model's price was last checked against the provider's page.
sourceUrlThe provider page the price was checked against. url links the model's page on iOPTERA.

How fresh it is

The files are rebuilt whenever a price changes. A daily job compares every model with two independent price sources, and a weekly check reads each provider's own pricing page; a change is published only once the official page confirms it.

Every current model's price was last checked on all providers' pages on October 12, 2026.

How prices are checked

Licence and credit

CC BY 4.0: use the data anywhere, commercial products included, as long as you credit iOPTERA with a link to this page.

Cite it

iOPTERA (2026). LLM API prices. https://ioptera.com/en/pricing-api

Link to it

<a href="https://ioptera.com/en/pricing-api">LLM API prices by iOPTERA</a>
Read the CC BY 4.0 licence