REST API¶
Base URL: http://127.0.0.1:8000 (local)
GET /health¶
Returns service status and config flags.
GET /api/v1/parsers¶
List OCR and extractor plugins with enabled status.
Response:
{
"ocr": [{"id": "stub-ocr", "label": "...", "kind": "ocr", "enabled": true}],
"extract": [{"id": "stub-extract", "label": "...", "kind": "extract", "enabled": true}]
}
POST /api/v1/parse¶
Multipart form upload.
| Field | Type | Description |
|---|---|---|
file |
file | PDF document |
ocr_parsers |
string | Comma-separated parser IDs |
extract_parsers |
string | Comma-separated parser IDs |
Example:
curl -X POST http://127.0.0.1:8000/api/v1/parse `
-F "file=@sample.pdf" `
-F "ocr_parsers=docai" `
-F "extract_parsers=gemini-extract"
Errors:
| Code | Cause |
|---|---|
| 400 | No parsers selected, or disabled parser requested |
| 404 | Unknown parser ID |
GET /¶
Serves the local HTML UI (faxautomation/web/static/index.html).