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.
- 1.Upgrade to a plan that includes API access, then open Dashboard → API Keys and create a key.
- 2.Send your first request with a Bearer token. Fast text translation returns the result inline.
- 3.For documents and media, upload once and reference the file by id — or pass a hosted URL.
- 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
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."
}'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.
/api/v1/translateBearer auth/api/v1/translate_batchBearer auth/api/v1/translate_htmlBearer auth/api/v1/presenterBearer auth/api/v1/presenter/{id}Bearer auth/api/v1/dubBearer auth/api/v1/dub/{id}Bearer auth/api/v1/human/quoteBearer auth/api/v1/human/ordersBearer auth/api/v1/human/orders/{id}Bearer auth/api/v1/jobs/{id}Bearer auth/api/v1/quoteBearer auth/api/v1/languagesNo auth required/api/v1/usageBearer authTranslate text
{ text, src, tgt } — short text returns inline; longer text returns a job id to poll.
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).
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.
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.
# 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.mp4Order 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.
# 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_idsAutomate 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.
# 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.mp4Every 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.
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.
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.
{
"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
idstringUnique, type-prefixed identifier.
objectstringtranslation | speech | dub | subtitle | batch | file.
statusstringqueued | processing | completed | failed | canceled.
progressnumber0.0–1.0 completion fraction.
inputobjectWhat the API detected about your input — kind, detected_language, and media facts like duration_seconds or pages.
outputobject | nullResult payload, shaped per product. null until completed.
errorobject | nullPopulated only on failed.
credits_chargedintegerCredits actually billed. Reserved credits are refunded if a job fails or is canceled.
metadataobjectUp 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/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
/v1/{resource}/{id}Bearer auth/v1/{resource}Bearer auth/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.
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.
DocumentLayout-aware text extraction, then translation. Formatted exports available.ImageOn-image text recognition, then translation.MediaSpeech recognition that drives dubbing or subtitling.Uploading a file
/v1/filesBearer authUpload 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.
curl https://api.traxlate.com/v1/files \
-H "Authorization: Bearer tr_live_..." \
-F "file=@quarterly_report.pdf" \
-F "purpose=translation"{
"id": "file_8d2e",
"object": "file",
"filename": "quarterly_report.pdf",
"kind": "pdf",
"bytes": 184320,
"expires_at": "2026-05-20T10:00:00Z"
}/v1/translationsBearer authTranslate 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[]requiredOne language code, or an array to translate into many at once.
textstringInline source text. Provide one of text, input_url, or file_id.
file_idstringAn uploaded document or image to translate.
input_urlstringA hosted file to fetch and translate.
source_lang"auto" | stringSource language, or auto (default) to detect.
glossarystring[]Optional source = target term preferences.
metadataobjectYour own key/value pairs, echoed back.
Example — text, multiple targets
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
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)
{
"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
}/v1/speechBearer authTurn 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
voicestringrequiredA named voice. List them with GET /v1/voices.
target_langstringrequiredLanguage to speak in.
textstringrequiredThe script to render.
mode"standard" | "studio"Studio selects the best of several takes for extra polish. Defaults to standard.
speednumberDelivery speed multiplier.
clone_idstringRender in a voice you previously cloned.
emotionstring | objectA built-in delivery preset (e.g. warm, calm, urgent) or a fine-grained delivery profile.
streambooleanStream audio as it is produced for low-latency playback in conversational apps.
Example
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
{
"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
/v1/voices/clonesBearer authUpload 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.
/v1/dubsBearer authReplace 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_idstringrequiredUploaded video/audio. Or use input_url.
target_langstring | string[]requiredOne or many languages to dub into.
source_lang"auto" | stringSpoken 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_syncbooleanRe-animate the speaker's mouth to the new language (premium 2× tier). Best for a single, clearly-framed face.
metadataobjectYour own key/value pairs.
Example
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
{
"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.
/v1/subtitlesBearer authGenerate 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_idstringrequiredUploaded video/audio. Or use input_url.
source_lang"auto" | stringSpoken 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
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
{
"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
}/v1/quotesBearer authPreview 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.
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"]
}'{
"product": "dub",
"currency": "credits",
"total": 10200,
"lines": [
{ "target_lang": "es", "credits": 5100 },
{ "target_lang": "ja", "credits": 5100 }
]
}/v1/languagesNo auth required/v1/voicesNo auth required/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.
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
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.completedeventAny job (translation, speech, dub, subtitle) finished. data is the full job object including output.
job.failedeventA job failed. data.error explains why; reserved credits are refunded.
batch.completedeventAll children of a multi-target batch reached a terminal state. data includes per-child summaries and totals.
file.processedeventAn uploaded file finished ingestion and is ready to reference.
human.receivedeventA human translation order was placed and paid. data.order is the order object.
human.updatedeventA linguist was assigned or the delivery ETA / status changed.
human.deliveredeventA human translation was delivered. Fetch delivered_text / delivered_file_ids from the order.
human.refundedeventA human order was canceled and the credits refunded.
Signature verification (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 share one envelope with a stable, machine-readable type and a request_id to quote in support requests.
{
"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.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.
Create a key and make your first call in minutes.