Developers

One contract, three transports.

The same request and response shape everywhere: a local REST daemon on your machine (default, private), a hosted convenience API, and MCP tools for AI agents. The default execution target is your hardware — the hosted tier is the fallback, not the product.

Local REST — traxlate serve

One binary, loopback only. Everything runs on your machine; nothing leaves it. Optional bearer token via TRAXLATE_SERVE_TOKEN.

traxlate serve 8017
# traxlate serving on http://127.0.0.1:8017 (on-device)

POST /translate

curl -s http://127.0.0.1:8017/translate \
  -H 'content-type: application/json' \
  -d '{"text":"Ship it before Friday.","target":"fa"}'
{
  "translation": "…",
  "source": "eng_Latn",
  "target": "fas_Arab",
  "provenance": "on-device",
  "seconds": 0.84,
  "warnings": []
}

Request fields: text (or texts: string[] for a batch, 64 max — returns {"results": [...]}), target (required), source (optional; auto-detected, default eng_Latn when uncertain), tier ("fast" = primary engine + guards, "best" = highest quality, the default). Body limit 2 MB.

GET /health · GET /languages

curl -s http://127.0.0.1:8017/health      # {"ok":true,"engine":{...}}
curl -s http://127.0.0.1:8017/languages   # [{"flores":"eng_Latn","bcp47":"en","name":"English","rtl":false}, ...]

Errors are JSON with an error string: 400 missing target / missing text or texts / batch too large (64 max) / unknown language code "xx"; 401 unauthorized when a token is set and missing.

Hosted API — POST /api/v2/translate

Identical contract to the local daemon, with one honest difference: provenance is "server" — this tier runs on our hardware, and says so. Auth is a bearer API key (create one under Account → API keys).

curl -s https://traxlate.com/api/v2/translate \
  -H 'authorization: Bearer YOUR_API_KEY' \
  -H 'content-type: application/json' \
  -d '{"texts":["Hello","Goodbye"],"target":"de","source":"en"}'
{
  "results": [
    { "translation": "…", "source": "eng_Latn", "target": "deu_Latn",
      "provenance": "server", "seconds": 0.61, "warnings": [] },
    { "translation": "…", "source": "eng_Latn", "target": "deu_Latn",
      "provenance": "server", "seconds": 0.58, "warnings": [] }
  ]
}

Quota: a durable per-key daily character budget (default 200,000 chars/day; per-key limits configurable). Exceeding it returns 429 {"error":"daily character quota exceeded","remaining":n,"limit":n}. Batches are capped at 64 texts (400). Upstream failures surface as 429/502/504 with an error body — never a silent empty string. GET /api/v2/languages is public (no key) and returns the same rows as the local /languages.

MCP — Traxlate inside your AI agent

traxlate-mcp is a stdio MCP server exposing the on-device pipeline to any agent. Everything runs locally; the structured result always includes provenance.

claude mcp add traxlate -- traxlate-mcp
  • translate{text, target, source?, tier?} {translation, source, target, provenance: "on-device", seconds, warnings}
  • detect_language{text} {flores, bcp47, name} (flores: null when uncertain)
  • list_languages — → [{flores, bcp47, name, rtl}]
  • engine_status — native engine install state: platform support, binary/model paths, daemon liveness

Language codes

Every surface accepts BCP-47 (fa, de, zh) or FLORES-200 (fas_Arab, deu_Latn, zho_Hans) and answers in canonical FLORES. Unknown codes are a typed 400 error, never a silent fallback — call /languages (or the list_languages MCP tool) for the live table.

Install the CLIAPI pricing