Skip to main content

Bring Your Own OCR

DocuDevs can extract text using your organization's own Azure Document Intelligence (Azure OCR) account instead of the DocuDevs platform account.

Who can manage OCR providers

Creating, editing, deleting, or key-binding OCR providers is not gated to organization admins today: any member of the organization holding an API key can perform these actions. This differs from embedding providers and model credentials, which require the ADMIN role for the same operations.

OCR providers do not support shared model credentials: each provider stores its own apiKey directly. This is different from LLM and embedding providers, which can reference a reusable model credential.

There is no dedicated verify/probe endpoint for OCR providers today, unlike POST /llm/providers/{id}/verify for LLM providers. Confirm a provider works by running a document-processing job against it.

Configure a provider​

  1. Open Settings → OCR Providers and select New.
  2. Enter a name, the Azure Document Intelligence endpoint, the API key, and the model ID (for example prebuilt-document).
  3. Optionally set provider-specific features.
  4. Save the provider.
  5. Bind the provider to one or more logical OCR keys.

Only explicitly bound keys use the provider. Unbound keys continue to use the DocuDevs platform OCR account.

Create a provider​

API_URL="https://api.docudevs.ai"
API_KEY="<your-api-key>"

curl -X POST "$API_URL/ocr/providers" \
-H "Authorization: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Our Doc Intelligence",
"endpoint": "https://myacct.cognitiveservices.azure.com",
"apiKey": "<azure-doc-intelligence-key>",
"modelId": "prebuilt-document"
}'

Update or delete a provider​

curl -X PATCH "$API_URL/ocr/providers/7" \
-H "Authorization: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"modelId": "prebuilt-invoice"}'

curl -X DELETE "$API_URL/ocr/providers/7" -H "Authorization: $API_KEY"

Key bindings​

Each logical OCR key is bound to a provider independently. Listing and binding keys use the correctly-mapped list_ocr_keys/update_ocr_key_binding convenience methods on DocuDevsClient.

curl "$API_URL/ocr/keys" -H "Authorization: $API_KEY"

curl -X PUT "$API_URL/ocr/keys/DEFAULT" \
-H "Authorization: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"providerId": 7}'

LLM providers​

Chat/extraction models are configured separately under Settings → LLM Providers — see Bring your own LLM. OCR and LLM bindings are independent of each other.