Stay organized with collections
Save and categorize content based on your preferences.
Global and multi-regional endpoints
Cloud Translation - Advanced offers a global endpoint as well as EU and US
multi-regional endpoints:
translate.googleapis.com (global)
translate-eu.googleapis.com
translate-us.googleapis.com
If you use a multi-regional endpoint, your data at-rest and machine learning
processing stays within the continental boundaries of the EU or US. These
multi-regional endpoints are important if your data's location must be
controlled to comply with local regulatory requirements.
If you don't specify an endpoint, Cloud Translation - Advanced uses the global
endpoint by default.
Global versus multi-regional endpoints
When using a multi-regional endpoint, there are some difference when compared to
using the global endpoint:
Text translations that use custom AutoML models are not supported.
You can use only the pre-trained NMT model.
Features that are not GA (still in Preview) are not supported.
Calls through the global endpoint cannot access resources that were created by
using a multi-regional endpoint. Similarly, calls through a multi-regional
endpoint cannot access resources that were created by using the global
endpoint.
Restricting resource locations
Organization policy administrators can restrict the regions available for
Cloud Translation - Advanced resources by creating a resource locations
constraint. If
set, Cloud Translation - Advanced users would be able to create resources only in a
particular location.
Restricting global API endpoint usage
To help enforce the use of regional endpoints, organization policy
administrators can use the constraints/gcp.restrictEndpointUsage organization
policy constraint to block requests to the global API endpoint. For more
information, see Restricting endpoint
usage.
Specify an endpoint
The following example shows a text translation that uses a multi-regional
endpoint. If you use the client libraries, set the API endpoint as part of the
client options. For some examples, see Setting the location using client
libraries
in the Cloud Natural Language API guide.
REST
Before using any of the request data,
make the following replacements:
PROJECT_NUMBER_OR_ID: the numeric or alphanumeric ID of your Google Cloud project
ENDPOINT: Regional endpoint, which determines where your data
resides. For example, translate-eu.googleapis.com.
LOCATION: Region where you want to run this operation. You must
pick a region inside the continental boundary of the regional endpoint. For
example, if you use the translate-eu.googleapis.com endpoint,
specify a region in Europe such as europe-west1.
HTTP method and URL:
POST https://ENDPOINT/v3/projects/PROJECT_NUMBER_OR_ID/locations/LOCATION:translateText
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Global and multi-regional endpoints\n===================================\n\nCloud Translation - Advanced offers a global endpoint as well as EU and US\nmulti-regional endpoints:\n\n- `translate.googleapis.com` (global)\n- `translate-eu.googleapis.com`\n- `translate-us.googleapis.com`\n\nIf you use a multi-regional endpoint, your data at-rest and machine learning\nprocessing stays within the continental boundaries of the EU or US. These\nmulti-regional endpoints are important if your data's location must be\ncontrolled to comply with local regulatory requirements.\n\nIf you don't specify an endpoint, Cloud Translation - Advanced uses the global\nendpoint by default.\n\nGlobal versus multi-regional endpoints\n--------------------------------------\n\nWhen using a multi-regional endpoint, there are some difference when compared to\nusing the global endpoint:\n\n- Text translations that use custom AutoML models are not supported. You can use only the pre-trained NMT model.\n- Features that are not GA (still in [Preview](/products#product-launch-stages)) are not supported.\n- Calls through the global endpoint cannot access resources that were created by using a multi-regional endpoint. Similarly, calls through a multi-regional endpoint cannot access resources that were created by using the global endpoint.\n\nRestricting resource locations\n------------------------------\n\nOrganization policy administrators can restrict the regions available for\nCloud Translation - Advanced resources by [creating a resource locations\nconstraint](/resource-manager/docs/organization-policy/defining-locations). If\nset, Cloud Translation - Advanced users would be able to create resources only in a\nparticular location.\n\nRestricting global API endpoint usage\n-------------------------------------\n\nTo help enforce the use of regional endpoints, organization policy\nadministrators can use the `constraints/gcp.restrictEndpointUsage` organization\npolicy constraint to block requests to the global API endpoint. For more\ninformation, see [Restricting endpoint\nusage](/assured-workloads/docs/restrict-endpoint-usage).\n\nSpecify an endpoint\n-------------------\n\nThe following example shows a text translation that uses a multi-regional\nendpoint. If you use the client libraries, set the API endpoint as part of the\nclient options. For some examples, see [Setting the location using client\nlibraries](/natural-language/docs/locations#setting_the_location_using_client_libraries)\nin the Cloud Natural Language API guide. \n\n### REST\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_NUMBER_OR_ID\u003c/var\u003e: the numeric or alphanumeric ID of your Google Cloud project\n- \u003cvar translate=\"no\"\u003eENDPOINT\u003c/var\u003e: Regional endpoint, which determines where your data resides. For example, `translate-eu.googleapis.com`.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: Region where you want to run this operation. You must pick a region inside the continental boundary of the regional endpoint. For example, if you use the `translate-eu.googleapis.com` endpoint, specify a region in Europe such as `europe-west1`.\n\n\nHTTP method and URL:\n\n```\nPOST https://ENDPOINT/v3/projects/PROJECT_NUMBER_OR_ID/locations/LOCATION:translateText\n```\n\n\nRequest JSON body:\n\n```\n{\n \"model\": \"projects/PROJECT_NUMBER_OR_ID/locations/LOCATION/models/general/base\",\n \"sourceLanguageCode\": \"en\",\n \"targetLanguageCode\": \"de\",\n \"contents\": [\"Come here!\"]\n}\n```\n\nTo send your request, choose one of these options: \n\n#### curl\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\ncurl -X POST \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"x-goog-user-project: PROJECT_NUMBER_OR_ID\" \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d @request.json \\\n \"https://ENDPOINT/v3/projects/PROJECT_NUMBER_OR_ID/locations/LOCATION:translateText\"\n```\n\n#### PowerShell\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\"; \"x-goog-user-project\" = \"PROJECT_NUMBER_OR_ID\" }\n\nInvoke-WebRequest `\n -Method POST `\n -Headers $headers `\n -ContentType: \"application/json; charset=utf-8\" `\n -InFile request.json `\n -Uri \"https://ENDPOINT/v3/projects/PROJECT_NUMBER_OR_ID/locations/LOCATION:translateText\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"translations\": [\n {\n \"translatedText\": \"Komm her!\",\n \"model\": \"projects/PROJECT_NUMBER_OR_ID/locations/LOCATION/models/general/base\"\n }\n ]\n}\n```\n\n\u003cbr /\u003e"]]