Lightweight FNOL extraction, validation, and routing API for the Synapx assessment.
- Accepts PDF, TXT, and DOCX FNOL uploads.
- Extracts claim fields with Gemini or Anthropic when an API key is configured.
- Falls back to regex extraction so the app still runs without an AI key.
- Validates missing mandatory fields.
- Routes claims to Fast-track, Manual Review, Investigation Flag, Specialist Queue, or Standard Review.
- Lets users view and customize routing rules through
/rules.
venv\Scripts\activate
uvicorn main:app --reloadOpen http://127.0.0.1:8000 for the upload page, or use the API docs at http://127.0.0.1:8000/docs.
POST /claims/validate: multipart upload field namedfile.GET /rules: returns the active validation and routing rules.PUT /rules: replaces the active rules JSON.POST /rules/validate: validates an existingextractedFieldspayload against current rules.
Create a .env file in the project root with either key:
GEMINI_API_KEY=your_key
ANTHROPIC_API_KEY=your_key
If both are present, Gemini is tried first, then Anthropic, then regex fallback.
create text file to text file to test and got result as accesspted and added a test model to check the availablitiy of model gemini-3.1-flash-lite