Form Recognizer invoice model

The invoice model combines powerful Optical Character Recognition (OCR) capabilities with deep learning models to analyze and extract key fields and line items from sales invoices. Invoices can be of various formats and quality including phone-captured images, scanned documents, and digital PDFs. The API analyzes invoice text; extracts key information such as customer name, billing address, due date, and amount due; and returns a structured JSON data representation. The model currently supports both English and Spanish invoices.

Sample invoice processed with Form Recognizer Studio:

sample invoice

Development options

The following tools are supported by Form Recognizer v3.0:

Feature Resources Model ID
Invoice model prebuilt-invoice

The following tools are supported by Form Recognizer v2.1:

Feature Resources
Invoice model

Try Form Recognizer

See how data, including customer information, vendor details, and line items, is extracted from invoices using the Form Recognizer Studio. You'll need the following resources:

  • An Azure subscription—you can create one for free

  • A Form Recognizer instance in the Azure portal. You can use the free pricing tier (F0) to try the service. After your resource deploys, select Go to resource to get your key and endpoint.

Screenshot: keys and endpoint location in the Azure portal.

Form Recognizer Studio

  1. On the Form Recognizer Studio home page, select Invoices

  2. You can analyze the sample invoice or select the + Add button to upload your own sample.

  3. Select the Analyze button:

    Screenshot: analyze invoice menu.

Input requirements

  • For best results, provide one clear photo or high-quality scan per document.

  • Supported file formats:

    Model PDF Image:
    JPEG/JPG, PNG, BMP, and TIFF
    Microsoft Office:
    Word (DOCX), Excel (XLS), PowerPoint (PPT), and HTML
    Read REST API version
    2022/06/30-preview
    Layout
    General Document
    Prebuilt
    Custom

    ✱ Microsoft Office files are currently not supported for other models or versions.

  • For PDF and TIFF, up to 2000 pages can be processed (with a free tier subscription, only the first two pages are processed).

  • The file size for analyzing documents must be less than 500 MB for paid (S0) tier and 4 MB for free (F0) tier.

  • Image dimensions must be between 50 x 50 pixels and 10,000 px x 10,000 pixels.

  • PDF dimensions are up to 17 x 17 inches, corresponding to Legal or A3 paper size, or smaller.

  • If your PDFs are password-locked, you must remove the lock before submission.

  • The minimum height of the text to be extracted is 12 pixels for a 1024 x 768 pixel image. This dimension corresponds to about 8-point text at 150 dots per inch (DPI).

  • For custom model training, the maximum number of pages for training data is 500 for the custom template model and 50,000 for the custom neural model.

  • For custom model training, the total size of training data is 50 MB for template model and 1G-MB for the neural model.

Note

The Sample Labeling tool does not support the BMP file format. This is a limitation of the tool not the Form Recognizer Service.

Supported languages and locales

Model Language—Locale code Default
Invoice
  • English (United States)—en-US
English (United States)—en-US
Invoice
  • Spanish—es
Spanish (United States)—es
Invoice
  • German—de
German (Germany)-de
Invoice
  • French—fr
French (France)—fr
Invoice
  • Italian—it
Italian (Italy)—it
Invoice
  • Portuguese—pt
Portuguese (Portugal)—pt
Invoice
  • Dutch—nl
Dutch (Netherlands)—nl

Field extraction

Name Type Description Standardized output
CustomerName String Invoiced customer
CustomerId String Customer reference ID
PurchaseOrder String Purchase order reference number
InvoiceId String ID for this specific invoice (often "Invoice Number")
InvoiceDate Date Date the invoice was issued yyyy-mm-dd
DueDate Date Date payment for this invoice is due yyyy-mm-dd
VendorName String Vendor name
VendorTaxId String The taxpayer number associated with the vendor
VendorAddress String Vendor mailing address
VendorAddressRecipient String Name associated with the VendorAddress
CustomerAddress String Mailing address for the Customer
CustomerTaxId String The taxpayer number associated with the customer
CustomerAddressRecipient String Name associated with the CustomerAddress
BillingAddress String Explicit billing address for the customer
BillingAddressRecipient String Name associated with the BillingAddress
ShippingAddress String Explicit shipping address for the customer
ShippingAddressRecipient String Name associated with the ShippingAddress
PaymentTerm String The terms of payment for the invoice
SubTotal Number Subtotal field identified on this invoice Integer
TotalTax Number Total tax field identified on this invoice Integer
TotalVAT Number Total VAT field identified on this invoice Integer
InvoiceTotal Number (USD) Total new charges associated with this invoice Integer
AmountDue Number (USD) Total Amount Due to the vendor Integer
ServiceAddress String Explicit service address or property address for the customer
ServiceAddressRecipient String Name associated with the ServiceAddress
RemittanceAddress String Explicit remittance or payment address for the customer
RemittanceAddressRecipient String Name associated with the RemittanceAddress
ServiceStartDate Date First date for the service period (for example, a utility bill service period) yyyy-mm-dd
ServiceEndDate Date End date for the service period (for example, a utility bill service period) yyyy-mm-dd
PreviousUnpaidBalance Number Explicit previously unpaid balance Integer

Line items

Following are the line items extracted from an invoice in the JSON output response (the output below uses this sample invoice)

Name Type Description Text (line item #1) Value (standardized output)
Items String Full string text line of the line item 3/4/2021 A123 Consulting Services 2 hours $30.00 10% $60.00
Amount Number The amount of the line item $60.00 100
Description String The text description for the invoice line item Consulting service Consulting service
Quantity Number The quantity for this invoice line item 2 2
UnitPrice Number The net or gross price (depending on the gross invoice setting of the invoice) of one unit of this item $30.00 30
ProductCode String Product code, product number, or SKU associated with the specific line item A123
Unit String The unit of the line item, e.g, kg, lb etc. Hours
Date Date Date corresponding to each line item. Often it's a date the line item was shipped 3/4/2021 2021-03-04
Tax Number Tax associated with each line item. Possible values include tax amount, tax %, and tax Y/N 10%
VAT Number Stands for Value added tax. VAT is a flat tax levied on an item. Common in European countries €20.00

The invoice key-value pairs and line items extracted are in the documentResults section of the JSON output.

Key-value pairs

The prebuilt invoice 2022-06-30 and later releases support returns key-value pairs at no extra cost. Key-value pairs are specific spans within the invoice that identify a label or key and its associated response or value. In an invoice, these pairs could be the label and the value the user entered for that field or telephone number. The AI model is trained to extract identifiable keys and values based on a wide variety of document types, formats, and structures.

Keys can also exist in isolation when the model detects that a key exists, with no associated value or when processing optional fields. For example, a middle name field may be left blank on a form in some instances. key-value pairs are always spans of text contained in the document. If you have documents where the same value is described in different ways, for example, a customer or a user, the associated key will be either customer or user based on context.

Form Recognizer v3.0

The Form Recognizer v3.0 introduces several new features, capabilities, and AI quality improvements to underlying technologies.

Next steps