Endpoints
/convertCONVERSIONConvert a document
The convert API allows for parsing supported file types or public HTTP(S) document URLs.
fileOne of theseA supported local document uploaded as multipart form data. Send either file or url.urlOne of theseA public HTTP(S) document URL. Send either url or file.output_formatNoResponse content format: json (default; document_json is an alias), markdown, or chunks.enable_ocrNoSet to true to enable OCR; defaults to false./usageUSAGEGet usage
Get current UTC calendar-month request totals, pages processed, the account plan page limit, and remaining pages.
/batchesBATCHSubmit a batch
Submit a batch job to process multiple files. Include each file as a separate files multipart field.
filesYesA supported local file. Repeat this multipart field for each file. URL inputs and ZIP uploads are not supported.output_formatNoResponse content format for every file: json (default; document_json is an alias), markdown, or chunks.enable_ocrNoSet to true to enable OCR for every file; defaults to false./batches/{batch_id}BATCHCheck a batch
Returns batch progress, expiration, and each file’s status or error.
/batches/{batch_id}/resultsBATCHDownload batch results
Downloads a ZIP containing one JSON response per successful document and manifest.json with every file’s status and error. Returns HTTP 409 with Retry-After while processing.
Extract text from images (OCR)
- PDF:
.pdf - Word:
.docx - PowerPoint:
.pptx - Excel:
.xlsx - HTML:
.html,.htm - EPUB:
.epub - JPEG:
.jpg,.jpeg - PNG:
.png - BMP:
.bmp - GIF:
.gif - TIFF:
.tif,.tiff
Send enable_ocr=true to enable OCR. See the pricing section for plans that support OCR. An OCR convertion example follows.
curl --fail-with-body "https://www.docuapi.dev/convert" \
--header "Authorization: Bearer $DOCUAPI_API_KEY" \
--form "file=@./scan.png" \
--form "enable_ocr=true" \
--form "output_format=json"Usage response
Send a valid API key as a Bearer token. The period is the current UTC calendar month. The response includes the plan's page allowance and pages remaining. Failed and in-progress conversions count as requests; only successful conversions consume the page allowance.
curl "https://docuapi.dev/usage" \
--header "Authorization: Bearer $DOCUAPI_API_KEY"{
"plan": "pro",
"period": {
"start": "2026-10-01T00:00:00Z",
"end": "2026-11-01T00:00:00Z"
},
"requests": {
"total": 9,
"succeeded": 8,
"failed": 1,
"processing": 0
},
"pages_processed": 47,
"limits": {
"monthly_pages": 50000
},
"pages_remaining": 49953
}Batch conversion
Send one or more local files using repeated files fields. URL inputs and ZIP uploads are not supported. output_format works exactly as on /convert: json (alias document_json, the default), markdown, or chunks. Optional enable_ocr accepts true or false (default). These options apply to every file.
curl --request POST "https://www.docuapi.dev/batches" \
--header "Authorization: Bearer $DOCUAPI_API_KEY" \
--form "files=@./invoice.pdf" \
--form "files=@./report.docx" \
--form "output_format=json" \
--form "enable_ocr=true"
# Copy batch_id from the HTTP 202 response.
BATCH_ID="REPLACE_WITH_RETURNED_ID"
curl "https://www.docuapi.dev/batches/$BATCH_ID" \
--header "Authorization: Bearer $DOCUAPI_API_KEY"
# Download when status is completed or completed_with_errors.
curl --fail --location --remove-on-error "https://www.docuapi.dev/batches/$BATCH_ID/results" \
--header "Authorization: Bearer $DOCUAPI_API_KEY" \
--output results.zip && unzip -t results.zipimport os
import docuapi
docuapi.api_credentials = os.environ["DOCUAPI_API_KEY"]
batch = docuapi.create_batch(
["invoice.pdf", "report.docx"],
enable_ocr=True,
output_format="json",
)
batch_id = batch["batch_id"]
docuapi.wait_for_batch(batch_id)
docuapi.download_batch_results(batch_id, "results.zip")Limits batch API
Conversion response
Successful responses contain three fields: document, content, and metadata. The document includes its title, source filename, and page count. With output_format=json (or document_json), content is an ordered list of blocks with IDs, types, text, and page references; tables include a two-dimensional rows array. Page references are null when the source has no page information. The title falls back to the source filename without its extension if no title is detected.
Set output_format=markdown for a Markdown string in content, or output_format=chunks for paragraph-based chunks with source, page, and section metadata. Metadata reports the extraction mode, OCR setting, plan, and processing time. Each response contains only the requested format.
{
"document": {
"title": "Annual Report 2025",
"source": "annual-report.pdf",
"page_count": 12
},
"content": [
{
"id": "block_001",
"type": "heading",
"text": "Revenue and growth",
"page": 2
},
{
"id": "block_002",
"type": "paragraph",
"text": "Revenue increased by 12% in 2025.",
"page": 2
},
{
"id": "block_003",
"type": "table",
"text": "Revenue by region",
"page": 3,
"rows": [["Region", "Revenue"], ["Europe", "CHF 8.4M"]]
}
],
"metadata": {
"extraction_mode": "text",
"ocr_enabled": false,
"plan": "free",
"duration_ms": 1432
}
}Getting started
Read the product overview and quickstart.