traxlate

REST API

One API, every medium.

Translate, speak, dub, and subtitle through a single unified REST API. Send text, documents, images, audio, or video — every request becomes a job with the same shape, the same lifecycle, and the same way to retrieve results.

Quick start
  1. 1.Upgrade to a plan that includes API access, then open Dashboard → API Keys and create a key.
  2. 2.Send your first request with a Bearer token. Fast text translation returns the result inline.
  3. 3.For documents and media, upload once and reference the file by id — or pass a hosted URL.
  4. 4.Long-running jobs (dub, subtitle, large documents) return immediately as queued. Poll the job or receive a signed webhook when it completes.

Base URL — all endpoints are versioned under https://api.traxlate.com/v1

bash
curl https://api.traxlate.com/v1/translations \
  -H "Authorization: Bearer tr_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "target_lang": "es",
    "text": "The dashboard launches next week."
  }'
Available today

The resource-noun reference below is the full v1 design we're rolling out. The endpoints in this section are live right now under https://traxlate.com/api/v1 with the same Bearer tr_live_… auth. Copy-paste runnable.

POST/api/v1/translateBearer auth
POST/api/v1/translate_batchBearer auth
POST/api/v1/translate_htmlBearer auth
POST/api/v1/presenterBearer auth
GET/api/v1/presenter/{id}Bearer auth
POST/api/v1/dubBearer auth
GET/api/v1/dub/{id}Bearer auth
POST/api/v1/human/quoteBearer auth
POST/api/v1/human/ordersBearer auth
GET/api/v1/human/orders/{id}Bearer auth
GET/api/v1/jobs/{id}Bearer auth
POST/api/v1/quoteBearer auth
GET/api/v1/languagesNo auth required
GET/api/v1/usageBearer auth

Translate text

{ text, src, tgt } — short text returns inline; longer text returns a job id to poll.

bash
curl https://traxlate.com/api/v1/translate \
  -H "Authorization: Bearer tr_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "text": "The dashboard launches next week.", "src": "en", "tgt": "es" }'

Translate a batch of strings

{ texts: [], src, tgt } — for UI catalogs, CMS fields, and connectors. Returns { translations: [] } inline. Codes may be ISO (en) or FLORES (eng_Latn).

bash
curl https://traxlate.com/api/v1/translate_batch \
  -H "Authorization: Bearer tr_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "texts": ["Save", "Cancel", "Settings"], "src": "en", "tgt": "fr" }'

Translate a web page

{ url | html, src, tgt } — markup, links and shortcodes preserved; returns the translated HTML. Powers the WordPress plugin and the in-app website translator.

bash
curl https://traxlate.com/api/v1/translate_html \
  -H "Authorization: Bearer tr_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/page", "src": "en", "tgt": "de" }'

Generate a presenter video

{ presenter, text, source_lang?, target_langs[], voice_id? } — renders a photoreal talking-head video, lip-synced, one per target language (the script is translated for each). Renders asynchronously; poll /v1/presenter/{id} and download the MP4 from /v1/presenter/{id}/video once status is done. Get the cast from /api/avatar/presenters.

bash
# Create a talking-head video from text (one per target language)
curl https://traxlate.com/api/v1/presenter \
  -H "Authorization: Bearer tr_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "presenter": "ava", "text": "Welcome to our product.", "source_lang": "en", "target_langs": ["es","fr"] }'

# Poll a job, then download when status == "done"
curl https://traxlate.com/api/v1/presenter/{id}    -H "Authorization: Bearer tr_live_..."
curl https://traxlate.com/api/v1/presenter/{id}/video -H "Authorization: Bearer tr_live_..." -o presenter.mp4

Order a human translation

{ text | file, source_lang, target_lang, tier, urgency } — a real professional linguist translates it. Priced per source word by tier (economy / professional / expert) and urgency (standard / express / urgent). Quote first, then place the order; credits are charged up front. Poll /v1/human/orders/{id} or subscribe to the human.delivered webhook to collect the result.

bash
# Get an instant quote (priced per source word x tier x urgency)
curl https://traxlate.com/api/v1/human/quote \
  -H "Authorization: Bearer tr_live_..." \
  -H "Content-Type: application/json" \
  -d '{"text":"The full text to translate...","source_lang":"en","target_lang":"de","tier":"professional","urgency":"standard"}'
# -> { word_count, credits, usd_cents, promised_hours, ... }

# Place the order (charges credits up front; a professional linguist fulfils it)
curl https://traxlate.com/api/v1/human/orders \
  -H "Authorization: Bearer tr_live_..." \
  -H "Content-Type: application/json" \
  -d '{"text":"The full text...","source_lang":"en","target_lang":"de","tier":"professional","urgency":"express","instructions":"Formal tone; keep product names."}'
# Or upload a document (PDF/DOCX): multipart with a "file" field + the same params.

# Poll the order (or receive the human.delivered webhook)
curl https://traxlate.com/api/v1/human/orders/{id} -H "Authorization: Bearer tr_live_..."
# status: queued -> assigned -> in_progress -> delivered ; then delivered_text / delivered_file_ids

Automate it (n8n / Zapier / Make)

Every endpoint here is plain REST with a bearer token, and every order emits a signed webhook — so it drops straight into any workflow tool. A typical no-code flow: an HTTP Request node POSTs to /v1/human/orders (e.g. when a row is added to a sheet or a file lands in a folder), then a Webhook trigger listens for human.deliveredand writes the result back. Point your tool's webhook URL at the destination you register under Dashboard → API Keys → Webhooks; we sign every delivery with your key's secret.

Dub a video

Send the raw video as the request body; options ride in the query string: target_langs (plus optional source_lang, voice_mode, and lip_sync). Translates, clones the speaker's voice, and re-mixes — one job per target language. Set lip_sync=true to also re-animate the mouth to the new language (premium 2× tier). Renders asynchronously; poll /v1/dub/{id} and download the MP4 from /v1/dub/{id}/video once status is done.

bash
# Dub a video into one or more languages.
# Send the raw video as the request body; options go in the query string.
# lip_sync=true re-animates the mouth to the new language (2x credits).
curl "https://traxlate.com/api/v1/dub?target_langs=es,ja&voice_mode=voice_clone&lip_sync=true" \
  -H "Authorization: Bearer tr_live_..." \
  -H "Content-Type: video/mp4" \
  --data-binary @clip.mp4

# Poll a job, then download when status == "done"
curl https://traxlate.com/api/v1/dub/{id}        -H "Authorization: Bearer tr_live_..."
curl https://traxlate.com/api/v1/dub/{id}/video  -H "Authorization: Bearer tr_live_..." -o dubbed.mp4
Authentication

Every request is authenticated with a Bearer token in the Authorization header. Live keys begin with tr_live_ and test keys with tr_test_. Keys are shown once on creation — store them securely; we cannot recover them.

http
Authorization: Bearer tr_live_<prefix><secret>

Test keys exercise the full API and return realistic responses without charging credits or producing billable renders. Rate limits are returned on every response via X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. Exceeding the limit returns 429 with a Retry-After header.

The job model

There is one concept to learn. Translation, speech, dubbing, and subtitling all create a job — a resource with the same fields and the same lifecycle. Learn it once and every product works the same way.

A job moves through queued processing completed, or ends in failed / canceled. The id is prefixed by type (tr_, sp_, dub_, sub_), so you always know what you are holding.

json
{
  "id": "tr_3f9a21c8",
  "object": "translation",
  "status": "completed",
  "progress": 1.0,
  "created_at": "2026-05-19T10:00:00Z",
  "completed_at": "2026-05-19T10:00:02Z",
  "input": { "kind": "text", "detected_language": "en" },
  "output": {
    "target_lang": "es",
    "text": "El panel se lanza la próxima semana."
  },
  "error": null,
  "credits_charged": 5,
  "metadata": { "order_id": "1234" }
}

Fields

idstring

Unique, type-prefixed identifier.

objectstring

translation | speech | dub | subtitle | batch | file.

statusstring

queued | processing | completed | failed | canceled.

progressnumber

0.0–1.0 completion fraction.

inputobject

What the API detected about your input — kind, detected_language, and media facts like duration_seconds or pages.

outputobject | null

Result payload, shaped per product. null until completed.

errorobject | null

Populated only on failed.

credits_chargedinteger

Credits actually billed. Reserved credits are refunded if a job fails or is canceled.

metadataobject

Up to 16 key/value pairs you attach; echoed back on every read and webhook.

Synchronous vs. asynchronous

Fast work — short text translation and short speech — can return completed on the first response. Longer work — dubbing, subtitling, large documents — always returns 202 Accepted with a queued job and a Location header. You can force the async path on any request with "async": true.

http
HTTP/1.1 202 Accepted
Location: https://api.traxlate.com/v1/dubs/dub_a1b2c3

{
  "id": "dub_a1b2c3",
  "object": "dub",
  "status": "queued",
  "progress": 0,
  "created_at": "2026-05-19T10:00:00Z"
}

Retrieving, listing, and canceling

GET/v1/{resource}/{id}Bearer auth
GET/v1/{resource}Bearer auth
DELETE/v1/{resource}/{id}Bearer auth

{resource} is one of translations, speech, dubs, subtitles. Poll a job every few seconds until it reaches a terminal state, or skip polling entirely with webhooks. Listing is cursor-paginated with ?limit= and ?starting_after=. Canceling a queued or in-progress job refunds reserved credits.

Idempotency

Send an Idempotency-Key header on any POST to make retries safe. A repeated key returns the original job instead of creating — and charging for — a duplicate.

Files & inputs — PDF, image, audio, video

Every product accepts input three ways. Pick whichever fits your integration:

textInline string in the request body.Short text.
input_urlA publicly reachable URL we fetch for you.Files you already host.
file_idAn id returned by POST /v1/files.Large documents and media.

You never declare a "mode." Send a file and the API detects its type and does the right thing — text is extracted from documents, written words are read from images, spoken words are recognized from audio and video. The job's input object always tells you what was detected.

PDF, DOCX, TXTDocumentLayout-aware text extraction, then translation. Formatted exports available.
PNG, JPG, TIFFImageOn-image text recognition, then translation.
MP4, MOV, MP3, WAV, …MediaSpeech recognition that drives dubbing or subtitling.

Uploading a file

POST/v1/filesBearer auth

Upload once, reference anywhere. A single uploaded video can be both dubbed and subtitled without re-uploading. Large files upload in resumable parts. Files are retained for the job lifetime and then expire automatically.

bash
curl https://api.traxlate.com/v1/files \
  -H "Authorization: Bearer tr_live_..." \
  -F "file=@quarterly_report.pdf" \
  -F "purpose=translation"
json
{
  "id": "file_8d2e",
  "object": "file",
  "filename": "quarterly_report.pdf",
  "kind": "pdf",
  "bytes": 184320,
  "expires_at": "2026-05-20T10:00:00Z"
}
Translations
POST/v1/translationsBearer auth

Translate text, documents, or images into one or many languages. Pass an array of target languages to fan out — you get one batch with a child job per language, billed per target.

Body

target_langstring | string[]required

One language code, or an array to translate into many at once.

textstring

Inline source text. Provide one of text, input_url, or file_id.

file_idstring

An uploaded document or image to translate.

input_urlstring

A hosted file to fetch and translate.

source_lang"auto" | string

Source language, or auto (default) to detect.

glossarystring[]

Optional source = target term preferences.

metadataobject

Your own key/value pairs, echoed back.

Example — text, multiple targets

bash
curl https://api.traxlate.com/v1/translations \
  -H "Authorization: Bearer tr_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "source_lang": "auto",
    "target_lang": ["es", "fr", "ar"],
    "text": "The dashboard launches next week.",
    "glossary": ["dashboard = panel"]
  }'

Example — translate an uploaded document

bash
curl https://api.traxlate.com/v1/translations \
  -H "Authorization: Bearer tr_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "target_lang": "en",
    "file_id": "file_8d2e"
  }'

Document jobs add formatted exports to output (docx, pdf) alongside the translated text.

Multi-target response (batch)

json
{
  "id": "batch_77c0",
  "object": "batch",
  "status": "processing",
  "children": [
    { "id": "tr_a1", "target_lang": "es", "status": "completed" },
    { "id": "tr_a2", "target_lang": "fr", "status": "processing" },
    { "id": "tr_a3", "target_lang": "ar", "status": "queued" }
  ],
  "credits_charged": 15
}
Speech
POST/v1/speechBearer auth

Turn text into natural speech with a curated cast of named voices, optional voice cloning, emotion control, and a studio mode for the highest quality. Short renders return inline; longer scripts return a job to poll.

Body

voicestringrequired

A named voice. List them with GET /v1/voices.

target_langstringrequired

Language to speak in.

textstringrequired

The script to render.

mode"standard" | "studio"

Studio selects the best of several takes for extra polish. Defaults to standard.

speednumber

Delivery speed multiplier.

clone_idstring

Render in a voice you previously cloned.

emotionstring | object

A built-in delivery preset (e.g. warm, calm, urgent) or a fine-grained delivery profile.

streamboolean

Stream audio as it is produced for low-latency playback in conversational apps.

Example

bash
curl https://api.traxlate.com/v1/speech \
  -H "Authorization: Bearer tr_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "voice": "aria",
    "target_lang": "en",
    "text": "Hello, world.",
    "mode": "studio"
  }'

Response

json
{
  "id": "sp_5b1d",
  "object": "speech",
  "status": "completed",
  "output": {
    "audio_url": "https://cdn.traxlate.com/...",
    "format": "wav",
    "duration_seconds": 1.4
  },
  "credits_charged": 50
}

Voice cloning

POST/v1/voices/clonesBearer auth

Upload a short reference clip to create a reusable cloned voice, then pass its clone_id to /v1/speech. Storing a clone is free; you pay only when you render with it. Cloned voices can speak any supported language.

Dubs
POST/v1/dubsBearer auth

Replace the spoken audio of a video or audio file with a translated voice track, timed to the original and matched to each speaker. Pass multiple target languages to produce several dubs from one upload. Always asynchronous.

Body

file_idstringrequired

Uploaded video/audio. Or use input_url.

target_langstring | string[]required

One or many languages to dub into.

source_lang"auto" | string

Spoken language, or auto to detect.

voice_mode"cast" | "clone"

Use the branded voice cast, or clone each original speaker's voice.

pacing"natural" | "lip_sync"

How tightly the dub tracks the original timing.

lip_syncboolean

Re-animate the speaker's mouth to the new language (premium 2× tier). Best for a single, clearly-framed face.

metadataobject

Your own key/value pairs.

Example

bash
curl https://api.traxlate.com/v1/dubs \
  -H "Authorization: Bearer tr_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "file_id": "file_video01",
    "source_lang": "auto",
    "target_lang": ["es", "ja"],
    "voice_mode": "clone"
  }'

Completed output

json
{
  "id": "dub_a1b2c3",
  "object": "dub",
  "status": "completed",
  "input": { "kind": "video", "detected_language": "en", "duration_seconds": 612 },
  "output": {
    "target_lang": "es",
    "video_url": "https://cdn.traxlate.com/...mp4",
    "subtitles": {
      "srt": "https://cdn.traxlate.com/...srt",
      "vtt": "https://cdn.traxlate.com/...vtt"
    }
  },
  "credits_charged": 5100
}

Every completed dub also exposes matching subtitle files in output.subtitles at no extra cost — the dub already produced them.

Subtitles
POST/v1/subtitlesBearer auth

Generate broadcast-ready captions from video or audio. Omit target_lang for a source-language transcript (the cheapest tier), or include one or more targets to also receive translated subtitles. Output is files only — no re-encoding, no burn-in.

Body

file_idstringrequired

Uploaded video/audio. Or use input_url.

source_lang"auto" | string

Spoken language, or auto.

target_langstring | string[]

Optional. Omit for caption-only; include to translate.

formatsstring[]

Subset of srt, vtt, txt, bilingual_srt. Defaults to all.

Example — caption + translate into FR & DE

bash
curl https://api.traxlate.com/v1/subtitles \
  -H "Authorization: Bearer tr_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "file_id": "file_video01",
    "source_lang": "auto",
    "target_lang": ["fr", "de"]
  }'

Completed output

json
{
  "id": "sub_9e0a",
  "object": "subtitle",
  "status": "completed",
  "output": {
    "target_lang": "fr",
    "srt": "https://cdn.traxlate.com/...fr.srt",
    "vtt": "https://cdn.traxlate.com/...fr.vtt",
    "txt": "https://cdn.traxlate.com/...fr.txt",
    "bilingual_srt": "https://cdn.traxlate.com/...bi.srt"
  },
  "credits_charged": 5400
}
Price quotes
POST/v1/quotesBearer auth

Preview the exact credit cost of any job before you commit. No credits are charged. Send the same inputs you would send to the product endpoint, plus a product field.

bash
curl https://api.traxlate.com/v1/quotes \
  -H "Authorization: Bearer tr_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "product": "dub",
    "file_id": "file_video01",
    "target_lang": ["es", "ja"]
  }'
json
{
  "product": "dub",
  "currency": "credits",
  "total": 10200,
  "lines": [
    { "target_lang": "es", "credits": 5100 },
    { "target_lang": "ja", "credits": 5100 }
  ]
}
Discovery & account
GET/v1/languagesNo auth required
GET/v1/voicesNo auth required
GET/v1/meBearer auth

/v1/languages lists supported languages per product with native names and tiers. /v1/voices lists the voice cast and the languages each can speak. /v1/me returns your account, current credit balance, and plan limits.

Webhooks

Skip polling. Register an endpoint in Dashboard → API Keys → Webhooks and we POST a signed event when a job changes state. Every event wraps the same job object you would get from a GET.

Payload

http
POST https://your-server.com/hooks/traxlate HTTP/1.1
Traxlate-Signature: t=1716112800,v1=<hmac-hex>
Content-Type: application/json

{
  "id": "evt_2a9c",
  "type": "job.completed",
  "created_at": "2026-05-19T10:00:09Z",
  "data": {
    "id": "dub_a1b2c3",
    "object": "dub",
    "status": "completed",
    "output": { "...": "..." },
    "credits_charged": 5100
  }
}

Events

job.completedevent

Any job (translation, speech, dub, subtitle) finished. data is the full job object including output.

job.failedevent

A job failed. data.error explains why; reserved credits are refunded.

batch.completedevent

All children of a multi-target batch reached a terminal state. data includes per-child summaries and totals.

file.processedevent

An uploaded file finished ingestion and is ready to reference.

human.receivedevent

A human translation order was placed and paid. data.order is the order object.

human.updatedevent

A linguist was assigned or the delivery ETA / status changed.

human.deliveredevent

A human translation was delivered. Fetch delivered_text / delivered_file_ids from the order.

human.refundedevent

A human order was canceled and the credits refunded.

Signature verification (Python)

python
import hmac, hashlib

def verify(payload: bytes, header: str, secret: str) -> bool:
    parts = dict(p.split("=", 1) for p in header.split(","))
    signed = f"{parts['t']}.".encode() + payload
    expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts["v1"])

Always verify the Traxlate-Signature before processing. Respond 200 within 10 seconds; we retry failed deliveries with exponential back-off and keep delivery logs in the dashboard.

Errors

Errors share one envelope with a stable, machine-readable type and a request_id to quote in support requests.

json
{
  "error": {
    "type": "insufficient_credits",
    "message": "Your balance is too low to start this job.",
    "param": null,
    "request_id": "req_7f2a"
  }
}
400invalid_requestMissing or malformed parameters.
401authentication_errorMissing or invalid API key.
402insufficient_creditsBalance too low. Top up in Billing.
403permission_deniedYour plan does not include this capability.
404not_foundResource does not exist or belongs to another key.
409invalid_stateAction not allowed in the job's current state.
413payload_too_largeInput exceeds the size limit — use POST /v1/files.
415unsupported_mediaFile type not accepted.
429rate_limitedToo many requests. Check Retry-After.
500server_errorUnexpected engine error. Retried automatically when safe.
Versioning & SDKs

The major version lives in the path (/v1). Additive changes — new fields, new event types — ship without a version bump, so write tolerant parsers. Breaking changes are introduced behind a dated Traxlate-Version header and announced in advance. Official Node and Python SDKs wrap this surface with typed helpers.

Ready to integrate?

Create a key and make your first call in minutes.