Guides

Output Formats

Markdown, structured JSON, metadata, HTML, links, images, summary, question/answer, highlights

Thunderbit can return any combination of the formats below. Use the formats array on /distill, /extract, and /search to add anything beyond the default. The legacy include array stays supported for metadata / html.

Available formats

FormatHow to requestReturned asNotes
Markdownformats: ["markdown"] (default for /distill)data.markdownFree — included by default.
Structured JSONDefault for /extract; provide a schema or let Thunderbit auto-generate onedata.dataSchema is optional from 2026-05-19.
Metadatainclude: ["metadata"]data.metadataFree. Available on /distill.
Original HTMLinclude: ["html"]data.htmlUse sparingly — large payloads.
Linksformats: ["links"]data.links (array of {text, href})Free.
Imagesformats: ["images"]data.images (array of {src, alt, width, height})Free.
Summaryformats: [{"type":"summary"}]data.summary (Markdown)+4 credits on success.
Question / Answerformats: [{"type":"question","question":"…"}]data.answer+4 credits on success.
Highlightsformats: [{"type":"highlights","query":"…"}]data.highlights (array of strings)+4 credits on success.

Combining formats

curl -X POST https://openapi.thunderbit.co/openapi/v1/distill \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/article",
    "formats": [
      "markdown",
      "links",
      "images",
      {"type": "summary"},
      {"type": "question",   "question": "What is this page about?"},
      {"type": "highlights", "query":    "key takeaways"}
    ]
  }'

The response carries each requested key in data — data.markdown, data.links, data.images, data.summary, data.answer, data.highlights. Unrequested keys are omitted, not nulled.

Credit math

LLM formats (summary, question, highlights) are billed only when they return a result. The response carries a creditsUsed companion in batch and search responses; for single-page calls, check your account ledger.

  • Distill with one LLM format → 1 + 4 = 5 credits
  • Distill with three LLM formats → 1 + 3×4 = 13 credits
  • Extract with one LLM format → 20 + 4 = 24 credits
  • Search with limit: 5 and summary → 5 × (1 + 4) + 1 = 26 credits

Legacy booleans and include

Older requests used includeHtml: true and extractLinks: true. Both still work; prefer formats (and include for metadata / html) in new code — they're composable and clearer in code review.