Translate API
13 languages
156 pairs
Self-hosted

Neural translation. No vendor hop.

Translate across 13 languages with a self-hosted M2M-100 model. Direct pairs, auto detection, and batch support for localization pipelines.

13 · languages50 · batch items5k · chars eachCache · repeats

Translate a sentence live.

This posts a short canned English sentence to the live Translate API. Pick Spanish, French, German, or Japanese, then click to run.

Request builder
Fixed sample sentence, selectable target language.
POST /translate
Sample text

The warehouse ships same-day orders to every region.

Output preview
Live response from the API, plus the exact request to reproduce it.

Run the request to see the translation.

Why Translate API

Private neural translation.

13 languages, 156 pairs

Direct any-to-any translation among the supported set. No English pivot required.

Auto source detection

Leave sourceLang as auto, or pin it for very short strings where detection is noisy.

Batch up to 50

Send texts[] for catalog and localization jobs. Items stay in input order.

Cached repeats

Identical source, target, and text hits a 24-hour in-memory cache.

Self-hosted privacy

Text never leaves Datpaq infrastructure and is never used for training.

Language catalog

GET /languages returns codes, names, and the 156-pair count for SDK pickers.

/api/v1/translate

Endpoints, at a glance.

One POST for single or batch translation, plus a GET catalog of supported languages and pair counts.
POST/api/v1/translate

Translate

Single text or texts[] batch. targetLang required. sourceLang optional (default auto).

PRIMARY
GET/api/v1/translate/languages

Languages

Supported language set, display names, and directed pair count.

ParameterTypeRequiredDescription
textstringone ofSingle text, 1 to 5,000 characters. Required when texts is absent.
textsstring[]one of1 to 50 items, 5,000 chars each, 30,000 per request.
targetLangstringyesTarget language ISO 639-1 from the supported set, e.g. es.
sourceLangstringnoSource language ISO 639-1, or auto (default).

Error reference

Failures you can plan for.

Character caps are enforced before any engine call. Engine saturation returns 503 with Retry-After.
400Validation Error

Missing or invalid text, texts, targetLang, or sourceLang, or detection failed.

401Authentication Error

Missing or invalid gateway API key. Send x-api-key or api_key with every request.

413Payload Too Large

Request exceeds 30,000 total characters.

429Rate Limit Error

More than 120 requests in a 15-minute window.

502Upstream Unavailable

Translation engine failed or could not be reached.

503Engine Saturated

Engine at capacity. Retry after the Retry-After interval.

504Upstream Timeout

Engine did not respond within 30 seconds.

Example error response

{
  "success": false,
  "error": { "code": "UPSTREAM_UNAVAILABLE", "message": "Translation engine unavailable" },
  "correlationId": "req_abc123"
}

FAQ

API questions developers ask first.

Which languages are supported?

English, Spanish, French, German, Portuguese, Italian, Dutch, Japanese, Korean, Chinese, Russian, Arabic, and Hindi. Every directed pair among those 13 is supported (156 pairs).

Does the model pivot through English?

No. Pairs such as Japanese to Korean or Spanish to French translate directly, which preserves quality versus an English pivot.

Can I translate more than one string at a time?

Yes. Send texts as an array of 1 to 50 items. Each item is capped at 5,000 characters, and the whole request is capped at 30,000 characters.

Is my text sent to a third-party vendor?

No. The neural engine is self-hosted. Payload text is never logged, stored, or used for training. Only counts, language pair, timing, and correlation IDs are recorded.

How do I authenticate requests?

Send your Datpaq API key as an x-api-key header or an api_key query parameter. Keys are created in the Datpaq dashboard and a free tier is included.

Ship private translation in one request.

13 languages, any-to-any pairs, auto detection, and a self-hosted model that never shares your text with a third party.