DEVELOPER API
Document Conversion API
Convert PDF, Word, PowerPoint, Excel, EPUB, CSV, RTF, and OpenDocument files into Markdown, structured JSON, or deterministic chunks for retrieval pipelines. Scanned PDFs use OCR automatically.
Authentication and request
Create a key in Settings → API keys and send it as a bearer token.
curl https://anydocai.com/api/v1/documents/convert \
-H "Authorization: Bearer $ANYDOCAI_API_KEY" \
-F "file=@report.pdf" \
-F "output=chunks" \
-F "ocr=auto"Fields
| file | Required document, up to 50 MB |
|---|---|
| output | markdown, json, or chunks |
| ocr | auto or off |
| chunk_size | 500–12,000 characters |
| webhook_url | Public HTTPS callback URL |
Signed webhooks
When a callback URL is present, AnydocAI sends document.conversion.completed or document.conversion.failed. Verify the raw body with the HMAC-SHA256 value in x-anydocai-signature.