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
| Format | Anforderung | Rückgabe | Hinweise |
|---|---|---|---|
| Markdown | formats: ["markdown"] (Default für /distill) | data.markdown | Kostenlos — standardmäßig enthalten. |
| Strukturiertes JSON | Default für /extract; ein schema angeben oder Thunderbit eines auto-generieren lassen | data.data | Schema ist seit 2026-05-19 optional. |
| Metadaten | include: ["metadata"] | data.metadata | Kostenlos. Verfügbar bei /distill. |
| Original-HTML | include: ["html"] | data.html | Sparsam einsetzen — große Payloads. |
| Links | formats: ["links"] | data.links (Array aus {text, href}) | Kostenlos. |
| Bilder | formats: ["images"] | data.images (Array aus {src, alt, width, height}) | Kostenlos. |
| Zusammenfassung | formats: [{"type":"summary"}] | data.summary (Markdown) | +4 Credits bei Erfolg. |
| Frage / Antwort | formats: [{"type":"question","question":"…"}] | data.answer | +4 Credits bei Erfolg. |
| Highlights | formats: [{"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 data — data.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: 5undsummary→ 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.