IAEXPLAINED SIMPLY7 MIN

What an AI API is, and what "$2 per million tokens" actually buys you

An API lets software use ChatGPT or Claude without the chat window and bills for every chunk of text the model reads and writes. By our math at October's official rates, summarizing a thousand emails costs anywhere from 20 cents to $20, depending on the model.

Close-up of colorful programming code on a screen
Image: Slashme · CC0

An AI API is how software, rather than a person, asks a model such as GPT-6.1 Sol or Claude Sonnet 5.5 to do work. There's no chat window. A store's customer-service system, for example, sends the text of an email over the internet along with a secret key that identifies the account. The model sends back an answer, and the software uses it to tag the email or draft a reply.

You pay for what you use, measured in tokens, the chunks of text a model reads and writes. A price like "$2 per million input tokens and $10 per million output tokens," which is what Sonnet 5.5 and GPT-6.1 Sol cost as of October 27, 2026, means reading a million tokens costs $2 and writing a million costs $10. By our math, at those rates summarizing a thousand long emails runs about $4. With the cheapest models from both companies, it's about 20 cents.

01

How it differs from ChatGPT or Claude on the web

The apps charge a flat monthly fee, or nothing on the free tier, and give you the model inside a product with usage limits. Claude Pro, for instance, is $20 a month billed monthly. The API works like a meter: every request adds up what the model read and wrote, and you're billed for that usage.

The two never share a bill. OpenAI's billing help page says ChatGPT and the API platform have separate billing systems, and Anthropic's support center says a Claude Pro or Max subscription doesn't include access to the API or its developer console.

The apps also handle things the API leaves to you, like chat history, the interface and memory. Anthropic's documentation is explicit that its API is stateless, so your software has to resend the whole conversation with every message. If each exchange takes 500 tokens, by the tenth turn the software is sending about 4,500 tokens of history before the new question, and every one of them is billed as input. That's why a long conversation over the API gets pricier with each reply.

2024 screenshot of the Claude website, Anthropic's chatbot, with the box for typing a question
Image: VulcanSphere (captura de la web de Anthropic) · Dominio público
02

What a token is and how much text a million buys

A token is a piece of a word. The model chops text into these pieces and turns each one into a number it can compute with, as we explain in our tokens explainer. To estimate how much text you're paying for, start with the rules of thumb the companies publish themselves.

OpenAI's token guide puts 100 tokens at about 75 English words and a 1,500-word text at about 2,048 tokens. Applying that rule, we estimate a million tokens at roughly 750,000 words of English. The same guide notes that other languages usually need more tokens per character. Its Spanish example, "Cómo estás," takes 5 tokens for 10 characters, so non-English text costs more to process.

Each company also splits text its own way. Anthropic's glossary says a token was about 3.5 English characters on its earlier models, and that Claude 4.7 and later models produce roughly 30% more tokens for the same text. By our math, at the same price per million, a million tokens therefore covers about 23% less text. Two identical rate cards don't guarantee the same cost per page, so measure before you budget. Anthropic's API reports the input and output tokens each request used.

03

How to read input and output pricing

Input is everything the model reads: your instructions, the question, any attached document and the history your software resends. Output is what it writes. OpenAI and Anthropic list prices in dollars per million tokens. These were some of them on October 27, 2026:

  • Top tier. GPT-6 Astra and Claude Fable 5.1 charge $10 per million input tokens and $50 per million output tokens.
  • Mid tier. GPT-6.1 Sol and Claude Sonnet 5.5 charge $2 and $10.
  • Budget tier. GPT-6 Luna and Claude Haiku 5.5 charge $0.10 and $0.50 (for Haiku 5.5, on requests up to 100,000 tokens).

Here's our own math with those official rates. Take a thousand emails of about 750 English words each, roughly 1,000 tokens apiece by OpenAI's rule, and ask for a summary of about 200 tokens per email. The model reads a million tokens and writes 200,000. With Sonnet 5.5 or Sol, that's $2 for input plus $2 for output, $4 in total. With Haiku 5.5 or Luna, it's 10 cents plus 10 cents. With Fable 5.1 or Astra, $20.

Discounts change the math. When an app sends the same instructions or document over and over, the system can keep it in a cache, a temporary store that saves reprocessing it, and reading from there costs far less (on Sonnet 5.5, $0.10 per million instead of $2), with the catches we cover in our piece on context caching. Anthropic also takes 50% off batch processing, which returns results later rather than right away.

04

Why writing costs more than reading

For every model listed above, an output token costs five times as much as an input token. NVIDIA's technical blog describes a difference in how the hardware works that helps explain the gap. In NVIDIA's account, the model processes the whole input at once, in parallel, which keeps the GPU, the chip doing the math, busy. The answer, though, comes out one token at a time, and each token requires moving data from memory again. That phase leaves much of the chip's computing power idle, so every token written ties up the machine longer than a token read. That's NVIDIA's technical account, not an official explanation of OpenAI's or Anthropic's pricing.

OpenAI's reasoning models also write text you never see. The company's reasoning guide says reasoning tokens don't appear in the API response but still take up context space and are billed as output. Your bill can therefore count far more output tokens than the visible answer contains. The cost of serving every answer is also part of why AI companies keep losing money even as revenue grows.

Nvidia HGX B200 board with eight data center GPU accelerators
Image: Pokiiri · CC BY-SA 4.0
05

Who should use the API, and who shouldn't

The API pays off when software has to repeat a task many times, or when you want a model inside something you built:

  • Developers building an app, website or automation that needs to generate or analyze text.
  • Businesses working at volume, such as triaging support tickets, summarizing documents or translating product catalogs, where software does the work without anyone pasting text into a chat.
  • People using coding tools or agents that ask for their own key, who would rather pay for usage than a subscription.

If you mostly chat, brainstorm or edit writing, a subscription or the free tier is the better deal. You get the app, your history and a predictable bill, while the API would leave you building all of that yourself and watching a meter with no fixed ceiling.

If you do try the API, set a spending cap before your first request. OpenAI runs on prepaid credits: the minimum purchase is $5, credits expire after a year, and auto-recharge only kicks in if you turn it on. Anthropic lets you set a monthly spend limit in its console below your tier's cap, and requests are rejected once you hit it. Treat the key like a banking password. Anyone with a copy can spend on your account, which is what happened to users caught up in the OpenCode hack.

00

The conversation starts here

Sign in with a supporter account to comment. Sign in

Nobody has commented yet. Want to go first?

KEEP READING

You may also like

FRONT PAGE