GET
/health
Check that the FastAPI server is running
How it works
What it does
Returns {"status":"ok"} — just confirms the server is alive and reachable.
AI Used
None — no AI calls happen here.
Where data goes
Nowhere. It's a simple ping.
You decide
Nothing — hit the button, see the response.
No response yet
Hit "Send Request" to see the response here.
POST
/chat
Send messages directly to Claude (no RAG, no document lookup)
How it works
What it does
Sends your message list straight to the LLM and returns its answer. No documents or chunks are involved — just you and the AI.
AI Used
Claude (via AnthropicProvider). You can override the model name below.
Where data goes
Only to Anthropic's API — nothing is stored locally.
You decide
The role of each message (system / user / assistant) and optionally a different model name.
No response yet
Response will appear here. Enable Stream to see words appear live.
POST
/ingest
Store a piece of text in the RAG knowledge base
How it works — 4 steps happen automatically
Step 1 — Chunking
TextChunker splits your text into overlapping pieces (~1000 chars each, 200-char overlap) so large documents don't exceed LLM limits.
Step 2 — Embeddings (OpenAI)
Each chunk is sent to OpenAI's embedding API, which converts it to a list of 1536 numbers (a vector). This is how semantic search works.
Step 3 — Storage (ChromaDB)
Chunks + their vectors are saved to ChromaDB on local disk. They persist until you delete them.
Step 4 — Response
Returns a document_id (UUID). Save it! You need it to delete the document later.
No response yet
document_id will appear here — copy it to delete later.
POST
/ingest/file
Upload a .txt or .pdf file into the RAG knowledge base
How it works
What it does
Same as /ingest above, but accepts a file upload instead of raw text. The server saves it to a temp path, reads it (uses pypdf for PDFs), then runs the same chunk → embed → store pipeline.
AI Used
OpenAI Embeddings API (to vectorize the chunks).
Where data goes
Temp file is deleted after ingestion. Chunks land in ChromaDB on disk. Source is set to the original filename.
You decide
Which file to upload (.txt or .pdf only).
Click to choose a file, or drag & drop it here
Supports .txt and .pdf
No response yet
document_id and filename will appear here.
POST
/query
Ask a question — Claude answers using your stored documents
How it works — the full RAG pipeline
Step 1 — Embed question (OpenAI)
Your question is converted to a vector using OpenAI Embeddings — same space as the stored chunks.
Step 2 — Search (ChromaDB)
Finds the top-k chunks most semantically similar to your question using cosine similarity.
Step 3 — Build prompt
Those chunks are stuffed into a prompt as "context" alongside your question.
Step 4 — Answer (Claude)
Claude reads the context and writes an answer. The response includes which chunks were used (sources) and token counts.
No response yet
The AI answer + source chunks will appear here.
DELETE
/documents/{id}
Remove all chunks of a document from ChromaDB
How it works
What it does
Finds all chunks in ChromaDB whose metadata matches the given document_id and deletes them. After this, the document can no longer be found in queries.
AI Used
None — pure database operation.
Where data goes
Permanently removed from ChromaDB on disk.
You decide
The document_id from a previous /ingest response. Use the tracker below.
Ingested Documents (this session)
No documents ingested yet.
No response yet
Confirmation will appear here.