Extrix provides a REST API for data extraction. The API is built with FastAPI and supports both synchronous and asynchronous operations.
Extract data from a document.
Request:
- Method:
POST - Content-Type:
multipart/form-data - Body:
file: Document file (PDF, DOCX, etc.)config: JSON string containing extraction configuration
curl -X POST "http://localhost:8000/extract" \
-H "Content-Type: multipart/form-data" \
-F "file=@document.pdf" \
-F "config={\"languages\":[\"fr\"],\"model\":\"gemini-1.5-pro\"}"Response:
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "PENDING",
"result": null,
"error": null
}Get the status of an extraction job.
Request:
- Method:
GET - Parameters:
job_id: UUID of the extraction job
curl "http://localhost:8000/status/550e8400-e29b-41d4-a716-446655440000"Response:
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "COMPLETED",
"result": {
// Extracted data according to model schema
},
"error": null
}Currently, the API doesn't require authentication. For production use, implement appropriate authentication mechanisms.
See examples for more detailed API usage examples.