Google Cloud Translation

API

Google Cloud API for machine translation of text and documents

Price
Free tier, then pay per use
Access
API key or Google Cloud credentials

About

Google Cloud service that translates text between about 190 languages with its NMT model or a Translation LLM, with glossaries, custom models and DOCX, PPTX and PDF translation. Basic (v2) accepts API keys; Advanced (v3) needs Google Cloud credentials.

What you can do with it

  • Translate app strings and user content between about 190 languages
  • Translate DOCX, PPTX and PDF files while keeping their layout
  • Keep product and brand terms consistent with glossaries

Get started

  1. Enable billing and the Cloud Translation API in a Google Cloud project
  2. Create an API key for Basic (v2), or use gcloud credentials for v3

Example

# Basic (v2) with an API key
curl -X POST "https://translation.googleapis.com/language/translate/v2?key=$GOOGLE_API_KEY" \
  -H "Content-Type: application/json; charset=utf-8" \
  -d '{"q": "Hello world", "source": "en", "target": "es", "format": "text"}'

# Advanced (v3) with gcloud credentials
curl -X POST "https://translation.googleapis.com/v3/projects/$PROJECT_ID:translateText" \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "x-goog-user-project: $PROJECT_ID" \
  -H "Content-Type: application/json; charset=utf-8" \
  -d '{"sourceLanguageCode": "en", "targetLanguageCode": "es", "contents": ["Hello world"]}'

Details

Hosting
Hosted service
Available in
Worldwide
Official SDKs
C#, Go, Java, JavaScript/TypeScript, PHP, Python, Ruby
MCP server
None
Works with
Google Cloud

Tasks

Alternatives

Other tools for the same tasks.

Last checked on .