API
May 11, 2026 ยท View on GitHub
The service exposes a small web/API surface through FastAPI and a CLI entry point.
Web Endpoints
GET /
Returns the HTML form.
Requires HTTP Basic auth.
POST /
Submits a report for summarization.
Requires HTTP Basic auth.
Form fields:
url: report URLpdffile: uploaded PDFtext: pasted report textsystem_prompt: optional prompt overridemodel: optional model override
Provide one of url, pdffile, or text.
Response behavior:
- If
OUTPUT_JSON=false, returns HTML containing rendered markdown. - If
OUTPUT_JSON=true, returns validated JSON.
Structured Output
The validated output model is CTISummary in app/schema.py.
Main fields:
summarykey_pointsttpsindicatorsthreat_actorsconfidence_scorereport_metadatayara_rules
CLI
The CLI entry point is cti-summarizer.
Examples:
uv run cti-summarizer --file sample-data.txt
uv run cti-summarizer --file sample-data.txt --return-json
uv run cti-summarizer --url https://example.org/report.html
uv run cti-summarizer --text "Report text"
Provider overrides:
uv run cti-summarizer \
--provider openai \
--model gpt-5.5 \
--file sample-data.txt \
--return-json
The CLI reads the same environment-backed settings as the web app and allows selected overrides through command-line options.