Chatbot SDK - REST API

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.

4 serversPorts: 8000 / 8001 / 8002 / 8003Content-Type: application/jsonNo auth by default
ModuleServer commandDefault port
chatbotchatbot-server8000
doc_uploaddoc-upload-server8001
mapperpdf-mapper-server8002
ragragpdf-server8003
MethodPathPurpose
POST/chatbot/chatSend a message - one call per conversation turn
GET/chatbot/session/{uid}/{sid}Get final collected JSON when session complete
GET/chatbot/session/{uid}/{sid}/fill-reportGet field fill statistics for a completed session
DELETE/chatbot/session/{uid}/{sid}Delete all files for a session
GET/healthServer health check - storage + filler mode
GET/API info - version and endpoint map

chatbot-server

Chatbot Server — Port 8000

Start with chatbot-server --host 0.0.0.0 --port 8000. All endpoints are prefixed with /chatbot.


Send a message

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.


Get session data

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.


Get fill report

Returns field fill statistics for a completed session. Add ?format=text to receive a human-readable text report instead of JSON.


Delete session

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.


Health check

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.


API info

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

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.

MethodPathPurpose
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 job
GET/doc-upload/job/{job_id}/reportGet field fill report for a completed job
GET/healthServer health check

CLI equivalent: doc-upload-cli --document path/to/file.pdf --schema configs/form_keys.json --report. The --report flag prints a fill summary after extraction.


pdf-mapper-server

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.

MethodPathPurpose
POST/mapper/extractExtract fillable fields from a blank PDF
POST/mapper/mapSemantically map collected data to extracted PDF fields
POST/mapper/embedEmbed mapped values into the PDF
POST/mapper/fillFill a blank PDF with collected data (run-all in one call)
GET/healthServer health check

CLI 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.


ragpdf-server

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.

MethodPathPurpose
POST/rag/predictGet field value predictions for a new session
POST/rag/feedbackSubmit post-fill corrections to update the vector database
GET/rag/metrics/globalGlobal prediction accuracy metrics across all sessions
GET/rag/metrics/categoryMetrics filtered by field category
GET/rag/system-infoVector database status, embedding backend, and configuration
POST/rag/init-vectorsRe-initialise the vector database from a source file
GET/healthServer health check

CLI 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

Was this page helpful?
PDFFILLR.AI logo

PDFFILLR.AI

The intelligent layer for modern fund
administration. Automating high-stakes
documentation with precision and speed.

Powered byEngineersMind