Overview of the Cloud Translation API
Cloud Translation API can translate text for more than 100 language pairs. Ifyou don't know the language of your source text, Cloud Translation API candetect it for you. For a list of all of the supported languages,seeSupported languages.
As an enterprise organization, you can include translated text in existinginternal workflows. For example, you might have a global support team thatreceives customer cases in many different languages. You can addCloud Translation API into your workflow to translate those customer cases intothe language spoken by your support team members. By using Cloud Translation API,you improve the overall efficiency of your support team because they don'tneed to manually translate text themselves orrely on others.
Cloud Translation API scales seamlessly and allows unlimited character translationsper day. However, there are restrictions on content size for each request andrequest rates. Additionally, you can use quota limits to manage your budget. Formore information, seeQuotas and limits.
The Cloud Translation API comes in two different editions, namely aBasic edition and anAdvanced edition. For a listof the different features supported by each, see theedition comparison.
Note: No customer data or translations are used to improve Cloud Translation APImodels. For more information about data usage, refer to theData usage FAQ.Cloud Translation - Basic API
The Basic edition is accessed throughv2 client libraries,and requires minimal configuration. It accepts API keys for authenticatationas well as service accounts, and uses the Google pre-trainedNeural Machine Translation (NMT) model with no modification.It's a good fit for applications that need to translate casual user-generatedcontent such as chat, social media, or comments.
By default, Cloud Translation API uses the Basic edition, which Googleupdates on a semi-regular cadence as more training data and better techniquesbecome available.
If you're planning a new project, however, you may want to choose theAdvanced edition instead, to take advantage of better security, morefeatures, and the new service improvements that the Advanced edition willcontinue to make going forward.
Cloud Translation - Advanced API
The Advanced edition is accessed throughv3 client librariesand requires service account authentication that's integrated withIAM roles. It offers a choice of models, including theTranslation LLM model, the NMT model, and NMT customizations. It also providesfeatures such as glossaries, batch translation, document translation, and more.
The key features of Cloud Translation - Advanced API are:
Access to more models -Pick the right model for you from among state-of-the-art translation modelslike the Translation LLM, Google's Neural Machine Translation(NMT) model, Adaptive Translation models, orcustom NMT models that you or someone else created.
Glossaries - Create a custom dictionary to correctly andconsistently translate domain-specific terms.
Batch requests - Make asynchronous requests to translate largeamounts of text.
Document Translation - Translate documents, such asPDF files, to preserve the original format and layout.
IAM roles - Secure your translation requests byusing Identity and Access Management. Create service accounts and grant them permissions byadding IAM roles. Cloud Translation - Advanced APIdoes not supportAPI keys.
Labels - Add user-defined labels (key-value pairs) to yourtranslation requests to better track usage and get granular billing reports.
Regional endpoint - Exercise control over where the resourcesfor your project are stored and processed.
Glossaries
A glossary is a custom dictionary that Cloud Translation - Advanced API uses tocorrectly and consistently translate domain-specific terms, named entities,and other kinds of terms that are specific to you. For example, you can usea glossary to specify a specific translation for terms such as "Google Summerof Code," "Gmail confidential mode," or "placement performance report."
You can also use glossaries to prevent certain words, such as borrowed wordsor product names, from being translated. For information about how to useglossaries, refer toCreating and using glossaries.
Batch requests
Batch translation requests are asynchronous requests that translate input fromCloud Storage buckets. Cloud Translation - Advanced API performs the batchtranslation as a long-running operation and writes the output to aCloud Storage bucket that you specify. Inline requests for batch translationare not supported.
For information on making batch requests, refer toBatch requests (Advanced).
Document Translation
Document Translation lets you directly translate existing documents,such as PDF and DOCX files, to a target language. Document Translationpreserves the original format so that translated documents have the same layoutand format as the original documents. For example, Document Translationkeeps paragraph breaks and headings so that your translated content is dividedlike in the original document.
Cloud Translation - Advanced API features, such as glossaries andcustomized NMT models also work withDocument Translation.For example, if you already have a customized NMT modelthat you use for text translations, you can use that same model forDocument Translation. Formore information about supported file types and how to translate documents,refer toTranslate documents.
Model selection and custom NMT models
Cloud Translation - Advanced API model selection lets you dynamically select theright model for your application from among the Translation LLM(which you can also further customize for adaptive translations), Google'sNMT model or your own customized NMTmodels, depending on the context and the content that you're translating.
Create a custom model by using a customized NMT modelto get more accurate translations for domain-specific terminology. You canthen use the resulting model in Cloud Translation - Advanced API to translate text.
For information on using custom models to translate text, refer toTranslating text (Advanced).
IAM roles
Cloud Translation - Advanced API integrates with IAM to provideadditional security for your translation requests, enable fine-grained accesscontrol, and support integration with custom NMT models.
You mustadd users and service accountsto one of the followingroles to grant those accounts access to Cloud Translation - Advanced API. Forinformation about creating service accounts, refer toCreating and managing service accountsin the IAM documentation.
| Role | Role ID | Description |
|---|---|---|
| Cloud Translation API Viewer | roles/cloudtranslate.viewer | Can access get and list operations. |
| Cloud Translation API User | roles/cloudtranslate.user | Includes the permissions of |
| Cloud Translation API Editor | roles/cloudtranslate.editor | Includes the permissions of |
| Cloud Translation API Admin | roles/cloudtranslate.admin | Includes the permissions of |
To see a list of permissions that are contained in each role, refer toUnderstanding roles.
These pre-configured roles address many typical use cases. However, you mightneed a role that includes a custom set of permissions. For example, you mightwant to create a role that allows a user to create a glossary in a project,without letting them delete or update existing glossaries in the project.In those cases, you can create anIAM custom rolethat meets your needs.
For information on managing IAM roles, refer toGranting, changing, and revoking access to resourcesandGranting roles to service accounts.
Labels
Cloud Translation - Advanced API supports adding user-defined labels (key-value pairs)toTranslateText,BatchTranslateText andDetectLanguage requests.Information about a request's usage is forwarded to the billing system whereyou can break down your billing charges by filtering on your labels.
For more information about user-defined labels, refer toReporting usage with labels (Advanced).
Regional endpoint
By default, Cloud Translation - Advanced API stores and processes resources in aglobal location, which means there is no guarantee that resources remain withina particular location. Instead of using the default global endpoint, you canuse a regional endpoint to keep resources within a particular location, such asthe European Union. For more information, refer toSpecify a regional endpoint.
Edition comparison
The following table shows which features are available in each edition.
| Feature | Basic | Advanced |
|---|---|---|
| Translate with the NMT model | ||
| Translate with the Translation LLM | ||
| Translate with Adaptive Translation models | ||
| Translate with custom models | ||
| Translate multiple strings in a single request | ||
| Batch translations with Cloud Storage | ||
| Translate documents | ||
| Glossary support (control terminology) | ||
| Train custom models | ||
| Language Detection | ||
| Integrated REST API | ||
| Integrated gRPC API | ||
| Service Account | ||
| API Key | ||
| Audit logging | ||
| Supports HTML | ||
| Supports 100+ Languages | ||
| Romanization support | ||
| Transliteration support | ||
| Adaptive Translation | ||
| Multi-regional endpoint support | ||
| VPC Service Controls support |
Refer toCloud Translation - Advanced API features for more details onCloud Translation - Advanced API.
Pricing
Cloud Translation API charges you on a monthly basis based on the number ofcharacters that you send. For more information, seePricing.
Resources and further reading
- To start using the API, getset up and then trythequickstart guide.
- Compare supported models
- Customize the NMT model
- Customize the Translation LLM
- Supported languages
- Supported formats
- Perform adaptive translation
- Migrate to Translation Advanced
- For answers to general questions about Cloud Translation API, refer to theGeneral FAQs page.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.