Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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.
To get started, you need an active Azure account. If you don't have one, you can create a free 12-month subscription.
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.
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 preexisting resource group that shares the same lifecycle, permissions, and policies.
Resource Region. Choose Global unless your business or application requires a specific region. If you're planning on using the Document Translation feature with managed identity authorization, choose a geographic region such as East US.
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 needs a custom domain endpoint, such as Document Translation, the input in the name
field it the custom domain name parameter for the endpoint.
Make sure to enter the correct value in the
name
field to ensure proper functionality.
Pricing tier. Select a pricing tier that meets your needs:
If you created a multi-service resource, the links at the bottom of the Basics tab provides 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 successfully deploys, select Go to resource.
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 Global endpoint in your API request unless you need a specific Azure region or custom endpoint. For more information, see Base URLs. The Global endpoint URL is api.cognitive.microsofttranslator.com
.
To authenticate your connection to your Translator resource, you need the key and endpoint for your resource.
Text Translation supports both global and 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 global 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>');
Warning
Deleting a resource group also deletes all resources contained in the group.
To delete the resource:
To delete the resource group:
In our quickstart, you learn how to use the Translator service with REST APIs.
Learn more about Azure AI Translator features:
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today