Back to Docs
API Reference
RESTful API for integrating Aelira into your applications and workflows.
Base URL
http://localhost:8000/api/v1For production deployments, replace with your server URL.
Authentication
API requests require a bearer token in the Authorization header:
Authorization: Bearer your-api-tokenFor local development, authentication can be disabled in the configuration.
Endpoints
POST
/scan/documentUpload and scan a document for accessibility issues.
Parameters
| Name | Type | Description |
|---|---|---|
| file | File | Document file (PDF, PPTX, DOCX, XLSX, TEX) |
| ocr | Boolean | Enable OCR for scanned PDFs (default: false) |
| generate_alt_text | Boolean | Generate AI alt text for images (default: false) |
POST
/scan/websiteScan a website URL for WCAG compliance issues.
Request Body
{
"url": "https://example.com",
"wcag_level": "AA", // "A", "AA", or "AAA"
"crawl": false, // Follow links
"max_pages": 10 // Max pages if crawling
}POST
/latex/convertConvert LaTeX equation to accessible MathML.
Request Body
{
"latex": "\\frac{1}{2}",
"generate_aria": true // Include ARIA label
}Response
{
"mathml": "<math>...</math>",
"aria_label": "one half"
}GET
/scan/{scan_id}Retrieve results for a completed scan.
GET
/scansList scan history with pagination and filtering.
Query Parameters
| Name | Type | Description |
|---|---|---|
| limit | Integer | Results per page (default: 20) |
| offset | Integer | Skip N results |
| type | String | Filter by type (document, website) |
Rate Limits
- Document scans: 100 per hour
- Website scans: 50 per hour
- LaTeX conversions: 1000 per hour
Self-hosted deployments have no rate limits.
Interactive API Docs
Explore the API interactively with Swagger UI:
http://localhost:8000/docs