Module · Live

Distill

Distill is module 1 of Prometheus Potential. It turns a URL or query into structured facts with source URLs, caches the result at the edge, and keeps Distill project memory lite (/v1/remember / /v1/recall). Routes are unchanged from the Distill API.

1. Health

curl -sS https://distill.prometheus-potential.workers.dev/health

2. Extract facts from a URL

curl -sS https://distill.prometheus-potential.workers.dev/v1/distill \
  -H "Authorization: Bearer $DISTILL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.cloudflare.com/learning/","budget":"fast"}'

2b. Extract facts from a query (no URL)

Query mode searches public sources, then extracts facts. Paid keys BRAVE_SEARCH_API_KEY / BING_SEARCH_API_KEY are used when set. Otherwise Distill tries DuckDuckGo Instant Answer, Bing RSS, Wikipedia extracts, then DuckDuckGo HTML. Result URLs still pass SSRF and the 2 MB size cap.

curl -sS https://distill.prometheus-potential.workers.dev/v1/distill \
  -H "Authorization: Bearer $DISTILL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"What is Model Context Protocol?","budget":"fast"}'

3. Distill memory lite (remember / recall)

This is Distill’s built-in project scratchpad. For portable memory with TTL and source links, use the Memory module.

curl -sS https://distill.prometheus-potential.workers.dev/v1/remember \
  -H "Authorization: Bearer $DISTILL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"project_id":"alpha","key":"stack","value":"Workers + D1 + KV","tags":["infra"]}'

curl -sS "https://distill.prometheus-potential.workers.dev/v1/recall?project_id=alpha&q=stack" \
  -H "Authorization: Bearer $DISTILL_API_KEY"

Auth & errors

Same hub key as Memory. Caps return 429 with Retry-After. SSRF blocks return 400 with code ssrf_blocked. Oversize upstream bodies return 413 with code payload_too_large (not ssrf_blocked). Distill fetches URLs; Memory never does.

Docs hub · Memory · Agents · API reference