Skip to content
VibeQL

Migrate

Migrate from Google Translate

Move a Google Cloud Translation v2 integration to VibeQL by changing the base URL and the API key.

Markdown

VibeQL serves the Google Cloud Translation v2 (Basic) REST format. Change the base URL and the key, and keep your request code.

Google VibeQL
Base URL https://translation.googleapis.com/language/translate/v2 https://vibeql.com/language/translate/v2
Key ?key= Google API key ?key= VibeQL key

VibeQL also accepts the key in an Authorization: Bearer header. See Authentication.

Translate

GET or POST https://vibeql.com/language/translate/v2

Parameter Required Description
q Yes Text to translate. Repeat it for several strings, up to 50.
target Yes Target language, for example de or pt-BR.
source No Source language. Leave it out and the API detects it.
format No text or html. Other values return 400.
curl "https://vibeql.com/language/translate/v2?key=$VIBEQL_API_KEY" \
  -d "q=Where is the station?" \
  -d "q=How much is it?" \
  -d "target=de"
curl "https://vibeql.com/language/translate/v2?key=$VIBEQL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": ["Where is the station?", "How much is it?"], "target": "de"}'
{
  "data": {
    "translations": [
      { "translatedText": "Wo ist der Bahnhof?", "detectedSourceLanguage": "en" },
      { "translatedText": "Wie viel kostet das?", "detectedSourceLanguage": "en" }
    ]
  }
}

The response has the same shape as Google’s. detectedSourceLanguage is in each result, also when you send source.

Detect the language

POST https://vibeql.com/language/translate/v2/detect with one or more q values.

curl "https://vibeql.com/language/translate/v2/detect?key=$VIBEQL_API_KEY" \
  -d "q=Bonjour tout le monde"
{ "data": { "detections": [[{ "language": "fr", "isReliable": false, "confidence": 1 }]] } }

List languages

GET https://vibeql.com/language/translate/v2/languages. Add target=en to get the names too.

curl "https://vibeql.com/language/translate/v2/languages?key=$VIBEQL_API_KEY&target=en"
{ "data": { "languages": [{ "language": "ar", "name": "Arabic" }, { "language": "de", "name": "German" }] } }

Language codes

VibeQL supports 34 target languages, fewer than Google. A code that VibeQL does not support returns 400. See Languages.

  • zh-CN and zh-TW work as in Google.
  • no maps to Norwegian Bokmål.
  • en maps to American English. Send en-GB for British English.
  • Codes are not case-sensitive.

Errors

Errors use the Google format:

{ "error": { "code": 403, "message": "Authorization failure, check auth_key", "status": "PERMISSION_DENIED" } }

See Limits and errors for all status codes.

Documents

Google’s document translation API is not available. Use the DeepL or Azure document endpoints with the same key.