Getting started

Getting a Google Translate API key

Seven steps in the Google Cloud console. This takes more set-up than the other four options but costs the least per character.

Before you start

Google Translate uses Google Cloud rather than a separate API sign-up page. Create a project, enable billing, enable the API, then create your key.

Google Translate costs the least per character of these five providers and covers the most languages. It translates existing text but cannot write new text. Use it alongside Claude, Gemini or OpenAI if you also need writing features.

The steps

  1. Go to https://console.cloud.google.com and create a project, or pick one you already have.
  2. Open Billing from the menu and link a billing account to the project.
  3. Go to https://console.cloud.google.com/apis/library/translate.googleapis.com and click Enable.
  4. Go to https://console.cloud.google.com/apis/credentials.
  5. Click Create credentials and choose API key. The key appears in a window.
  6. Click Edit API key, and under API restrictions choose Restrict key and tick Cloud Translation API. Click Save.
  7. Copy the key into WordPress under WPGlotty, Settings, Providers and keys. Set it to Translates and click Save settings.

Do not skip step 3. Requests fail with an API-not-enabled message until you enable the API for the project. Step 6 is also important: an unrestricted key can access every API in the project. If a key restricted to Cloud Translation API leaks, it can only be used for translation.

Why WPGlotty uses the v2 endpoint

WPGlotty uses the v2 endpoint because it accepts an API key. The newer v3 requires a service account and a JSON file on your server. Using v2 spares you both.