API Reference¶
Polymathy provides a RESTful API for search and content processing.
Overview¶
The API is built with Actix-web and follows REST conventions. All responses are JSON-formatted.
Base URL¶
Available Endpoints¶
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/search |
Process a search query and return content chunks |
Documentation UIs¶
Polymathy includes multiple interactive API documentation interfaces:
| Interface | URL | Description |
|---|---|---|
| Swagger UI | /swagger |
Interactive API explorer |
| ReDoc | /redoc |
Clean, readable documentation |
| RapiDoc | /rapidoc |
Modern API documentation |
| Scalar | /scalar |
Beautiful API reference |
| OpenAPI JSON | /openapi.json |
Raw OpenAPI specification |
Authentication¶
Currently, Polymathy does not require authentication. All endpoints are publicly accessible.
Production Use
For production deployments, consider adding authentication via a reverse proxy (e.g., nginx, Traefik).
Error Handling¶
Errors are returned as JSON with appropriate HTTP status codes:
| Status Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 500 | Internal Server Error |