Quotas & Limits

This document contains current API restrictions and usage quotas on use of the Cloud Translation API. This page is updated when there are changes to these restrictions and usage quotas.

These quotas apply to each Cloud Translation API developer project and each user, and are shared across all applications and API versions used by a given developer project.

You can edit your quotas up to their maximum values by using the Google Cloud Console. To request an increase above the maximum for a quota, submit a request from the Google Cloud Console page.

Content quotas

Content is provided as text strings to the Cloud Translation API. Both pricing and usage are based on character count. All characters sent to the Cloud Translation API count toward these quotas, including whitespace characters.

The Cloud Translation API is optimized for translation of short requests. The recommended maximum length for each request is 2K code points. The Cloud Translation API rejects very large requests and gives a 400 INVALID_ARGUMENT error regardless of the available quota.

Character-based quota applies to the translateText and detectLanguage methods. The hard limit for requests is 30K Unicode characters (code points).

Previous

Content Quota Default Maximum Duration Applies to
General model characters per day 1 billion unlimited day project
General model characters per 100 seconds per project 1,000,000 characters 10,000,000 characters 100 seconds project
General model characters per 100 seconds per project per user 100,000 characters 10,000,000 characters 100 seconds project and user

New

Content Quota Default Duration Applies to
v2 and v3 general model characters (beta) per day unlimited day project
v2 and v3 general model characters (beta) per minute per project 6,000,000 characters 60 seconds project
v2 and v3 general model characters (beta) per minute per project per user 6,000,000 characters 60 seconds project and user

Per user quotas limit the number of requests an end user using client application can make in the time window (100 seconds in the previous system; 60 seconds in the new system). When you use a service account, the service account's identity is the "user" for quota purposes. For requests using an API key, the client IP address is used to enforce this limit.

If you exceed your quota, Cloud Translation API returns a 403 error. The error message says Daily Limit Exceeded if you exceeded the daily limit or User Rate Limit Exceeded if you exceeded either of the General model characters per 100 seconds or v2 and v3 general model characters (beta) per minute quotas.

Daily quotas reset at midnight Pacific Time, which means new limits may take up to 24 hours to become effective.

To view or change usage limits for your project, or to request an increase to your quota, do the following:

  1. If you don't already have a billing account for your project, then create one.
  2. Visit the Enabled APIs page of the API library in the Cloud Console, and select an API from the list.
  3. To view and change quota-related settings, select Quotas. To view usage statistics, select Usage.

Request quotas

In addition to the content quotas shown above, Cloud Translation enforces quotas on the usage of the API.

Discover supported languages requests

For Cloud Translation Basic and Advanced, there is a limit on how often you can request the list of supported languages for translation.

This quota does not apply to text sent for translation. It applies only to requests for the list of supported languages.

Previous

Quota Default Maximum Duration Applies to
Requests for the list of supported languages 1000 requests 1000 requests 100 seconds project

New

Quota Default Duration Applies to
v2 and v3 requests for the list of supported languages (beta) 600 requests 60 seconds project

Advanced

For Cloud Translation, there is a limit to the number of requests you can make. This quota applies to all Cloud Translation method calls except translateText, detectLanguage, getSupportedLanguages.

  • translateText falls under General model characters for general models (see above), and AutoML model characters per minute for AutoML custom models.

  • detectLanguage is covered by the General model characters quotas (see above).

  • getSupportedLanguages is covered by the Requests for the list of supported languages quotas (see above).

batchTranslationText falls under Batch translation characters using general models per project for general models, and Batch translation characters using AutoML custom models per project for AutoML custom models (see below). These two quotas are set to unlimited by default and reset at midnight Pacific Time.

This quota does not apply to requests sent to Cloud Translation - Basic.

Activity Default quota Duration Applies to
v3 default requests per project 6000 60 seconds project
v3 default requests per project per user unlimited 60 seconds project and user
AutoML model characters per project 100,000 60 seconds projects
AutoML model characters per project per user unlimited 60 seconds project and user
Batch translation characters using general models per project unlimited 1 day project
Batch translation characters using AutoML custom models per project unlimited 1 day project

Models (Advanced only)

When a custom or general model is used, content quota is checked against the project ID associated with the model. The request quotas are checked against the project associated with the request.

For example consider this translate text request:

POST https://translation.googleapis.com/v3/projects/project-id-1/locations/us-central1:translateText
{
"Model":"projects/project-id-2/locations/us-central1/models/model-id",
    "sourceLanguageCode": "en",
    "targetLanguageCode": "ru",
    "contents": ["Dr. Watson, please discard your trash."]
}

The request quotas are checked against project-id-1 but content quota is checked against project-id-2.