Build Hong Kong AFS .docx reports from structured payloads.
GET /health)All POST endpoints require a valid API key. Pass it via either header:
-H "X-API-Key: <your-key>"-H "Authorization: Bearer <your-key>"Public endpoints (/, /health, /docs) do not require a key.
POST /extract — extract structured data from a PDF (NAR1, Prior Year AFS, ND2A, Board Resolution)
curl -X POST -H "X-API-Key: <key>" -F "file=@doc.pdf" -F "doc_type=NAR1" /extractPOST /extract/tb — extract Trial Balance rows from an .xlsx workbook
curl -X POST -H "X-API-Key: <key>" -F "file=@tb.xlsx" /extract/tbPOST /summarize — merge multiple extraction results into one generation context
curl -X POST -H "X-API-Key: <key>" -H "Content-Type: application/json" -d '{"extractions":{...}}' /summarizePOST /generate — build full or single-section report (?section= optional; sections: cover, dr, ar, bs, is, cie, notes)
curl -X POST -H "X-API-Key: <key>" -H "Content-Type: application/json" -d '{"context":{...}}' /generatePOST /compose/render — render user-customised compose payload into .docx
curl -X POST -H "X-API-Key: <key>" -H "Content-Type: application/json" -d '{...}' /compose/render