시작하기
빠른 시작
60초 안에 첫 API 호출 보내기
인증
모든 API 요청은 header에 API Key가 필요합니다:
Authorization: Bearer YOUR_API_KEYThunderbit 대시보드에서 API Key를 발급받으세요. Key는 취소 가능하며 환경별로 분리됩니다 —— 프로덕션 Key를 클라이언트 측 코드에 임베드하지 마세요.
1. 단일 페이지를 Markdown으로 디스틸
cURL:
curl -X POST https://openapi.thunderbit.com/openapi/v1/distill \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://thunderbit.com/playground"}'Python:
import httpx
resp = httpx.post(
"https://openapi.thunderbit.com/openapi/v1/distill",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"url": "https://thunderbit.com/playground"},
timeout=60.0,
)
resp.raise_for_status()
print(resp.json()["data"]["markdown"])Node.js:
const r = await fetch("https://openapi.thunderbit.com/openapi/v1/distill", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ url: "https://thunderbit.com/playground" }),
});
const { data } = await r.json();
console.log(data.markdown);2. JSON Schema로 구조화 데이터 추출
curl -X POST https://openapi.thunderbit.com/openapi/v1/extract \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/product/iphone-15-pro",
"schema": {
"type": "object",
"properties": {
"name": { "type": "string" },
"price": { "type": "number" },
"currency": { "type": "string" },
"inStock": { "type": "boolean" }
},
"required": ["name", "price"]
}
}'3. Webhook 콜백이 포함된 배치 작업 제출
curl -X POST https://openapi.thunderbit.com/openapi/v1/batch/distill \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"urls": [
"https://example.com/page1",
"https://example.com/page2",
"https://example.com/page3"
],
"webhook": {
"url": "https://your-server.com/api/webhook/distill",
"secret": "whsec_your_secret_key"
}
}'