This project exposes eyecite's core citation extraction, resolution, annotation, and cleaning functions as a RESTful API using FastAPI.
POST /extract— Extract citations from textPOST /resolve— Cluster and resolve citationsPOST /annotate— Annotate text with citation markupPOST /clean— Clean and preprocess textPOST /extract-resolve— Extract and resolve citations in one stepPOST /dump— (Optional) Dump detailed citation metadata
All endpoints accept and return JSON.
# Build and run with Docker
cd /workspaces/eyecite
docker build -t eyecite-api .
docker run -p 8000:8000 eyecite-apicurl -X POST "http://localhost:8000/extract" \
-H "Content-Type: application/json" \
-d '{"text": "See 410 U.S. 113 (1973)."}'Once running, visit http://localhost:8000/docs for interactive OpenAPI docs.
- Edit
api/main.pyto modify or add endpoints. - Update
requirements.txtfor dependencies. - See
PLAN.mdfor design notes.
- Limit request size and sanitize input for production.
- Add authentication if needed.
See PLAN.md for more details and roadmap.