The Document Intelligence Platform provides a RESTful API built with FastAPI, featuring automatic OpenAPI documentation, type safety, and async support.
- Development:
http://localhost:8000 - Production: TBD
Currently, the API is open for development. Authentication will be implemented in future versions.
Root endpoint providing basic API information.
Response:
{
"message": "Document Intelligence Platform API",
"version": "0.1.0"
}Health check endpoint for monitoring and load balancer probes.
Response:
{
"status": "healthy",
"service": "document-intelligence-platform"
}The following endpoints are planned for implementation:
POST /api/v1/documents/upload- Upload documentGET /api/v1/documents/{document_id}- Get document detailsGET /api/v1/documents- List documents with paginationDELETE /api/v1/documents/{document_id}- Delete document
POST /api/v1/search/semantic- Perform semantic searchGET /api/v1/search/history- Get search history
FastAPI automatically generates interactive API documentation:
- Swagger UI: Available at
/docs - ReDoc: Available at
/redoc
These interfaces provide:
- Complete API schema
- Interactive request/response testing
- Automatic validation documentation
- Type information and examples
The API follows standard HTTP status codes and returns structured error responses:
{
"error": {
"code": "ERROR_CODE",
"message": "Human readable error message",
"details": {},
"timestamp": "2024-01-15T10:30:00Z"
}
}The API is built with comprehensive type hints and Pydantic models for:
- Request/response validation
- Automatic documentation generation
- Runtime type checking
- Better IDE support and development experience
CORS is configured to allow all origins in development. This will be restricted in production environments.