If you need one API to start your application in November 2026, pick Gemini 3.8 Flash. At $0.75 input and $3.75 output per million tokens, with a one-million-token context window, a free tier and multimodal input, it is the lowest-risk starting point for a solo developer or a small team. The price doubles on January 1, 2027, but it stays below Claude Sonnet 5.5 and GPT-6.2 Sol.

The choice changes if your app produces long documents, chains tool calls or needs a mid-tier model for years. Claude Sonnet 5.5 costs $2 / $10, accepts 1 million tokens of context and 128,000 tokens of output, with no long-context surcharge. GPT-6.2 Sol is priced the same, with a 1.05-million-token context window, 128,000 tokens of output and the broadest built-in tool library of the three.

We do not rank the models on a home-made "quality" benchmark. Versions change several times a year and an invented score would age badly. We compare what the official pages let you verify: token prices, context, maximum output, caching, batch, rate limits, data policy and SDKs. The rest depends on your own evaluations.

The comparison at a glance#

CriterionClaude (Sonnet 5.5)GPT (6.2 Sol) Notre choixGemini (3.8 Flash)
Place in the lineupMid-tier, built for agents and codeMid-tier, built for agents and toolsHigh-end Flash, built for volume and multimodality
Standard price$2 / $10 per MTok$2 / $10 per MTok$0.75 / $3.75 through December 31, 2026; $1.50 / $7.50 after
Context / output1M / 128K tokens1.05M / 128K tokens1M / 64K tokens
Batch$1 / $5, a 50% discount$1 / $5, a 50% discount$0.375 / $1.875, a 50% discount
Cache$0.10 read; $2.50 write (5 min) or $4 (1 h)$0.10 read; $2.50 write (30 min) or $5 (12 h)$0.075; $0.50 storage per million tokens per hour
Free tierNo; trial credits for new accountsFree tier capped at $100/month of usage, subject to geographyYes on 3.8 Flash and 4 Hydrogen; free-tier content is used to improve products
Rate limitsStart: 4,000 RPM, 2M ITPM, 400K OTPM; $500/month capBuild: 5,000 RPM, 1M TPM; $500/month usage capPer project; Tier 1: $10 per 10-minute window; RPD resets at midnight PT
DataNo training by default on the commercial APINo training by default; abuse logs kept for up to 30 daysNo training on the paid tier; training on the free tier
TypeScript SDK2.2k stars, Apache-2.011.3k stars, Apache-2.01.7k stars, Apache-2.0
Best forLong context, 128K output, coding agentsBuilt-in tools, ecosystem, general-purpose agentsTight budgets, multimodality, prototyping
Editorial comparison — public prices checked on November 21, 2026, in US dollars before tax. Gemini 3.8 Flash prices double on January 1, 2027; Gemini 4 Argon and Carbon prices double on December 1, 2026.

How we decided#

Six criteria weigh in the score: price and predictability, context and output, tools and ecosystem, free tier, rate limits, and data and compliance. These are editorial scores, not performance measurements.

ToolPrice and predictabilitypoids 25 %Context and outputpoids 20 %Tools and ecosystempoids 20 %Free tierpoids 15 %Rate limitspoids 10 %Data and compliancepoids 10 %Score
Claude Sonnet 5.5
8
9
8
3
9
9
7,7
GPT-6.2 Sol
8
9
10
4
9
9
8,2
Gemini 3.8 Flash
10
8
7
10
7
6
8,3
Final score = weighted average of the criteria, out of 10.

Gemini 3.8 Flash wins on price and free access, GPT-6.2 Sol on tools and ecosystem, and Claude Sonnet 5.5 on the simplicity of long context and 128K output. The ranking flips with your product: a document-summarization app does not have the same needs as an agent that calls ten tools per request.

Three APIs, three billing models#

All three vendors bill by token, but not in the same way. At Anthropic and OpenAI, the listed price covers input and output. At Google, output includes reasoning tokens, and some tools are billed per request. In all three cases, the price per million tokens is only one part of the bill.

Take a simple example: 10,000 requests per month, 2,000 input tokens and 500 output tokens per request, or 20 million input tokens and 5 million output tokens. Here is what the entry-level and mid-tier models cost, excluding cache, batch, tools and reasoning.

ModelInput (20M)Output (5M)Monthly total
Claude Haiku 5.5$2.00$2.50$4.50
GPT-6 Luna$2.00$2.50$4.50
Gemini 3.8 Flash$15.00$18.75$33.75
Claude Sonnet 5.5$40.00$50.00$90.00
GPT-6.2 Sol$40.00$50.00$90.00
Gemini 4 Argon$40.00$50.00$90.00

Two surprises. First, Gemini 3.8 Flash is not the cheapest in absolute terms: Haiku 5.5 and GPT-6 Luna cost seven to eight times less on this volume. Second, Gemini 3.8 Flash is already more expensive than those "mini" models, even though its token price is below Sonnet 5.5 and Sol. The free tier and the promotional price change the math for a prototype, not for an app doing 10,000 requests a month.

Caching is the real lever. Claude Sonnet 5.5 bills a cache read at $0.10 per million tokens, or 5% of the input price. GPT-6.2 Sol also bills $0.10 for a read and $2.50 for a 30-minute write. Gemini 3.8 Flash bills $0.075 for cache and $0.50 per million tokens per hour of storage. If your system prompt is 20,000 tokens and you send it 10,000 times, caching cuts the bill far more than the model choice does.

Batch is the second lever. All three offer 50% off asynchronous requests: Claude Sonnet 5.5 at $1 / $5, GPT-6.2 Sol at $1 / $5, Gemini 3.8 Flash at $0.375 / $1.875. For summaries, classifications or embeddings, that is often the difference between an acceptable bill and one that doubles.

Claude: long context without the surcharge#

Anthropic splits its lineup into four models. Fable 5.2 is the most capable, at $8 / $40, for demanding reasoning and long-horizon agents. Opus 5.5, at $4 / $20, is recommended for most workloads. Sonnet 5.5, at $2 / $10, is the best speed/intelligence trade-off. Haiku 5.5, from $0.10 / $0.50, targets volume, classification and routing.

Sonnet 5.5's strength is the context / output / price combination. It accepts 1 million tokens of context and 128,000 tokens of output at the standard rate. Anthropic says a 900,000-token request is billed at the same per-token rate as a 9,000-token request. That is easier to budget than OpenAI's 272,000-token threshold, which doubles input and raises output by 50% above the line.

Caching is attractive: $0.10 for a read, $2.50 for a five-minute write or $4 for a one-hour write. Batch halves everything. The Start tier limits for Sonnet 5.5 are 4,000 requests per minute, 2 million input tokens per minute and 400,000 output tokens per minute, with a $500 monthly cap. The Build tier goes to 10,000 RPM, 5M ITPM and 1M OTPM, with a $1,000 cap.

On data, Anthropic says inputs and outputs from the commercial API are not used to train its models by default. Only explicit feedback, such as a thumbs up or down, may be used. The TypeScript SDK is published under Apache-2.0 and shows about 2,200 GitHub stars.

The limits are clear. There is no permanent free tier: new accounts get trial credits, then you pay. Opus 5.5 and Fable 5.2 cost two to four times more than Sonnet 5.5. The built-in tool ecosystem is narrower than OpenAI's, even though tool use, web search at $10 per 1,000 requests and code execution exist. And the 128,000-token output matches GPT-6.2 Sol, so it is not a differentiator.

If your app needs to expose its own tools to the model, our guide to building an MCP server shows how to connect a database or an internal API to an agent.

Claude Sonnet 5.5 at a glance

Strengths

  • 1M context at the standard rate, with no surcharge above 200K tokens
  • 128K output, $0.10 cache reads and 50% off with batch
  • No training by default on the commercial API

Limits

  • No permanent free tier, only trial credits
  • Opus 5.5 and Fable 5.2 raise the bill quickly
  • Smaller built-in tool ecosystem than OpenAI's

GPT: the API that plugs into tools#

OpenAI has a broader lineup. GPT-6.2 Astra, at $8 / $40, is the most capable model. GPT-6.2 Sol, at $2 / $10, is the general-purpose model recommended for code and agents. GPT-6.1 Terra, at $1 / $5, covers intermediate tasks. GPT-6 Luna, at $0.10 / $0.50, targets volume.

Sol accepts a 1.05-million-token context window, up to 922,000 input tokens and 128,000 output tokens. Mind the threshold: above 272,000 input tokens, input and cache rates double, and output costs 1.5 times the short-context rate. A 300,000-token prompt therefore costs $4 / $15, not $2 / $10. That detail matters for document-search apps.

GPT-6.2 Sol's decisive argument is the Responses API. It exposes hosted tools: web search, file search, image generation, code interpreter, hosted shell, apply patch, skills, computer use, MCP and tool search. You can build an agent that reads files, searches the web, runs code and calls your MCP servers without writing all the plumbing. The tools cost extra, but they cut development time.

Caching and batch are aligned with Anthropic: $0.10 for a read, $2.50 for a 30-minute write or $5 for a 12-hour write, and 50% off with batch. OpenAI adds Flex at 50% off, Fast at 2x and Ultrafast at 3x through February 28, 2027, then 6x. The Build tier gives 5,000 RPM and 1 million TPM for Astra, Sol and Terra. The Free tier is capped at $100/month of usage, subject to geography, and the Build, Launch and Grow tiers go up from there.

On data, OpenAI says data sent to the API has not been used to train its models since March 1, 2023, unless you explicitly opt in. Abuse-monitoring logs are kept for up to 30 days by default. The TypeScript SDK is Apache-2.0 and shows about 11,300 stars, the largest of the three.

The limits: the long-context surcharge, tool billing, a free tier that is not a production tier, and model availability that depends on your organization. GPT-6.2 Sol is not available everywhere, and features such as web search or computer use have their own rate limits and prices.

GPT-6.2 Sol at a glance

Strengths

  • The most complete set of hosted tools: web, files, code, computer use, MCP
  • 1.05M context and 128K output, at the same entry price as Claude Sonnet 5.5
  • A very popular TypeScript SDK and a broad ecosystem

Limits

  • Surcharge above 272K input tokens: input doubles, output costs 1.5x
  • Built-in tools are billed on top of tokens
  • No free tier you can use in production

Gemini: entry price and multimodality#

Google has the most confusing lineup, but also the most aggressive prices. Gemini 3.8 Flash is the model to remember for getting started: $0.75 / $3.75 through December 31, 2026, then $1.50 / $7.50. It accepts a 1-million-token context window, 65,536 output tokens, and text, image, video, audio and PDF inputs. It is the only one of the three with such broad native input at this price.

Above it, Gemini 4 Argon and Carbon cost $2 / $10 through November 30, 2026, then $4 / $20. Argon is the "efficient" frontier model, Carbon the most capable. Both have a 1-million-token context window and can generate up to 1 million tokens with long decode, even though default synchronous output is 65,536 tokens. Neon costs $3 / $15, Hydrogen $1.50 / $7.50 with a free tier.

Caching is implicit-only on Gemini 4 Carbon and Argon: $0.10 for a read, then $0.20 after December 1. On 3.8 Flash, cache is $0.075, with storage at $0.50 per million tokens per hour. Batch is 50% off. Grounding tools are billed per request: 5,000 free Google Search requests per month, shared across Gemini 3 and newer models, then $14 per 1,000 requests, with a 1,500-request daily cap. Google Maps follows the same pattern.

Rate limits are per project, not per API key. Daily request quotas reset at midnight Pacific time. At Tier 1, Google applies a $10 spend limit per 10-minute window, which protects against runaway loops but can block a legitimate spike. Batch accepts 100 concurrent requests and input files up to 2 GB.

The data point is the one to watch. Google states plainly that the free tier uses content to improve its products, while the paid tier does not. If you handle customer data, internal documents or personal data, the free tier is a trap. The TypeScript SDK is Apache-2.0 and shows about 1,700 stars.

The other limits: 64K output on 3.8 Flash, announced price changes, a model lineup that moves fast and a less mature tool ecosystem than OpenAI's. In exchange, the entry price, multimodality and free tier make it the best sandbox for testing an idea without a credit card.

Gemini 3.8 Flash at a glance

Strengths

  • The lowest entry price among frontier models, with a free tier
  • Text, image, video, audio and PDF input, with 1M context
  • 50% off with batch, $0.075 cache and Google Search grounding in the quota

Limits

  • Output limited to 64K tokens
  • The free tier trains on your data; move to paid for sensitive data
  • Promotional prices that double in December 2026 and January 2027

What the price pages don't tell you#

The first trap is reasoning tokens. Gemini says output includes thinking tokens. OpenAI also bills reasoning tokens as output. Claude uses adaptive reasoning whose tokens are billed as output. A 500-token answer can therefore cost the price of 2,000 tokens if the model thinks for a long time. To control the bill, lower reasoning effort on simple tasks and measure actual usage.

The second trap is long context. OpenAI doubles input above 272,000 tokens and charges 1.5x for output. Anthropic bills long context at the standard rate, except Haiku 5.5 above 100,000 tokens. Gemini does not mention a long-context surcharge in its grid, but check the model page before designing an app that sends 800,000 tokens per request. A large context is not free: it costs at least the price of the tokens you send.

The third trap is tools. A web search at Anthropic costs $10 per 1,000 requests. At Google, grounding costs $14 per 1,000 requests after 5,000 free ones. At OpenAI, web search, file search and the code interpreter have their own prices. An agent that runs three searches per request can double the bill without the model price changing.

The fourth trap is caps. Anthropic stops the API at the tier's monthly cap, then restores it the next month. OpenAI applies a monthly usage limit per organization, separate from rate limits. Google applies a spend limit per 10-minute window at Tier 1. These caps are useful against surprise bills, but they can cut production at the worst moment. Watch them and set alerts.

The fifth trap is data policy. The three vendors do not play by the same rules. Anthropic and OpenAI do not train on commercial API data by default. Google does not train on the paid tier, but uses the free tier to improve its products. If you build for businesses, Gemini's free tier is not an option.

Finally, models change. Anthropic publishes retirement dates for each model, OpenAI publishes deprecations, and Google evolves its lineup every quarter. Pin model IDs in your code, keep an abstraction layer and test each new version before shipping it.

Testing in a day, without a home-made benchmark#

The best way to choose is not to read a ranking, but to test your own cases. Take 30 requests that represent your app: a support ticket, a code snippet, a 20-page document, a summary request, a JSON extraction, an ambiguous case. Run them three times on each model, with the same temperature and the same instructions.

Record four things: is the answer correct, is the format respected, how long did you wait, and how much did you pay. For price, use the input and output tokens returned by the API, not an estimate. For latency, use the median, not the average: one slow call skews the average. For quality, have someone who knows the domain review the output, not the same model.

Add failure cases. Send 300,000 tokens to see the long-context surcharge. Ask for 20,000 output tokens to check that the model does not truncate. Make it call three tools in a row to see if the agent loops. Test JSON mode and structured output. A model that fails 20% of the time on your real case costs more than a model twice as expensive that succeeds.

Finally, use the free levers before switching models. Cache your system prompt, lower max_tokens, use batch for non-urgent tasks, and split documents into chunks instead of sending 500 pages with every request. These optimizations often change the bill more than the choice between Sonnet 5.5 and Sol.

If your product is a coding assistant, the API is only part of the decision: our Claude Code vs Cursor vs Codex comparison covers the surfaces, quotas and prices of the tools built on these models. And if you want a free model for prototyping first, our selection of free AI coding models completes the picture.

Our pick, by profile#

Our pick

Gemini 3.8 Flash

8.3/10

Gemini 3.8 Flash wins on value for getting started: free tier, 1M context, text, image, audio, video and PDF input, and a lower token price than the mid-tier models. Claude Sonnet 5.5 remains our pick for long documents and 128K output, and GPT-6.2 Sol for agents that need built-in tools.

Who it's for
Solo developers and small teams who want to start without a bill, then scale with a low token price and multimodal input.
Who should skip it
Apps that need 128K output or a strong commitment to long context: Claude Sonnet 5.5 is easier to budget.

Frequently asked questions#

Frequently asked questions

Which API is the cheapest to start with?

Gemini 3.8 Flash, thanks to its free tier and its $0.75 / $3.75 price through December 31, 2026. Anthropic offers trial credits but no permanent free tier. OpenAI lists a Free tier capped at $100/month of usage, subject to geography, but production models remain paid.

Can I switch providers without rewriting the app?

Not without some abstraction. The three APIs have different shapes: Messages at Anthropic, Responses at OpenAI, generateContent at Google. Put the call behind an internal function, normalize messages and errors, and keep prompts in versioned files. Changing models then becomes a configuration line, not a rewrite.

Are the listed prices what I will actually pay?

No. Add reasoning tokens, tools, cache, cache storage, long context, batch and taxes. Prices per million tokens are a starting point, not a ceiling. The only way to know your real cost is to measure input and output tokens on your own requests.

Which model should I use for an app that handles long documents?

Claude Sonnet 5.5 is the simplest: 1M context at the standard rate and 128K output. GPT-6.2 Sol offers 1.05M context, but doubles input above 272,000 tokens and raises output by 50%. Gemini 3.8 Flash accepts 1M tokens but caps output at 64K. For a pipeline that summarizes 500 pages, Claude's standard pricing is more predictable.

Can I use Gemini's free tier in production?

Technically yes, but not for sensitive data. Google says the free tier uses content to improve its products. The paid tier does not. If you handle customer data, internal documents or personal data, move to paid before going live.

Should I always pick the most expensive model?

No. Start with the cheapest model that passes your evaluations, then move up when mistakes become expensive. Haiku 5.5, GPT-6 Luna and Gemini 3.8 Flash cover classification, extraction and routing. Opus 5.5, Astra and Gemini 4 Argon are justified for complex reasoning, hard code or long-running agents.

Are the official SDKs open source?

Yes, all three TypeScript SDKs are published under Apache-2.0. That covers the SDK code, not the models: usage is still billed by token. The OpenAI SDK is the most popular with about 11,300 stars, followed by Anthropic at 2,200 and Google at 1,700.

Sources#

Official pages checked on November 21, 2026.