Pricing / News

AI API prices compared: what one coding job really costs

List prices for Claude, GPT, Gemini, Grok, DeepSeek, Mistral, GLM and Qwen on 10 October 2026, and what one coding job really cost us: from 0.12 cents to 16.4 cents.

Bar chart of what one coding job cost us for 17 AI models, from 0.12 cents for GPT-6 Luna to 16.4 cents for Gemini 3.1 Pro Preview, with the secret checks each passed
Our own test on the secret test set v2, 7 to 10 October 2026. Chart by Not an AI App.

What does it cost to use an AI model through its API, the connection programs use to talk to it? Every maker publishes a price list. But those prices are per token, and a token is only a small piece of text. So we did something else too. We gave 17 models the same three coding jobs and counted what each job really cost us. The cheapest job cost 0.12 cents, the most expensive 16.4 cents: about 137 times more. And a low price per token did not always mean a cheap job.

What is a token?

Illustration: the sentence The cat sat on the mat split into tokens; one token is about three quarters of an English word
Illustration by Not an AI App.

AI models read and write text in small pieces called tokens. In English, one token is roughly three quarters of a word. "The cat sat on the mat." is about seven tokens.

Prices are given per million tokens, often written as "MTok". There are two main prices:

  • Input: the text the model reads, like your question and your files.
  • Output: the text the model writes. This is usually 3 to 5 times more expensive. It often includes "thinking" tokens: work the model does before it answers, which you pay for even if you do not see it.

Many models are also cheaper when they read the same text again. That is called caching.

List prices compared

Table of list prices per million tokens for every model in our test, from the makers' own price pages
List prices from the makers' own pages, read on 10 October 2026. Chart by Not an AI App.

Here are the standard prices on 10 October 2026, per million tokens, from each maker's own page. Short prompts, no discounts:

  • Qwen 3.8 Flash (Alibaba): $0.15 in, $0.47 out.
  • GPT-6 Luna (OpenAI): $0.1 in, $0.5 out.
  • Claude Haiku 5.5 (Anthropic): $0.1 in, $0.5 out.
  • GLM-5.3-Flash (Z.ai): $0.15 in, $0.5 out.
  • GLM-5.3 FlashX (Z.ai): $0.37 in, $1.25 out.
  • Mistral Large 4 (Mistral): $0.68 in, $2.09 out.
  • Gemini 3.8 Flash (Google): $0.75 in, $3.75 out.
  • DeepSeek V4 Pro (DeepSeek): $1.32 in, $3.96 out.
  • GLM-5.3 (Z.ai): $1.4 in, $4.4 out.
  • Claude Haiku 4.5 (Anthropic): $1 in, $5 out.
  • Grok 4.7 (xAI): $2 in, $6 out.
  • Qwen 3.8 Max (Alibaba): $2 in, $6 out.
  • GPT-6.1 Sol (OpenAI): $2 in, $10 out.
  • Claude Sonnet 5.5 (Anthropic): $2 in, $10 out.
  • Gemini 3.1 Pro Preview (Google): $2 in, $12 out.
  • Claude Opus 5.5 (Anthropic): $4 in, $20 out.
  • Claude Fable 5.1 (Anthropic): $10 in, $50 out.

The cheapest models cost 100 times less per token than the most expensive one. Prices can change at any time, so always check the maker's page before you build on them.

Claude API prices (Anthropic)

Screenshot of Anthropic's price table: Claude Opus 5.5 $4 input and $20 output, Sonnet 5.5 $2 and $10, Haiku 5.5 $0.10 and $0.50 per million tokens, with cache prices
Anthropic's API price list. Screenshot from 10 October 2026; header and rows joined, cropped.

Anthropic's price list on 10 October 2026:

  • Claude Fable 5.1: $10 in, $50 out. Its top model.
  • Claude Opus 5.5: $4 in, $20 out.
  • Claude Sonnet 5.5: $2 in, $10 out.
  • Claude Haiku 5.5: $0.10 in, $0.50 out, for prompts up to 100,000 tokens. Above that, $0.50 and $2.50.

Reading text again from the cache costs much less: $0.10 per million for Sonnet 5.5. With the Batch API, where you wait for the answer, everything is half price. In our test, Haiku 5.5 passed every secret check for 0.19 cents per job. More in our Haiku 5.5 test. For Claude Code subscriptions, see our Claude Code pricing test.

OpenAI API prices

Screenshot of OpenAI's price table, Standard tab: GPT-6.1 Sol $2 input and $10 output per million tokens
OpenAI's API price list, Standard tab. Screenshot from 9 October 2026, cropped; the prices were the same on 10 October.

OpenAI's price list, Standard tier, on 10 October 2026:

  • GPT-6 Astra: $10 in, $50 out.
  • GPT-6.1 Sol: $2 in, $10 out.
  • GPT-6 Luna: $0.10 in, $0.50 out.

Batch and Flex, where answers take longer, are half price. Faster modes cost more: Ultrafast for GPT-6.1 Sol costs six times the standard price, as we found in our Ultrafast test.

In our test, GPT-6 Luna was the cheapest model of all: 0.12 cents per job, with 184 of 186 secret checks passed. GPT-6.1 Sol passed every check for 1.3 cents.

Gemini API prices (Google)

Screenshot of Google's Gemini 3.8 Flash prices: free tier free of charge; paid tier $0.75 input and $3.75 output through December 31, 2026, then $1.50 and $7.50 from January 1, 2027
Google's Gemini API price page, Gemini 3.8 Flash. Screenshot from 10 October 2026, cropped.

Google's price page on 10 October 2026, paid tier:

  • Gemini 3.1 Pro Preview: $2 in, $12 out, for prompts up to 200,000 tokens.
  • Gemini 3.8 Flash: $0.75 in, $3.75 out.
  • Gemini 3.1 Flash-Lite: $0.25 in, $1.50 out.

Two things stand out. Most Gemini Flash models also have a free tier, but on the free tier Google may use your data "to improve our products". And the page says several prices go up on 1 January 2027: Gemini 3.8 Flash then costs $1.50 in and $7.50 out, twice as much.

In our test, Gemini 3.8 Flash passed 186 of 186 secret checks for 8.5 cents per job. Gemini 3.1 Pro passed 186 of 186 for 16.4 cents.

DeepSeek API prices

Screenshot of DeepSeek's price table: DeepSeek-V4-Pro $1.32 input and $3.96 output per million tokens at peak, half price off-peak
DeepSeek's API price page. Screenshot from 10 October 2026, cropped.

DeepSeek's price page shows two prices: peak and off-peak. Off-peak is half price. Peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays.

  • DeepSeek V4 Pro: $1.32 in, $3.96 out at peak; $0.66 and $1.98 off-peak.
  • DeepSeek V4.1 Flash: $0.30 in, $1.20 out at peak; half that off-peak.

In our DeepSeek test, V4 Pro passed 180 of 186 secret checks for 1.4 cents per job. Note that we ran it through OpenRouter, which can route a model to other companies than DeepSeek itself.

Grok, Mistral, GLM and Qwen

Screenshot of Z.ai's price list: GLM-5.3 $1.4 input and $4.4 output, GLM-5.3-Flash $0.15 and $0.50, GLM-5.3-FlashX $0.37 and $1.25 per million tokens
Z.ai's price list. Screenshot from 9 October 2026, cropped; the prices were the same on 10 October.

The other makers in our test, on 10 October 2026:

  • Grok 4.7 (xAI): $2 in, $6 out, from xAI's model list. Grok 4.7 passed 182 of 186 in our test, for 9.5 cents per job.
  • Mistral Large 4: $0.68 in, $2.09 out, a discount on $1.36 and $4.18, on Mistral's model page. See our Mistral test.
  • GLM-5.3 (Z.ai): $1.40 in, $4.40 out. GLM-5.3-Flash: $0.15 and $0.50. From Z.ai's price list. See our GLM-5.3 test.
  • Qwen 3.8 Max (Alibaba): $2 in, $6 out. Qwen 3.8 Flash: $0.15 and $0.47. From Alibaba Cloud's price page, Singapore region. See our Qwen test.

What one coding job really cost

Ranking of the cheapest models that passed all 186 secret checks, led by Claude Haiku 5.5 at 0.19 cents per job
Our own test, 7 to 10 October 2026. Chart by Not an AI App.

Now the real bill. We gave every model the same three jobs from our private coding test: fix a money reader, split a restaurant bill, and read a CSV file. Each job three times, one request each. Then we checked the code with secret tests and looked at what OpenRouter or OpenAI charged us.

The cheapest models that passed all 186 secret checks:

1. Claude Haiku 5.5: 0.19 cents per job. 2. GPT-6.1 Sol: 1.3 cents per job. 3. Claude Sonnet 5.5: 2.6 cents per job. 4. Claude Opus 5.5: 5.9 cents per job. 5. Gemini 3.8 Flash: 8.5 cents per job. 6. Claude Fable 5.1: 14.2 cents per job.

The most expensive job was Gemini 3.1 Pro Preview, at 16.4 cents. So for small coding jobs like ours, a cheap model was often good enough. Harder work may need a stronger model.

Cheap per token, not per job

Comparison: GLM-5.3 is cheaper per token than Claude Sonnet 5.5 but cost more per job; Qwen 3.8 Flash has about the same token price as Claude Haiku 5.5 but cost much more per job, because they wrote many more tokens
Our own test. Chart by Not an AI App.

The price list does not tell the whole story. Some models "think" a lot before they answer, and you pay for every thinking token.

  • GLM-5.3 costs $4.40 per million tokens written; Claude Sonnet 5.5 costs $10. But GLM-5.3 wrote about 31,496 tokens per job, against 2,439 for Sonnet. So a job cost 11.0 cents with GLM-5.3 and 2.6 cents with Sonnet.
  • Qwen 3.8 Flash has about the same price per token as Claude Haiku 5.5. But it wrote about 41,982 tokens per job, against 3,373. It cost 1.9 cents per job instead of 0.19 cents.
  • Gemini 3.8 Flash costs $3.75 per million tokens written, less than half of Sonnet 5.5. But it wrote about 27,121 tokens per job, so a job cost 8.5 cents.

So test a model on your own kind of work before you choose it on price.

How to pay less

Overview of ways to pay less: Batch 50% off at Anthropic, OpenAI and Google; Flex at OpenAI; DeepSeek off-peak 50% off; cached input; free tiers
From the makers' price pages, read on 10 October 2026. Chart by Not an AI App.

All big makers offer cheaper ways to use the same model:

  • Batch: you send many requests and get the answers later, within a day. Anthropic, OpenAI and Google charge half price.
  • Flex (OpenAI): slower answers, also half price for GPT-6 models.
  • Off-peak (DeepSeek): half price outside the busy hours.
  • Caching: text the model reads again, like long instructions, costs up to 90% or more less.
  • Free tiers and free models: Google has a free tier for most Gemini Flash models; Z.ai has free GLM Flash models; OpenCode offers free models too. Check what happens with your data first.

Questions people ask

List of questions people ask Google about AI API prices, with the 8 questions we answer marked
"People also ask" questions from Google (US), 10 October 2026, via DataForSEO. Chart by Not an AI App.

What does API pricing mean?

It is what you pay to use an AI model from your own program. Makers charge per million tokens, small pieces of text: one price for the text the model reads (input) and a higher price for the text it writes (output). Discounts exist for batch work and repeated text.

How much does it cost to use the OpenAI API?

On 10 October 2026, GPT-6.1 Sol cost $2 per million tokens read and $10 written. GPT-6 Luna cost $0.10 and $0.50, and GPT-6 Astra $10 and $50. Batch and Flex are half price. In our test, one coding job cost about 0.1 cents with Luna and 1.3 cents with Sol.

Is OpenAI API cheaper than anthropic API?

Not per token, for comparable models. GPT-6.1 Sol and Claude Sonnet 5.5 both cost $2 in and $10 out; GPT-6 Luna and Claude Haiku 5.5 both cost $0.10 and $0.50. Per job it differed a little: in our test, Luna was cheaper than Haiku 5.5, and Sol was cheaper than Sonnet 5.5.

Is Gemini API still free to use?

Partly. On 10 October 2026, Google's price page showed a free tier for most Gemini Flash models, but not for Gemini 3.1 Pro Preview. On the free tier, Google may use your data to improve its products. The paid tier for Gemini 3.8 Flash costs $0.75 in and $3.75 out, and twice that from 1 January 2027.

Which LLM API can I use for free?

On 10 October 2026: Google's free tier for most Gemini Flash models, Z.ai's free GLM Flash models, and free models in OpenCode. Free often means your data may be used to improve the model, so check the terms first.

How expensive are LLMs really?

For small jobs, often cheaper than people think. In our test, one coding job cost between about 0.1 cents and about 16 cents, depending on the model. The cheapest model that passed every secret check cost under a cent per job. Bigger work, with more text to read and write, costs more.

Why is API so expensive?

Often because of output, not input. Writing text costs 3 to 5 times more than reading it, and models that think a lot write many tokens you never see. In our test, GLM-5.3 was cheaper per token than Claude Sonnet 5.5, but cost about four times more per job for that reason.

Is DeepSeek AI free or paid?

The DeepSeek API is paid per token. On 10 October 2026, DeepSeek V4 Pro cost $1.32 per million tokens read and $3.96 written at peak hours, and half that off-peak. We did not look at DeepSeek's free chat app here.

How we checked

Diagram of how we checked: read each maker's price page, run the same three coding jobs three times per model, count what we paid and the secret checks passed
Diagram by Not an AI App.

On 10 October 2026 we read the price pages of Anthropic, OpenAI, Google, DeepSeek, xAI, Mistral, Z.ai and Alibaba Cloud. The screenshots are our own captures, cropped only; two are from 9 October, when the prices were the same.

The test results come from our private secret test set, run between 7 and 10 October 2026: three coding jobs, three tries each, one request per job, through OpenRouter or OpenAI's own API with our own keys. For Qwen we ran only two of the three jobs. The cost per job is what we were charged. Prices change, and OpenRouter can send a request to different companies that run the same model, so your bill may differ. How we test is explained on our methods page.

The charts were made by us. None of the images was made by AI. This page is not financial advice: check the makers' current prices before you choose.

AI API Pricing Compared: Real Cost per Coding Job [2026]