All endpoints require the X-API-Key header (unless the server has no API keys configured).
Base URL: http://localhost:8000
curl -H "X-API-Key: your-key" http://localhost:8000/api/healthHealth check and statistics.
curl -H "X-API-Key: $KEY" http://localhost:8000/api/healthResponse:
{
"status": "ok",
"total_items": 142,
"categories": {"appsec": 45, "netsec": 30},
"llm_provider": "ollama/llama3.1:8b",
"embedded_items": 140
}Rebuild index.json from filesystem (use after manual file changes).
curl -X POST -H "X-API-Key: $KEY" http://localhost:8000/api/reindexRe-embed all items (use after switching embedding model).
curl -X POST -H "X-API-Key: $KEY" http://localhost:8000/api/reembedList configured categories.
Current LLM provider configuration.
Fetch a URL, extract text, classify, and store.
curl -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/article", "category": "appsec", "tags": ["xss", "csp"]}' \
http://localhost:8000/api/ingest/urlBody:
| Field | Type | Required | Description |
|---|---|---|---|
url |
string | yes | URL to fetch |
category |
string | no | One of the configured categories; omit to auto-classify |
tags |
string[] | no | Topic tags; omit to auto-generate |
Response:
{
"item_id": "a1b2c3d4",
"title": "Page Title",
"category": "appsec",
"tags": ["xss", "csp"],
"duplicate": false
}Upload a PDF file.
curl -X POST -H "X-API-Key: $KEY" \
-F "file=@/path/to/report.pdf" \
-F "category=reversing" \
http://localhost:8000/api/ingest/pdfStore a text note.
curl -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
-d '{"title": "My Note", "body": "Content here...", "category": "misc"}' \
http://localhost:8000/api/ingest/textBatch URL ingestion (rate-limited, 1s between requests).
curl -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
-d '{"urls": [{"url": "https://a.com"}, {"url": "https://b.com", "category": "netsec"}]}' \
http://localhost:8000/api/ingest/bulk-urlsList and filter items.
# All items
curl -H "X-API-Key: $KEY" "http://localhost:8000/api/items"
# Filter by category
curl -H "X-API-Key: $KEY" "http://localhost:8000/api/items?category=appsec"
# Filter by tag + text search
curl -H "X-API-Key: $KEY" "http://localhost:8000/api/items?tag=jwt&q=attack"
# Paginate
curl -H "X-API-Key: $KEY" "http://localhost:8000/api/items?limit=20&offset=40"Query params: category, tag, q (text search), limit (default 50), offset (default 0)
Get item metadata and content.
curl -H "X-API-Key: $KEY" http://localhost:8000/api/items/a1b2c3d4Get raw content.md as plain text.
Update item metadata.
curl -X PATCH -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
-d '{"category": "netsec", "tags": ["wifi", "wpa2"]}' \
http://localhost:8000/api/items/a1b2c3d4Delete an item.
curl -X DELETE -H "X-API-Key: $KEY" http://localhost:8000/api/items/a1b2c3d4Re-run LLM classification on an existing item.
List categories with item counts.
List all tags sorted by frequency.
RAG query — answer a question using the knowledge base.
curl -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
-d '{"question": "What are common Kerberoasting mitigations?", "category": "ad-hacking"}' \
http://localhost:8000/api/queryBody:
| Field | Type | Default | Description |
|---|---|---|---|
question |
string | required | Your question |
category |
string | null | Restrict to category |
tags |
string[] | null | Restrict to items with these tags |
top_k |
int | 8 | Number of chunks to use as context |
Response:
{
"answer": "Kerberoasting mitigations include...",
"sources": [
{"item_id": "a1b2c3d4", "title": "AD Attack Guide", "url": null, "relevance_score": 0.92}
]
}Semantic search — find relevant chunks without generating an answer.
curl -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
-d '{"query": "JWT algorithm confusion attack", "top_k": 5}' \
http://localhost:8000/api/searchGenerate a SKILL.md quick-reference from the knowledge base.
curl -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
-d '{"topic": "kerberoasting", "categories": ["ad-hacking"]}' \
http://localhost:8000/api/skills/generateList all generated skills.
Get a SKILL.md file as plain text.
curl -H "X-API-Key: $KEY" http://localhost:8000/api/skills/kerberoasting