REST API Reference
Complete reference for every HTTP endpoint exposed by the four pdf-autofillr module servers. All requests and responses use JSON. Each module runs as an independent FastAPI server on its own port — or inprocess inside your application.
chatbotchatbot-server8000doc_uploaddoc-upload-server8001mapperpdf-mapper-server8002ragragpdf-server8003POST/chatbot/chatSend a message - one call per conversation turnGET/chatbot/session/{uid}/{sid}Get final collected JSON when session completeGET/chatbot/session/{uid}/{sid}/fill-reportGet field fill statistics for a completed sessionDELETE/chatbot/session/{uid}/{sid}Delete all files for a sessionGET/healthServer health check - storage + filler modeGET/API info - version and endpoint mapChatbot Server — Port 8000
Start with chatbot-server --host 0.0.0.0 --port 8000. All endpoints are prefixed with /chatbot.
The main endpoint. Call once per conversation turn. Send an empty string for message on the first turn to receive the greeting. The bot processes the message, advances the conversation state machine, and returns its reply. When session_complete is true, filled_data contains the complete flat dict of all collected fields.
Returns the final collected data for a completed session. Only call this after session_complete = true has appeared in a chat response. Returns HTTP 404 if the session does not exist or has not reached COMPLETE state yet.
Returns field fill statistics for a completed session. Add ?format=text to receive a human-readable text report instead of JSON.
Permanently deletes all files for a session - state, conversation log, output, fill report, and PDF workflow logs. This action is irreversible. For S3 storage, all associated S3 objects are deleted.
Returns server health status. Use this to verify the server is running and confirm which storage backend and PDF filler mode are active. Does not require any authentication.
Returns the SDK version number and a map of all available endpoints. Useful for verifying the installed version and discovering endpoint paths programmatically.
Doc Upload Server — Port 8001
Start with doc-upload-server --host 0.0.0.0 --port 8001. Accepts document uploads (PDF, Word, Excel) and extracts field values using an LLM, then optionally fills a blank PDF via the mapper module.
POST/doc-upload/uploadUpload a document and start field extraction (returns job_id)GET/doc-upload/job/{job_id}Get extraction status and output for a jobGET/doc-upload/job/{job_id}/reportGet field fill report for a completed jobGET/healthServer health checkCLI equivalent: doc-upload-cli --document path/to/file.pdf --schema configs/form_keys.json --report. The --report flag prints a fill summary after extraction.
Mapper Server — Port 8002
Start with pdf-mapper-server --host 0.0.0.0 --port 8002. Enable by setting MAPPER_API_URL=http://localhost:8002 in .env. By default, mapper runs inprocess.
POST/mapper/extractExtract fillable fields from a blank PDFPOST/mapper/mapSemantically map collected data to extracted PDF fieldsPOST/mapper/embedEmbed mapped values into the PDFPOST/mapper/fillFill a blank PDF with collected data (run-all in one call)GET/healthServer health checkCLI equivalent: pdf-mapper run-all --pdf data/input/blank_form.pdf --data collected.json. Individual pipeline steps can be run separately: extract, map, embed, fill.
RAG Server — Port 8003
Start with ragpdf-server (or uvicorn ragpdf.entrypoints.fastapi_app:app --port 8003). Enable by setting RAG_MODE=http and RAG_API_URL=http://localhost:8003 in .env.
POST/rag/predictGet field value predictions for a new sessionPOST/rag/feedbackSubmit post-fill corrections to update the vector databaseGET/rag/metrics/globalGlobal prediction accuracy metrics across all sessionsGET/rag/metrics/categoryMetrics filtered by field categoryGET/rag/system-infoVector database status, embedding backend, and configurationPOST/rag/init-vectorsRe-initialise the vector database from a source fileGET/healthServer health checkCLI equivalents: ragpdf system-info, ragpdf metrics --type global, ragpdf feedback --user u1 --session s1 --pdf p1 --errors errors.json, ragpdf init-vectors --force.
Next in AI SDK Reference
PDFFILLR.AI
The intelligent layer for modern fund
administration. Automating high-stakes
documentation with precision and speed.