Anleitungen

Ausgabeformate

Markdown, strukturiertes JSON, Metadaten, HTML, Links, Bilder, Zusammenfassung, Frage/Antwort, Highlights

Thunderbit kann jede beliebige Kombination der Formate unten zurückgeben. Verwende das formats-Array bei /distill, /extract und /search, um mehr als den Default anzufordern. Das Legacy-include-Array bleibt für metadata / html unterstützt.

Verfügbare Formate

FormatAnforderungRückgabeHinweise
Markdownformats: ["markdown"] (Default für /distill)data.markdownKostenlos — standardmäßig enthalten.
Strukturiertes JSONDefault für /extract; ein schema angeben oder Thunderbit eines auto-generieren lassendata.dataSchema ist seit 2026-05-19 optional.
Metadateninclude: ["metadata"]data.metadataKostenlos. Verfügbar bei /distill.
Original-HTMLinclude: ["html"]data.htmlSparsam einsetzen — große Payloads.
Linksformats: ["links"]data.links (Array aus {text, href})Kostenlos.
Bilderformats: ["images"]data.images (Array aus {src, alt, width, height})Kostenlos.
Zusammenfassungformats: [{"type":"summary"}]data.summary (Markdown)+4 Credits bei Erfolg.
Frage / Antwortformats: [{"type":"question","question":"…"}]data.answer+4 Credits bei Erfolg.
Highlightsformats: [{"type":"highlights","query":"…"}]data.highlights (Array aus Strings)+4 Credits bei Erfolg.

Formate kombinieren

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"}
    ]
  }'

Die Antwort enthält jeden angeforderten Schlüssel in datadata.markdown, data.links, data.images, data.summary, data.answer, data.highlights. Nicht angeforderte Schlüssel werden weggelassen, nicht auf null gesetzt.

Credit-Rechnung

LLM-Formate (summary, question, highlights) werden nur abgerechnet, wenn sie ein Ergebnis zurückgeben. In Batch- und Search-Antworten liegt ein creditsUsed-Feld bei; bei Einzelseiten-Aufrufen siehst du das im Account-Ledger.

  • Distill mit einem LLM-Format → 1 + 4 = 5 credits
  • Distill mit drei LLM-Formaten → 1 + 3×4 = 13 credits
  • Extract mit einem LLM-Format → 20 + 4 = 24 credits
  • Search mit limit: 5 und summary → 5 × (1 + 4) + 1 = 26 credits

Legacy-Booleans und include

Ältere Anfragen verwendeten includeHtml: true und extractLinks: true. Beide funktionieren weiterhin; in neuem Code lieber formats (und include für metadata / html) — komponierbar und im Code-Review klarer.