Skip to content

LLM API

The LLM surface wraps the rust engine’s retrieval primitives in four agent-friendly endpoints: /llm/answer (RAG over page transcriptions), /llm/expand (natural-language to KWS query expansion), /llm/page-context (structured per-page context bundle), and /llm/status (poll a running answer job). The configured model and budget are controlled by the LLM profile in cfg.

MethodPathSummaryKey paramsResponse
POST/llm/answerRAG answer over selected page transcriptionsbody: LlmAnswerRequestLlmAnswerResponse
POST/llm/expandTranslate a natural-language question into a KWS querybody: LlmExpandRequestLlmExpandResponse
POST/llm/page-contextStructured transcription context for the requested pagesbody: LlmAnswerRequest(no body)
POST/llm/statusPoll a previous /llm/answer callbody: LlmAnswerRequest(no body)

Ask a question (RAG)

Terminal window
curl -X POST -H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"question": "who attended the 1789 session?"}' \
"$ARCHAIC/llm/answer"