Structured extraction with Claude Opus 4.8 vs Gemini 3 Flash

dOCR lets you pick a processing model per request. Here's how we think about choosing Claude Opus 4.8 for quality versus Gemini 3 Flash for speed.

By The dOCR team | June 10, 2026

dOCR runs every extraction through two stages: optical character recognition reads the page, and a large language model maps that text into the typed fields of a document type. The second stage is where the model choice matters — and dOCR lets you make that choice on every single request.

You select a model by passing model to the extract endpoint:

curl https://api.docr.dev/v1/extractions \
  -H "Authorization: Bearer docr_sk_live_…" \
  -F "file=@invoice.pdf" \
  -F "type=invoice" \
  -F "model=claude-opus-4-8"

Swap claude-opus-4-8 for gemini-3-flash and nothing else about your integration changes. Both models return the same response envelope.

Two models, one contract

Whichever model you choose, the response shape is identical:

{
  "id": "ext_8f2a…",
  "type": "invoice",
  "status": "completed",
  "model": "claude-opus-4-8",
  "data": {
    "invoice_number": "INV-2042",
    "currency": "USD",
    "total": "1284.00"
  }
}

That stability is the point. You can route a hard document to the higher-quality model and a routine one to the faster model without writing two code paths.

When to reach for Claude Opus 4.8

claude-opus-4-8 is the default for the highest-quality extractions. Reach for it when:

  • The layout is dense — multi-column statements, nested tables, fine print.
  • The scan is messy — skew, noise, faint ink, or handwriting in the margins.
  • Every field is load-bearing — tax forms and financial documents where a single wrong digit is expensive.

When to reach for Gemini 3 Flash

gemini-3-flash is built for speed and throughput. Reach for it when:

  • You’re processing a large batch and total wall-clock time matters more than squeezing out the last bit of accuracy.
  • The documents are clean and well-structured — typed PDFs, consistent receipts.
  • You’re doing a first pass and can escalate uncertain results to the quality model.

A simple routing strategy

A pattern that works well in production: default to gemini-3-flash for volume, and escalate to claude-opus-4-8 for the document types where mistakes are costly. Because the request differs only by one field and the response is identical, that routing lives entirely in your own code — no special handling required.

Both models are available on every paid plan. Pick per request, measure on your own documents, and route accordingly.

The dOCR team

dOCR, Inc.