At a glance
- Availability: Experimental (how to enable).
- Auth: API key.
- Connection: The key from
AZURE_DOCUMENT_INTELLIGENCE_KEYis sent as theOcp-Apim-Subscription-Keyheader. - Docs: https://learn.microsoft.com/en-us/rest/api/aiservices/document-models/analyze-document
Credentials
Set these per environment. See Connect an integration.Setup
- Create a Document Intelligence resource: In the Azure portal, create an Azure AI Document Intelligence (formerly Form Recognizer) resource: https://portal.azure.com/#create/Microsoft.CognitiveServicesFormRecognizer. Choose the free F0 pricing tier to test at no cost (500 pages/month; F0 only processes the first 2 pages of each request).
- Copy the key and endpoint: Open the resource’s ‘Keys and Endpoint’ blade. Store KEY 1 as AZURE_DOCUMENT_INTELLIGENCE_KEY and the endpoint hostname (e.g. myresource.cognitiveservices.azure.com, without https://) as AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT.
- Run an analysis: Call Analyze Invoice with your resource hostname as resourceHost and a urlSource pointing at a sample invoice. The API replies 202 Accepted; copy the result ID (GUID) from the Operation-Location response header.
- Fetch the result: Call Get Analyze Result with the same modelId (prebuilt-invoice) and the result ID. Poll until status is ‘succeeded’, then read the extracted fields from analyzeResult.documents.
- Analysis is asynchronous: analyze calls return 202 with no body - the result ID must be read from the Operation-Location response header
- Analyze results are retained for 24 hours, after which the result ID expires
- All tools pin api-version 2024-11-30 (GA v4.0); region availability and model versions are listed in the Azure docs
- Either urlSource or base64Source must be set on analyze calls - never both
Tools
Example prompts
- Analyze this invoice with Azure Document Intelligence and summarize the vendor, invoice ID, due date, line items, and total.
- Analyze this receipt with Azure Document Intelligence and report the merchant, date, and total amount.
- Run layout analysis on this document with outputContentFormat=markdown and return the document content as Markdown.