A LITTLE CODE. A LOT OF CONNECTION.

Meet your translation API.

A simple HTTP API for software, devices, and everything you’re building.

QUICKSTART

Your first request, in minutes.

Create an account, generate a key under API keys, then call your own domain. Keep keys on your server or trusted device.

Authentication

Send Authorization: Bearer YOUR_API_KEY or X-API-Key: YOUR_API_KEY. All API endpoints require an active key.

Base URL: https://langora.smazze.com. Use HTTPS for deployment.

POST /api/v1/translate

Say it in another language.

Send JSON with q (one text, up to 5,000 Unicode characters), target, and an optional source. Omit source or use auto for detection. Only format: "text" is supported.

curl -X POST 'https://langora.smazze.com/api/v1/translate' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"q":"Hello, world!","source":"en","target":"es"}'

Response shape

{
  "translatedText": "¡Hola, mundo!",
  "source": "en",
  "target": "es",
  "detectedSourceLanguage": "en",
  "characters": 13,
  "usage": { "used": 1, "limit": 1000 },
  "dialectNote": null
}

JavaScript (server-side)

const response = await fetch('https://langora.smazze.com/api/v1/translate', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.LANGORA_API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ q: 'Hello!', target: 'nl' })
});
const result = await response.json();
if (!response.ok) throw new Error(result.error.message);
console.log(result.translatedText);

Examples show the response format; actual wording depends on the installed models.

POST /language/translate/v2

An optional compatibility adapter.

This optional adapter accepts a subset of the Google Translate v2 request format, but runs entirely on your local neural engine. It does not call Google and does not require a Google account or Google key. Use your own domain and a Langora key.

curl -X POST 'https://langora.smazze.com/language/translate/v2' \
  -H 'X-Goog-Api-Key: YOUR_LANGORA_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"q":"Hello!","target":"fr","format":"text"}'

{
  "data": {
    "translations": [
      { "translatedText": "Bonjour !", "detectedSourceLanguage": "en" }
    ]
  }
}

JSON and form bodies are supported. The compatibility endpoint also accepts a key query parameter or body field; prefer headers to keep keys out of URL logs. Supported: one string per request, plain text, optional source detection, and the languages endpoint. Batch arrays, HTML, Google SDK endpoint discovery, Google Cloud billing, IAM, v3, and glossaries are not implemented. This is an independent service.

GET /api/v1/languages

Eight language options.

Also available at /language/translate/v2/languages with a Google-style data.languages envelope. Translation requests use these codes:

enEnglishesSpanishptPortuguesenlDutchdeGermanfrFrenchtrTurkishpt-BRPortuguese (Brazil)

Brazilian Portuguese (pt-BR) has its own dedicated neural models. All eight languages translate to and from English; other pairs automatically translate through English. All inference runs locally with outbound network connections disabled.

GET /api/v1/usage

Clear limits. Predictable errors.

Account usage is shared by API keys and the signed-in account playground. The public playground is free for everyone and does not use account allowances. Monthly limits count successful and reserved requests. Failed requests release the monthly reservation but count toward rate limits. Limits reset each calendar month in UTC. Administrators can assign packages and monthly or minute limits to accounts and individual keys, including Unlimited. Account limits remain the overall cap across all keys. A key without a package has no additional cap unless a custom key limit is set. Unlimited removes that specific cap; both account and key must allow it. In the usage response, limits contains account limits and key.limits contains extra key limits. A null monthly or rpm limit means unlimited. Repeated translations use a bounded in-memory cache on your own server; each successful API call still counts toward usage. Specify the source language to skip detection for new texts.

StatusMeaning
400Malformed JSON
401Missing, invalid, revoked, or disabled key
405Wrong HTTP method
413Body exceeds 64 KiB
422Invalid text, format, or language
429Monthly allowance or minute rate exceeded
503Engine unavailable, still loading, or unsupported translation pair
{ "error": { "code": 401, "message": "A valid API key is required." } }

A 429 response includes Retry-After: 60. A monthly quota requires a plan change, an admin override, or the next monthly reset.