DOCUAPI DOCS

Build document conversion into your application.

Convert documents to structured Markdown, JSON, or chunks ready to use in retrieval and vector database workflows.

Quickstart

Create an account, then create an API key from your dashboard. Send a document as multipart form data using either a local file or a public HTTP(S) document URL, and choose the output format.

Terminal · cURL
curl --request POST "https://docuapi.dev/convert" \
  --header "Authorization: Bearer $DOCUAPI_API_KEY" \
  --form "file=@./annual-report.pdf" \
  --form "output_format=json" \
  --form "enable_ocr=true"
Python · DocuAPI SDK
import os
import docuapi

docuapi.api_credentials = os.environ["DOCUAPI_API_KEY"]

result = docuapi.convert(
    {"File": "/path/to/my_file.pdf", "EnableOcr": "true"},
    output_format="json",
)

print(result["document"])
print(result["content"])
Terminal · cURL · document URL
curl --request POST "https://docuapi.dev/convert" \
  --header "Authorization: Bearer $DOCUAPI_API_KEY" \
  --form "url=https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf" \
  --form "output_format=json"

Convert a batch through the API

Terminal · cURL · Batch API
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.zip
Python · DocuAPI SDK · Batch API
import 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")

Supported formats

FormatExtensions
PDF.pdf
Word.docx
PowerPoint.pptx
Excel.xlsx
HTML.html, .htm
Markdown.md
Plain text.txt
CSV.csv
EPUB.epub
JPEG.jpg, .jpeg
PNG.png
BMP.bmp
GIF.gif
TIFF.tif, .tiff

Extract text from images (OCR)

Terminal · cURL · Image OCR
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"
Python · DocuAPI SDK · Image OCR
import os
import docuapi

docuapi.api_credentials = os.environ["DOCUAPI_API_KEY"]

result = docuapi.convert(
    {"File": "./scan.png", "EnableOcr": "true"},
    output_format="json",
)

print(result["content"])

Output formats

M↓

Markdown

Readable text with headings and tables where the converter can preserve them.

output_format: markdown
{ }

Document JSON

A normalized schema for content blocks, page references, and document metadata.

output_format: json
▤

Chunks

Paragraph-based chunks with source and section metadata, ready to send to your embedding pipeline and inject into any vector database.

output_format: chunks

Check usage

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.

Terminal · cURL
curl "https://docuapi.dev/usage" \\
  --header "Authorization: Bearer $DOCUAPI_API_KEY"
JSON · Usage response
{
  "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
}
NEXT

Explore the API reference

Review endpoint behavior and response details.

API reference