Plan Azure AI Document Intelligence resources

To build an Azure AI Document Intelligence solution, you must create and configure the necessary resources in your Azure subscription.

In your polling company, you’re assessing Azure AI Document Intelligence to see if it can streamline your data entry workflow. You’ve decided to deploy an Azure AI Document Intelligence solution that will analyze data from your polling forms and you must plan the deployment to support your requirements. You want to know what resources to create in your Azure subscription.

In this unit, you’ll learn how to choose and create Azure AI Document Intelligence resources.

Azure AI Document Intelligence resources

Azure AI Document Intelligence is an Azure service and conforms to Azure’s resource management model. To create an Azure AI Document Intelligence solution, you start by adding a resource to your Azure subscription. When you create an Azure AI Document Intelligence resource, you can choose from Free (F0) or Standard (S0) tiers.

 Important

If you’re using the Standard tier, and find your requests are being throttled, you can submit an Azure Support Request to have the default limits increased. The Free tier is not available if you are using a multi-service resource.

Create an Azure AI Document Intelligence resource

To create an Azure AI Document Intelligence resource in Azure and obtain connection details, complete these steps:

  1. In the Azure portal, select Create a resource.
  2. In the Search services and marketplace box, type Document Intelligence and then press Enter.
  3. In the Document intelligence page, select Create.
  4. In the Create Document intelligence page, under Project Details, select your Subscription and either select an existing Resource group or create a new one.
  5. Under Instance details, select a Region near your users.
  6. In the Name textbox, type a unique name for the resource.
  7. Select a Pricing tier and then select Review + create.
  8. If the validation tests pass, select Create. Azure deploys the new Azure AI Document Intelligence resource.

Connect to Azure AI Document Intelligence

When you write an application that uses Azure AI Document Intelligence, you need two pieces of information to connect to the resource:

  • Endpoint. This is the URL where the resource can be contacted.
  • Access key. This is unique string that Azure uses to authenticate the call to Azure AI Document Intelligence.

To obtain these details:

  1. In the Azure portal, navigate to the Azure AI Document Intelligence resource.
  2. Under Resource Management, select Keys and Endpoint.
  3. Copy either KEY 1 or KEY 2 and the Endpoint values and store them for use in your application code.

The following code shows how to use these connection details to connect your application to Azure AI Document Intelligence. If running this code, you’ll need the libraries included in the top of the snippet.

In this example, a sample document at a specified URL is submitted for analysis to the general document model. Replace <endpoint> and <access-key> with the connection details you obtained from the Azure portal:

C#

using Azure;
using Azure.AI.DocumentIntelligence;

string endpoint = "<endpoint>";
string key = "<access-key>";
AzureKeyCredential cred = new AzureKeyCredential(key);
DocumentIntelligenceClient client = new DocumentIntelligenceClient (new Uri(endpoint), cred);

Uri fileUri = new Uri ("<url-of-document-to-analyze>");

var content = new AnalyzeDocumentContent()
{
    UrlSource = fileUri
};

Operation<AnalyzeResult> operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "prebuilt-layout", content);
AnalyzeResult result = operation.Value;

microsoft sql server certification training courses malaysia

Leave a Reply

Your email address will not be published. Required fields are marked *