Base URL
All API requests should be made to:Authentication
All endpoints require authentication via API key in the request header:Available Endpoints
Core Endpoints
Extract
POST
/extractThe primary endpoint. Synchronously extract content from documents.Extract Async
POST
/extract_asyncAsynchronously process documents. Returns job ID for polling.Poll Job
GET
/job/{jobId}Check status and retrieve results of async jobs.Cancel Job
DELETE
/job/{jobId}Cancel a pending or processing async job.Webhooks
POST
/webhookGet portal link to configure webhook endpoints.Deprecated Endpoints
| Endpoint | Status | Replacement |
|---|---|---|
POST /convert | Deprecated | Use file_url parameter in /extract instead |
POST /cancel/{job_id} | Deprecated | Use DELETE /job/{jobId} instead |
Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid API key |
| 403 | Forbidden - Access denied |
| 404 | Not Found - Resource doesn’t exist |
| 413 | Payload Too Large - File exceeds limit |
| 429 | Too Many Requests - Rate limited |
| 500 | Internal Server Error |
| 503 | Service Unavailable |
Best Practices
Use Appropriate Endpoints
Use Appropriate Endpoints
- Use
/extractfor most documents - it’s the primary endpoint - Use
/extract_asyncfor large documents or batch processing - Use
file_urlparameter when you have documents hosted online
Handle Errors Gracefully
Handle Errors Gracefully
- Implement retry logic with exponential backoff
- Check error codes and handle specifically
- Log errors for debugging
Optimize Performance
Optimize Performance
- Process only necessary pages
- Use schemas for structured extraction
- Cache results when possible
Security
Security
- Never expose API keys in client code
- Use environment variables
- Rotate keys regularly
- Validate file types before upload
