Back to Docs
CLI Reference
Process thousands of files from the command line. Perfect for batch operations and CI/CD integration.
Document Scanning
# Scan a single PDF
curl -X POST http://localhost:8000/api/v1/scan/document \
-F "[email protected]"
# Scan with OCR enabled
curl -X POST http://localhost:8000/api/v1/scan/document \
-F "[email protected]" \
-F "ocr=true"
# Scan PowerPoint
curl -X POST http://localhost:8000/api/v1/scan/document \
-F "[email protected]"
# Scan Word document
curl -X POST http://localhost:8000/api/v1/scan/document \
-F "[email protected]"Website Scanning
# Scan a single URL
curl -X POST http://localhost:8000/api/v1/scan/website \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'
# Scan with specific WCAG level
curl -X POST http://localhost:8000/api/v1/scan/website \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "wcag_level": "AAA"}'
# Include subpages (crawl)
curl -X POST http://localhost:8000/api/v1/scan/website \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "crawl": true, "max_pages": 10}'Batch Processing
# Scan all PDFs in a directory
for file in /path/to/docs/*.pdf; do
curl -X POST http://localhost:8000/api/v1/scan/document \
-F "file=@$file" >> results.json
done
# Parallel processing with xargs
find /path/to/docs -name "*.pdf" | xargs -P 4 -I {} \
curl -X POST http://localhost:8000/api/v1/scan/document -F "file=@{}"
# Using the bulk upload endpoint
curl -X POST http://localhost:8000/api/v1/scan/bulk \
-F "[email protected]" \
-F "[email protected]" \
-F "[email protected]"LaTeX Conversion
# Convert inline LaTeX
curl -X POST http://localhost:8000/api/v1/latex/convert \
-H "Content-Type: application/json" \
-d '{"latex": "\\frac{1}{2}"}'
# Process a .tex file
curl -X POST http://localhost:8000/api/v1/scan/document \
-F "[email protected]"
# Convert and get ARIA labels
curl -X POST http://localhost:8000/api/v1/latex/convert \
-H "Content-Type: application/json" \
-d '{"latex": "E = mc^2", "generate_aria": true}'Response Format
{
"scan_id": "abc123",
"status": "completed",
"score": 78,
"wcag_level": "AA",
"issues": [
{
"id": "img-alt",
"type": "error",
"wcag": "1.1.1",
"message": "Image missing alternative text",
"location": "Page 3, Image 2",
"fix": {
"type": "add_alt_text",
"suggested": "Bar chart showing quarterly revenue growth"
}
}
],
"summary": {
"total_issues": 12,
"errors": 3,
"warnings": 9,
"pages_scanned": 15
}
}CI/CD Integration
Integrate accessibility scanning into your build pipeline:
# GitHub Actions example
- name: Accessibility Scan
env:
PREVIEW_URL: ${{ github.event.deployment.payload.web_url }}
run: |
RESULT=$(curl -s -X POST $AELIRA_URL/api/v1/scan/website \
-H "Content-Type: application/json" \
-d '{"url": "'"$PREVIEW_URL"'"}')
SCORE=$(echo $RESULT | jq '.score')
if [ "$SCORE" -lt 80 ]; then
echo "Accessibility score $SCORE is below threshold (80)"
exit 1
fiFull API Documentation
For complete API documentation including authentication, rate limits, and all endpoints:
API Reference