polymathy 0.2.0

Turn search results into answers - a web service that fetches, chunks, and returns semantic content from search queries
Documentation
# 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

```
http://localhost:8080
```

## 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.

!!! warning "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:

```json
{
  "error": "Error message description"
}
```

| Status Code | Meaning |
|-------------|---------|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 500 | Internal Server Error |

## Next Steps

- [Endpoints]endpoints.md - Detailed endpoint documentation
- [OpenAPI]openapi.md - Working with the OpenAPI specification