Skip to content

COSTS

Cost per 1,000 Pages — Three Paths
┌────────────────────────────────────┬─────────────────────┬───────────────────┬─────────────────────┐
│ Cost Component │ MathPix (equations) │ Marker (graphics) │ Gemini Flash (text) │
├────────────────────────────────────┼─────────────────────┼───────────────────┼─────────────────────┤
│ OCR / Conversion │ $100.00 │ $6.00 │ $1.00 │ ├────────────────────────────────────┼─────────────────────┼───────────────────┼─────────────────────┤ │ Image descriptions (Claude Vision) │ $3.00 │ $15.00 │ $0.00 │ ├────────────────────────────────────┼─────────────────────┼───────────────────┼─────────────────────┤ │ Cloudflare Workers │ $0.05 │ $0.05 │ $0.05 │ ├────────────────────────────────────┼─────────────────────┼───────────────────┼─────────────────────┤ │ Cloudflare R2 storage │ $0.01 │ $0.01 │ $0.01 │ ├────────────────────────────────────┼─────────────────────┼───────────────────┼─────────────────────┤ │ UX optimization (deterministic) │ $0.00 │ $0.00 │ $0.00 │ ├────────────────────────────────────┼─────────────────────┼───────────────────┼─────────────────────┤ │ Total │ ~$103 │ ~$21 │ ~$1 │ ├────────────────────────────────────┼─────────────────────┼───────────────────┼─────────────────────┤ │ Per page │ $0.103 │ $0.021 │ $0.001 │ └────────────────────────────────────┴─────────────────────┴───────────────────┴─────────────────────┘ Assumptions

  • 200 documents at ~5 pages/doc average
  • Image descriptions: Claude Sonnet at $3/$15 per MTok (in/out), ~1K in + 200 out tokens per image
    • Equation docs: ~100 images (1 per 10 pages — occasional figures)
    • Graphics docs: ~500 images (1 per 2 pages — diagram-heavy)
    • Text docs: 0 images
  • UX optimizer: deterministic (production default, free). If you enable Claude UX, add ~$0.10/doc × 200 = $20 to each path
  • Cloudflare compute: essentially free at this scale ($5/mo covers 10M requests)

Key Takeaway

Conversion backend dominates cost. MathPix is ~100x more expensive than Gemini Flash and ~17x more than Marker. The auto-routing you implemented earlier means most documents avoid MathPix entirely — only math-heavy PDFs hit the $0.10/page path.

For a blended workload (say 10% equations, 30% graphics, 60% text-only), the average per-page cost drops to about $0.017 — vs $0.10 if everything went through MathPix.