Developers

API documentation

One endpoint, JSON in and out, authenticated with an API key from your account.

Authentication

Generate a key from Account → API Keys, then pass it as a bearer token on every request. Keys are shown once at creation — only a prefix and a SHA-256 hash are stored server-side.

header
Authorization: Bearer tk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Endpoint

POST https://traduck.com/api/v1/translate

request body (JSON)
{
  "text": "Hello, world!",
  "source_lang": "en",
  "target_lang": "fr"
}

Set source_lang to "auto" to auto-detect the input language.

response 200
{
  "translation": "Bonjour le monde !",
  "detected_language": null,
  "requests_remaining": 49999
}
error response
{ "error": { "code": "quota_exceeded", "message": "Monthly quota exceeded. Upgrade your plan to continue." } }

Status codes

CodeMeaning
200Translated successfully.
400Invalid request body, empty text, or text over the character limit.
401Missing, invalid, or revoked API key.
429Monthly quota exceeded — upgrade your plan.

Rate limits & quotas

PlanMonthly requests
Free200
Pro100,000
BusinessUnlimited

The API shares the same monthly quota as your logged-in website usage — see pricing.

Code examples

curl
curl -X POST https://traduck.com/api/v1/translate \
  -H "Authorization: Bearer tk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello, world!","source_lang":"en","target_lang":"fr"}'
python
import requests

resp = requests.post(
    "https://traduck.com/api/v1/translate",
    headers={"Authorization": "Bearer tk_live_your_key_here"},
    json={"text": "Hello, world!", "source_lang": "en", "target_lang": "fr"},
)
print(resp.json()["translation"])
javascript
const res = await fetch("https://traduck.com/api/v1/translate", {
  method: "POST",
  headers: { "Authorization": "Bearer tk_live_your_key_here", "Content-Type": "application/json" },
  body: JSON.stringify({ text: "Hello, world!", source_lang: "en", target_lang: "fr" }),
});
const data = await res.json();
console.log(data.translation);
php
$ch = curl_init("https://traduck.com/api/v1/translate");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer tk_live_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "text" => "Hello, world!",
    "source_lang" => "en",
    "target_lang" => "fr",
]));
$data = json_decode(curl_exec($ch), true);
echo $data["translation"];

Supported languages (36)

auto — Auto-detect en — English fr — French es — Spanish de — German it — Italian pt — Portuguese nl — Dutch ru — Russian zh — Chinese ja — Japanese ko — Korean ar — Arabic hi — Hindi tr — Turkish pl — Polish cs — Czech sv — Swedish da — Danish nb — Norwegian fi — Finnish he — Hebrew th — Thai vi — Vietnamese uk — Ukrainian bg — Bulgarian ro — Romanian hu — Hungarian el — Greek sk — Slovak sl — Slovenian hr — Croatian et — Estonian lv — Latvian lt — Lithuanian id — Indonesian

Ready to build?

Get your API key in under a minute.

Sign up free