alRetrieval
Ingest documents and query them with natural-language semantic retrieval. Supports PDF, DOCX, PPTX, TXT, and Markdown files.
- Path
- /v1/alRetrieval
- Key scope
- alretrieval
Supported file formats
PDF, DOCX, PPTX, TXT, MD
PDFs are processed via OCR; DOCX, PPTX, TXT, and MD have text extracted directly — no OCR cost
Scope Required: All alRetrieval endpoints require an API key with the alretrieval scope. Pass it as a Bearer token in the Authorization header.
Errors
Errors use standard HTTP status codes and one JSON shape. Branch on error.code, which is stable; message is for people and may change. Some errors also carry document_ids, statuses or details.
{
"error": {
"code": "document_not_ready",
"message": "Documents not ready: '3146366e04ff' is processing.",
"request_id": "7f3c1a9d0b2e4c6f8a1b3d5e7f9a0b2c",
"document_ids": ["3146366e04ff"],
"statuses": { "3146366e04ff": "processing" }
}
}
| HTTP / code | Description |
|---|---|
400 invalid_json / missing_file | Fix the request. |
402 insufficient_balance | This month's requests or OCR pages are used up; upgrade at /pricing. |
404 collection_not_found / document_not_found | The id does not exist in your account. |
409 document_not_ready / no_ready_documents / nothing_to_retry / document_limit_reached | See the endpoint. |
413 / 415 | File too large or unsupported type. |
422 invalid_request | See details; includes unknown fields and out-of-range values. |
502 / 504 | A temporary upstream failure or timeout; retry. |
Ready to Get Started?
Generate an API key from your dashboard and start building