In this article, you learn how to create a Translator resource in the Azure portal. Azure AI Translator is a cloud-based machine translation service that is part of the Azure AI services family. Azure resources are instances of services that you create. All API requests to Azure AI services require an endpoint URL and a read-only key for authenticating access.
Create a Translator resource
Prerequisites
To get started, you need an active Azure account.
Create your resource
With your Azure account, you can access the Translator service through two different resource types:
Single-service resource types enable access to a single service API key and endpoint.
Multi-service resource types enable access to multiple Azure AI services by using a single API key and endpoint.
Complete your project and instance details
After you decide which resource type you want use to access the Translator service, you can enter the details for your project and instance.
Subscription. Select one of your available Azure subscriptions.
Resource Group. You can create a new resource group or add your resource to a pre-existing resource group that shares the same lifecycle, permissions, and policies.
Resource Region. Choose a specific region. If you're planning on using the Document Translation feature with managed identity authorization, choose a geographic region such as China North.
Name. Enter a name for your resource. The name you choose must be unique within Azure.
Note
If you're using a Translator feature that requires a custom domain endpoint, such as Document Translation, the value that you enter in the Name field will be the custom domain name parameter for the endpoint.
Pricing tier. Select a pricing tier that meets your needs:
- Each subscription has a free tier.
- The free tier has the same features and functionality as the paid plans and doesn't expire.
- Only one free tier resource is available per subscription.
- Document Translation is supported in paid tier only. The Language Studio supports the S1 and D3 instance tiers. If you just want to try Document Translation, select the Standard S1 instance tier.
If you create a multi-service resource, the links at the bottom of the Basics tab provide technical documentation regarding the appropriate operation of the service.
Select Review + Create.
Review the service terms, and select Create to deploy your resource.
After your resource has successfully deployed, select Go to resource.
Authentication keys and endpoint URL
All Azure AI services API requests require an endpoint URL and a read-only key for authentication.
Authentication keys. Your key is a unique string that is passed on every request to the Translation service. You can pass your key through a query-string parameter or by specifying it in the HTTP request header.
Endpoint URL. Use the endpoint in your API request. For more information, see Base URLs.
Get your authentication keys and endpoint
To authenticate your connection to your Translator resource, you need to find its keys and endpoint.
After your new resource deploys, select Go to resource or go to your resource page.
In the left navigation pane, under Resource Management, select Keys and Endpoint.
Copy and paste your keys and endpoint URL in a convenient location, such as Notepad.
Create a Text Translation client
Text Translation supports regional endpoints. Once you have your authentication keys, you need to create an instance of the TextTranslationClient
, using an AzureKeyCredential
for authentication, to interact with the Text Translation service:
To create a
TextTranslationClient
using a regional resource endpoint, you need your resource API key:AzureKeyCredential credential = new('<apiKey>'); TextTranslationClient client = new(credential);
To create a
TextTranslationClient
using a regional resource endpoint, you need your resource API key and the name of the region where your resource is located:AzureKeyCredential credential = new('<apiKey>'); TextTranslationClient client = new(credential, '<region>');
Create a Document Translation client
Use the Document Translation API to asynchronously translate large volumes of text and multiple documents across languages. The batch translation process requires an Azure Blob storage account with storage containers for your source and translated documents.
Document Translation is currently supported in the Translator (single-service) resource using S1 Standard Service Plan (Pay-as-you-go) or in the D3 Volume Discount Plan.
"For more information on creating a Translator resource for Document Translation, see Prerequisites: Use Document Translation".
How to delete a resource or resource group
Warning
Deleting a resource group also deletes all resources contained in the group.
To delete the resource:
Search and select Resource groups in the Azure portal, and select your resource group.
Select the resources to be deleted by selecting the adjacent check box.
Select Delete from the top menu near the right edge.
Enter delete in the Delete Resources dialog box.
Select Delete.
To delete the resource group:
Go to your Resource Group in the Azure portal.
Select Delete resource group from the top menu bar.
Confirm the deletion request by entering the resource group name and selecting Delete.