Guides

Distill vs Extract

Which endpoint to use, when, and why

Thunderbit exposes two AI endpoints — /distill and /extract — that solve different problems. Picking the right one is the single biggest factor in cost, latency, and output quality.

When to use Distill

  • You want clean, LLM-ready Markdown of an entire page
  • The downstream consumer is a vector store, RAG pipeline, or LLM context
  • You don't know in advance which fields you'll need

When to use Extract

  • You know the exact fields you want as structured data (JSON)
  • The downstream consumer is a database, dashboard, or typed code
  • You want the model to do field-level reasoning (e.g. "what's the discount?")

Cost & latency tradeoffs

DistillExtract
Credits1 / page20 / page
LatencyLower (no AI extraction step)Higher (AI step + schema validation)
OutputMarkdownJSON conforming to your schema

Decision matrix

If your output is content (text, articles, knowledge base entries) → Distill. If your output is records (rows, fields, typed values) → Extract. If you're not sure, start with Distill — you can always run Extract on the markdown later.

This page is being expanded with concrete examples — check back soon.