Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure Translator is a cloud-based REST API feature of the Translator service. It uses neural machine translation technology to enable quick and accurate source-to-target text translation in real time across all supported languages. In this overview, you learn how the Text translation REST APIs enable you to build intelligent solutions for your applications and workflows.
Text translation documentation contains the following article types:
- Quickstarts. Getting-started instructions to guide you through making requests to the service.
- How-to guides. Instructions for accessing and using the service in more specific or customized ways.
- Reference articles. REST API documentation and programming language-based content.
Text translation features
The latest GA release uses API version 3.0.
Languages. Returns a list of languages supported by Translate, Transliterate, and Dictionary Lookup operations. This request doesn't require authentication. Copy and paste the following
GETrequest into your preferred REST API tool or browser:https://api.translator.azure.cn/languages?api-version=3.0Translate. Renders single source-language text to multiple target-language texts with a single request.
Transliterate. Converts characters or letters of a source language to the corresponding characters or letters of a target language.
Detect. Returns the source code language code and a boolean variable denoting whether the detected language is supported for text translation and transliteration.
Note
You can Translate, Transliterate, and Detect text with a single REST API call.
Dictionary lookup. Returns equivalent words for the source term in the target language.
Dictionary example. Returns grammatical structure and context examples for the source term and target term pair.
Text translation development options
Add Text translation to your projects and applications using the following resources:
| Development option | Description |
|---|---|
| REST API | Integrate translation into your applications by using the REST API (GA) version. |
| Client libraries (SDKs) | Integrate translation capabilities into your applications by using the available client libraries (SDKs) in various programming languages. |
Authentication
Every text translation request requires authentication headers. The following methods are supported:
| Method | Description |
|---|---|
| Resource key | Pass the Ocp-Apim-Subscription-Key header with the key from your Translator resource. |
| Bearer token | Exchange your resource key for a time-limited token from the token service and pass it in the Authorization header. |
| Microsoft Entra ID | Use a managed identity or service principal to obtain an access token without managing keys. |
For details and examples, including required headers for regional, and custom endpoints, see Authentication and authorization.
Service limits and pricing
Text translation enforces service limits and quotas, such as per-request character limits.
- For request limits and quotas, see Service limits - Translator.
- For pricing, see Azure Translator pricing.
Troubleshooting
If requests fail, start with the HTTP status code and the service-specific error code.
| Symptom | Likely cause | Resolution |
|---|---|---|
401 Unauthorized |
Invalid or missing subscription key. | Verify the Ocp-Apim-Subscription-Key value matches your Translator resource key. |
403 Forbidden |
Key valid but the resource doesn't have access to the requested operation. | Confirm the pricing tier supports the feature and that the resource region matches the endpoint. |
429 Too Many Requests |
Request rate or character quota exceeded. | Reduce request frequency or review the quotas in Service limits - Translator. |
400 Bad Request |
Malformed request body or unsupported language code. | Validate the JSON payload and check supported languages. |
- For the full list of status codes and error messages, see Response codes and messages.
Get started with Text translation
Follow these steps to start using Text translation:
Create a Translator resource in the Azure portal.
Get your access keys and API endpoint. You need an endpoint URL and a read-only key for authentication.
Explore the Text translation quickstart for use cases and code samples in the following programming languages: