dOCR
Guides

Auto-detection

Let dOCR identify the document type for you.

If you don't know a document's type in advance, omit the documentType parameter and dOCR will classify it against your auto-detect–enabled types.

curl https://app.docr.dev/api/v1/extract \
  -H "Authorization: Bearer $DOCR_API_KEY" \
  -F "file=@unknown.pdf"

The detected type is returned as detectedType, and extraction proceeds against that type's fields:

{
  "extraction": {
    "status": "completed",
    "detectedType": "Invoice",
    "outputJson": { "documentType": "Invoice", "fields": { } }
  }
}

Controlling candidates

Only document types with auto-detection enabled are considered. Toggle this per type in the dashboard (it's on by default for built-in types). Disable it for niche or overlapping types to keep detection accurate.

When you know the type, passing documentType explicitly is faster and more reliable than auto-detection.

On this page