/api/v1/documents
Upload a document to convert it to Markdown or process it with a custom extractor. The API supports PDF, DOCX, and image files up to 100MB.
Request
Headers
Bearer token authentication. Example:
Bearer YOUR_API_KEYMust be
multipart/form-dataBody Parameters
The document file to process. Supported formats: PDF, DOCX, PNG, JPG, JPEG, WEBP, GIF.
Provide either
file or url, not both.URL to download the document from. The file will be fetched and processed.
Provide either
file or url, not both.Processing accuracy level for Markdown conversion:
lite— Fast processing with great accuracy (default)ultra— Highest accuracy for complex documents
UUID of a custom extractor to use instead of standard Markdown conversion.
Include page break markers (
---) in the Markdown output.When
true, images are not extracted or transcribed from the document.Webhook URL to receive a POST request when processing completes.
Example Requests
Convert to Markdown
Convert from URL
Use Custom Extractor
Response
Example Responses
Webhooks
Whencallback_url is provided, a POST request is sent when processing completes:
Webhooks retry up to 3 times with 5-second delays if delivery fails. URLs must be HTTPS and publicly accessible.
Next Steps
After creating a document, poll Get Document untilstatus is COMPLETED or FAILED. The output_file_url provides a signed download link for the result.

