AI & Automation

Claude vs GPT vs Gemini for Structured Extraction (2026)

Claude Haiku 5.5 and GPT-6 Luna cost $0.10/$0.50 per 1M tokens. October 2026 prices, ExtractBench results, and when to route extraction to a bigger model.

SIÁN Team
May 1, 2026
Updated
13 min read
LLM
Structured Extraction
Claude
GPT-6
Gemini
JSON Schema
Cost Optimization

Start most structured extraction jobs on a budget model: Claude Haiku 5.5 or GPT-6 Luna, both $0.10 input and $0.50 output per million tokens. Check every response against your JSON schema in code. Route rows that fail, very long PDFs and image-heavy documents to a mid-tier model such as Claude Sonnet 5.5, GPT-6.1 Sol or Gemini 3.8 Flash.

A lot has changed since we first published this comparison in May 2026. All three vendors shipped a new generation. Anthropic's current lineup is Claude Haiku, Sonnet and Opus 5.5 plus Fable 5.1 (Anthropic, 2026). OpenAI's flagship family is now GPT-6 (OpenAI, 2026), and Google released Gemini 3.8 Flash on September 2, 2026 (Google, 2026). What hasn't changed? No public extraction benchmark has scored these models yet. So this guide pairs current list prices with what the newest benchmark taught us about schemas, and shows you how to test the rest on your own documents.

Key takeaways

  • The budget floor fell. Claude Haiku 5.5 and GPT-6 Luna cost about $4.50 per 10,000 typical extractions at list price.
  • Benchmarks lag the models. The latest one, ExtractBench (February 2026), tested the previous generation. Gemini 3 Flash led it with 71% valid JSON.
  • Schema size beats model choice. Every tested model produced 0% valid output on a 369-field schema.
  • Strict schema mode isn't a free win. On ExtractBench's complex schemas it cut validity from 51% to 37%.
  • Route cheap-first. Validate in code and escalate only the rows that fail.

Which models should you compare for extraction in October 2026?

Compare one budget and one mid-tier model from each vendor. The budget tier is where prices moved most: Claude Haiku 5.5 and GPT-6 Luna both list at $0.10 per million input tokens, a tenth of the $1 that Claude Haiku 4.5 still costs (Anthropic, 2026). The table uses standard, non-batch list prices as of October 23, 2026.

Model What the vendor positions it for Input / output per 1M tokens Context window
Claude Haiku 5.5 High-volume classification, extraction and routing $0.10 / $0.50 for prompts up to 100K tokens; $0.50 / $2.50 above 1M
GPT-6 Luna Focused, high-volume tasks $0.10 / $0.50 1.05M
Gemini 3.5 Flash-Lite Cost-efficient, high-volume work and simple data processing $0.30 / $2.50 1M
Gemini 3.8 Flash Google's strongest Flash model, aimed at agents and enterprise workflows $0.75 / $3.75 until Dec 31, 2026; $1.50 / $7.50 from Jan 1, 2027 1M
Claude Sonnet 5.5 Anthropic's balance of speed and intelligence $2 / $10 1M
GPT-6.1 Sol Close to GPT-6 Astra quality at a lower price $2 / $10 1.05M
Gemini 4 Argon Google's flagship reasoning model $2 / $10 until Nov 30, 2026; $4 / $20 from Dec 1, 2026 1M
Claude Opus 5.5 Long-running agentic coding and knowledge work $4 / $20 1M
Claude Fable 5.1, GPT-6 Astra Anthropic's and OpenAI's top tiers $10 / $50 1M / 1.05M

Sources: Anthropic pricing, OpenAI pricing, Gemini API pricing and each vendor's model pages, checked October 23, 2026.

The models from the May version of this post are now legacy. Gemini 3 Flash is still served as a legacy preview at $0.50 / $3, Gemini 3 Pro Preview was shut down on March 9, 2026, and Claude Sonnet 4.6 is a legacy model at $3 / $15 (Google, Anthropic, 2026). Sonnet's replacement is a third cheaper.

One catch when you compare rate cards: tokens aren't the same size everywhere. Anthropic says the tokenizer it introduced with Claude Opus 4.7 produces about 30% more tokens for the same text than its previous one (Anthropic, 2026). Other vendors count differently too. Run 50 of your own documents through each candidate and compare billed tokens, not list prices.

What does the latest extraction benchmark show?

The most recent public benchmark for PDF-to-JSON extraction is ExtractBench, published by Contextual AI researchers in February 2026. It scored six models on 35 PDFs with 12,867 evaluatable fields. Gemini 3 Flash led with 71% valid JSON and a 6.9% field pass rate (ExtractBench, 2026). Because it tested the generation before today's models, read it as evidence about schemas and documents, not as a current leaderboard.

ExtractBench (Feb 2026): valid JSON by model Google OpenAI Anthropic Gemini 3 Flash71% (6.9% pass) Gemini 3 Pro60% (5.5% pass) GPT-5.260% (5.2% pass) Claude Sonnet 4.543% (3.3% pass) GPT-537% (4.0% pass) Claude Opus 4.534% (2.5% pass) 0% 25% 50% 75% 100% Share of 35 PDFs with valid, schema-conforming JSON (field pass rate in brackets) Claude scored 0 on credit agreements: a 100-page PDF cap, since raised to 600 pages. Source: ExtractBench, Table 5 (arXiv 2602.12247). Previous-generation models only.

The five domains were SEC 10-K/Q filings, credit agreements, research papers, resumes and sports results. On research papers, Claude Sonnet 4.5 and Gemini 3 Flash tied at 83% valid output. Claude's overall numbers were dragged down by one thing: Anthropic's 100-page PDF limit at the time blocked every credit agreement (97 to 218 pages), the domain where other models scored best.

That handicap is gone for current Claude models. Anthropic now allows up to 600 PDF pages per request when the context window is 1M tokens, and 100 pages below that (Anthropic, 2026). Every current Claude model has a 1M window.

The finding that matters most isn't the leaderboard. Credit agreements were the longest documents, 137 pages on average, but their schema had only 13 fields, and they got the highest pass rate at 56.3%. SEC filings averaged 60 pages with a 369-field schema, and every model produced 0% valid output. The authors conclude that output volume, not input length, is the dominant predictor of failure: a full 10-K/Q extraction needs roughly 24,400 tokens of JSON. Long input is easy now. Long output is where extraction still breaks.

Two other benchmarks are worth knowing. Apple's SO-Bench (November 2025) tests schema-compliant output from images, including documents and charts. LLMStructBench (February 2026) evaluated 22 models across five prompting strategies and found that the prompting strategy mattered more than model size.

For your own workload, build a golden set of about 200 real inputs with hand-checked outputs. Score each candidate on valid-JSON rate, field-level accuracy and cost per row. It takes a day or two, and it tells you more than any public leaderboard. The transform layer of your data pipeline is where that test belongs anyway.

Does strict JSON schema mode make extraction more reliable?

Only on small schemas. When ExtractBench reran all 210 extractions through each provider's structured-output API, overall validity dropped from 51% to 37%, and the best pass rate fell from 6.9% to 5.5% (ExtractBench, 2026). The May version of this guide told you to always switch strict mode on. For large, nested schemas, the evidence says otherwise.

Why would a feature built to guarantee valid JSON lower validity? The paper points to two causes. First, providers support only a subset of JSON Schema and reject complex schemas outright: the resume schema, 62% valid in prompt mode, was rejected by all three providers in strict mode. Second, accuracy can drop even when the schema is accepted. GPT-5's pass rate on credit agreements fell from 86.9% to 70.0%.

Anthropic's documentation spells out the limits on its side. Claude's structured outputs don't support recursive schemas, numeric constraints such as minimum and maximum, or string length constraints, and a schema that's too complex to compile returns a 400 error (Anthropic, 2026). Our rule now: use strict mode for small, flat schemas, where it removes parse errors, and split anything big before you reach for it.

Which model is cheapest per 10,000 extractions?

GPT-6 Luna and Claude Haiku 5.5 tie at about $4.50 per 10,000 extractions, assuming 2,000 input and 500 output tokens each. That's a twentieth of the mid tier, where Claude Sonnet 5.5, GPT-6.1 Sol and Gemini 4 Argon all land at $90 at current list prices (Anthropic, OpenAI, Google, 2026).

Cost per 10,000 extractions, October 2026 list prices 2,000 input + 500 output tokens per extraction, standard (non-batch) rates, USD $180 $135 $90 $45 $0 $4.50 $4.50 $18.50 $33.75$67.50* $90 $90 $90$180* $180 GPT-6Luna ClaudeHaiku 5.5 Gemini 3.5Flash-Lite Gemini3.8 Flash ClaudeSonnet 5.5 GPT-6.1Sol Gemini 4Argon ClaudeOpus 5.5 * Dashed: scheduled Google price (Argon from Dec 1, 2026; 3.8 Flash from Jan 1, 2027) Excludes thinking tokens, which bill as output. Batch APIs halve every figure. Sources: Anthropic, OpenAI and Google API pricing pages, Oct 23, 2026

Batch processing halves all of these. Anthropic, OpenAI and Google each charge 50% of standard rates for batch jobs. OpenAI and Google work to a 24-hour turnaround, and Anthropic says most batches finish within an hour (OpenAI, Google, Anthropic, 2026). For overnight enrichment there's little reason to pay full price.

Caching cuts the repeated part of each prompt. Cache hits cost 10% of the input price on Claude Haiku 5.5, GPT-6 Luna and Gemini 3.8 Flash, and 5% on Claude Sonnet 5.5 and GPT-6.1 Sol. If every extraction shares a long system prompt and schema, cache them.

Three things can push the real bill above the chart:

  • Thinking tokens bill as output. Google's pricing page says so outright, and Anthropic and OpenAI bill reasoning as output too. Set the lowest reasoning effort your golden set tolerates. GPT-6 Luna accepts a reasoning effort of none.
  • Long prompts cost more on Haiku 5.5. Above 100,000 prompt tokens its price rises to $0.50 / $2.50, five times the headline rate, and a long PDF can cross that line.
  • Google's prices are scheduled to double. Gemini 4 Argon moves to $4 / $20 on December 1, 2026, and Gemini 3.8 Flash to $1.50 / $7.50 on January 1, 2027 (Google, 2026).

Is Gemini still the cost floor, as it was in May? Not on list price. For new projects Google recommends Gemini 3.5 Flash-Lite or 3.8 Flash (Google, 2026), and the cheaper of the two, 3.5 Flash-Lite, works out at $18.50 per 10,000 extractions in our example, about four times Luna or Haiku 5.5. If you orchestrate the calls in a workflow tool, n8n handles the routing layer at a fraction of Zapier's per-task cost.

When is a more expensive model worth it?

When a wrong field costs more downstream than the price gap. At our example token counts, one row costs $0.00045 on Claude Haiku 5.5 and $0.009 on Claude Sonnet 5.5, a gap of under one cent (Anthropic, 2026). Say Sonnet cuts your error rate by one percentage point on your golden set. It then pays for itself once a bad row costs you more than about $0.86.

That threshold is low. A mis-extracted job title costs a salesperson a minute. A wrong price in a competitor feed or a wrong figure from a filing can cost far more. Run the numbers per schema, not per pipeline: most pipelines have one or two schemas where errors are expensive and many where they aren't.

There are two document types where we've seen cheap models misplace fields: tables with merged cells, where values land in the wrong row, and scanned forms with rotated text. We caught both because the validator's failure rate jumped on those document types. The fix wasn't to drop the cheap model. We routed those two schemas straight to the mid tier and kept everything else on the budget model.

Long documents used to be the other reason to pay up. That's mostly gone, since every model in the table above accepts around a million tokens of input. What still costs money is long output, so if a schema needs thousands of output tokens per document, split it before you upgrade the model.

The rule we'd put on every extraction pipeline: default to the cheapest model that validates, and escalate only when it doesn't. That's how we wire the enrichment step in scraping pipelines for leads and competitive intelligence.

How do you route between models to cut extraction cost?

Use a cheap-first cascade. Send each row to a budget model, validate the output, and escalate only the failures to a stronger model. The idea has a research track record: FrugalGPT showed an LLM cascade matching GPT-4's performance with up to 98% cost reduction (Chen, Zaharia and Zou, 2023). Your own savings depend on how many rows fail, and your golden set will tell you that before you go live.

Cheap-first cascade routing pattern Input row HTML / PDF / form Budget model Claude Haiku 5.5 or GPT-6 Luna Schema validator Pydantic / Zod / ajv pass fail Store to CRM HubSpot / Attio / sheet Mid-tier model Claude Sonnet 5.5, GPT-6.1 Sol or Gemini 3.8 Flash Validator again still failing: human review queue

The Python skeleton is short enough to read in one pass:

from pydantic import BaseModel, ValidationError

class Lead(BaseModel):
    name: str
    company: str
    role: str
    email: str

def extract(row):
    raw = budget_model.extract(row, schema=Lead)  # Claude Haiku 5.5 or GPT-6 Luna
    try:
        return Lead.model_validate_json(raw)
    except ValidationError as err:
        # escalate with the validator's error message as context
        raw = mid_tier_model.extract(row, schema=Lead, feedback=str(err))
        return Lead.model_validate_json(raw)  # a second failure goes to human review

In n8n, the same pattern is three nodes: LLM (budget model) → IF (validator) → LLM (mid-tier model) on the false branch. Dedupe and log before the validator, and send the budget pass through a batch API when the job can wait overnight.

One wrinkle: escalate on schema failures, not on every field that looks odd. A validator that checks types, required fields and allowed values flags the right subset. One that tries to judge whether each value is correct ends up escalating so many rows that the savings disappear. Catch content errors with spot checks against your golden set instead.

Does latency matter for structured extraction?

Rarely, because most extraction runs in batch. Where it does matter, the vendors' own labels point to the budget tier. Anthropic rates Claude Haiku 5.5 its fastest current model and Sonnet 5.5 as fast, and OpenAI lists both GPT-6 Luna and GPT-6.1 Sol as fast (Anthropic, OpenAI, 2026). None of them publish a latency figure you can plan around, so measure p95 on your own documents.

Speed on the mid tier costs extra. OpenAI's Fast mode doubles GPT-6.1 Sol to $4 / $20, and Google's Priority tier charges $1.35 / $6.75 for Gemini 3.8 Flash (OpenAI, Google, 2026). For real-time enrichment during a form submission or a chat, start with a budget model and keep the schema small.

For overnight jobs, plan around the batch window rather than the typical run. Batches can take up to 24 hours on all three platforms, so queue early in the evening and treat anything that lands late as next-day data.

How do you stop hallucinated fields in structured extraction?

Validate every output in code and keep each extraction small. In ExtractBench, the two biggest failure types were empty responses (40% of failures) and trailing commas (30%) (ExtractBench, 2026). A parser check catches both on the spot, and the authors note that formatting errors like trailing commas could be fixed in post-processing. The harder problem is valid JSON with wrong values: sports results reached 90% valid output but only a 12.5% field pass rate.

For the 369-field kind of schema, the fix is structural. Break big schemas into smaller sub-extractions and merge the results in code. A 400-field invoice becomes five schemas of about 80 fields each (header, line items, tax, payment terms, metadata), and each one produces a fraction of the output tokens. The merge is deterministic code, not another LLM call.

Add a free-text notes field for content the model can't place. It gives ambiguous text somewhere to go instead of being forced into the wrong field, and it shows you which source documents need a human look.

In our own pipelines, most errors that survive validation and one retry trace back to the source rather than the model: a page that contradicts itself, or a field that simply isn't there. That's where more model spend stops helping and a review queue starts. Pair validation with pipeline hygiene (idempotent retries, source-URL logging, run-level audit trails) and the extraction layer can run unsupervised. At higher crawl volumes, our guide to scaling scraping operations covers the queueing and worker side.

Want this mapped to your own documents? Book a 15-minute call and we'll look at where extraction errors cost you today and how quickly a routed setup would pay for itself.

Frequently Asked Questions

Which LLM is best for structured data extraction in 2026?

No single model wins every schema. Start with a budget model such as Claude Haiku 5.5 or GPT-6 Luna at $0.10 input and $0.50 output per million tokens, validate every response, and escalate failures to a mid-tier model such as Claude Sonnet 5.5, GPT-6.1 Sol or Gemini 3.8 Flash. Pick the final mix by testing on about 200 of your own documents.

Is there a benchmark that covers GPT-6, Claude 5.5 and Gemini 3.8?

Not as of October 23, 2026. The newest public extraction benchmark, ExtractBench from February 2026, tested GPT-5, GPT-5.2, Gemini 3 Flash, Gemini 3 Pro, Claude Opus 4.5 and Claude Sonnet 4.5. Gemini 3 Flash led with 71% valid JSON. Use it for its lessons about schemas, and test current models on your own data.

Should I turn on strict JSON schema mode for extraction?

For small, flat schemas, yes, because it removes parse errors. For large or deeply nested schemas, be careful. When ExtractBench reran its tests through each provider's structured-output API, overall validity fell from 51% to 37%, and all three providers rejected one schema outright. Split big schemas first.

Can Claude extract data from long PDFs now?

Yes. Anthropic allows up to 600 PDF pages per request when the context window is 1M tokens, and every current Claude model has a 1M window. The 100-page limit that knocked Claude out of ExtractBench's credit-agreement tests now applies only below 1M tokens. On Claude Haiku 5.5, prompts over 100,000 tokens are billed at a higher rate.

How big can a JSON schema get before extraction fails?

There's no fixed number, but output size is the warning sign. In ExtractBench, every model produced 0% valid output on a 369-field financial schema that needs about 24,400 tokens of JSON per document, while a 13-field schema on 137-page contracts scored best. Split large schemas into smaller extractions and merge them in code.

What does structured extraction cost per 10,000 documents?

At 2,000 input and 500 output tokens per document, about $4.50 on Claude Haiku 5.5 or GPT-6 Luna, $33.75 on Gemini 3.8 Flash, and $90 on Claude Sonnet 5.5 or GPT-6.1 Sol at October 2026 list prices. Batch APIs from Anthropic, OpenAI and Google cut those figures in half. Thinking tokens add to the output bill.

Are LLM prices for extraction still falling?

Mostly, but not everywhere. Claude Sonnet 5.5 costs $2 / $10 per million tokens against $3 / $15 for Sonnet 4.6. Google is moving the other way: Gemini 4 Argon's price doubles on December 1, 2026, and Gemini 3.8 Flash's doubles on January 1, 2027. Recheck the pricing pages every quarter.

About SIÁN Team

SIÁN Agency builds automated data pipelines for small businesses — from web scraping to AI processing to workflow integration. We write about what we know from building these systems every day.

Need help with web scraping?

Get in touch with our team to discuss your data extraction needs

Want to automate your data workflow?

We build custom data pipelines for small businesses. Let's talk about what you need.