API reference
Dub from your own app
Send a link or a file, pick languages, and get the dubbed video, audio and subtitles back. Same minutes and prices as the dashboard. Base URL: https://api.onlinevideotranslator.com/v1
Authentication
Create a key under API keys in your dashboard and send it as a bearer token. Keys start with ovt_live_. Keep them on your server; anyone with a key can spend your minutes.
curl https://api.onlinevideotranslator.com/v1/languages -H "Authorization: Bearer ovt_live_..."Create a dub
POST /v1/dubs starts a full dub and answers 202 with the dub object. The minutes are held when the dub starts and settled when it's done; a dub that fails costs nothing. Dubs past your plan's limit for dubs at once wait in line.
curl https://api.onlinevideotranslator.com/v1/dubs \
-H "Authorization: Bearer ovt_live_..." \
-H "Content-Type: application/json" \
-d '{
"source_url": "https://www.youtube.com/watch?v=...",
"languages": ["es", "de"],
"lipsync": "standard",
"burn_subtitles": true,
"glossary": [{ "term": "Acme Cloud" }, { "term": "dashboard", "translation": "panel" }],
"webhook_url": "https://example.com/hooks/dubs"
}'source_urlstring | A link to the video: YouTube, TikTok, Instagram, X, Facebook, Vimeo, Loom, Google Drive, Dropbox or a direct file URL. |
|---|---|
upload_idstring | Instead of source_url: a finished upload. |
languagesstring[] | Codes from GET /v1/languages. Each language is billed on its own. |
lipsyncstring | "standard", or "hd" for sharper lips and teeth in close-ups and ads. A lip-synced minute counts as 4 minutes, HD as 9. Leave it out for no lip-sync; true means "standard". |
burn_subtitlesboolean | Also render an MP4 with the subtitles on screen. |
glossaryobject[] | Up to 100 terms to keep as they are, or translate your way: { term, translation? }. |
voicesobject | Speaker labels mapped to saved voice ids, like { "Speaker 1": "voice_..." }. |
webhook_urlstring | Where we send dub.ready and dub.failed. |
The dub object
status moves from queued to running to ready, or ends in failed or canceled. While it runs, stage names the step (downloading, separating, transcribing, translating, cloning, voicing, mixing, lipsyncing, finishing) and eta_s estimates the seconds left.
A queued dub also has wait: { reason, position, eta_seconds }, where reason is capacity when all your dubs at once are busy, or budget when we're at capacity for the day. It starts by itself; poll or wait for the webhook.
When we can't see a video's length up front (most links outside YouTube, and uploads), the dub starts on the minimum: 1 minute per language, 4 with lip-sync, 9 with HD. If your minutes can't cover the full length once we know it, the dub fails with MINUTES_SHORT and details has needed and available. Nothing is charged.
When it's ready, outputs has every file per language. Links are signed for 24 hours; fetch the dub again for fresh ones. Files are kept for 30 days.
{
"id": "dub_...",
"kind": "full",
"status": "running",
"stage": "voicing",
"progress": 0.64,
"eta_s": 210,
"source": { "kind": "link", "url": "https://...", "site": "youtube", "filename": null },
"title": "How we built it",
"duration_s": 620.4,
"source_language": "en",
"languages": ["es", "de"],
"minutes": 22,
"speakers": [{ "id": "S1", "label": "Speaker 1", "voice": "clone", "seconds": 312.5 }],
"outputs": {
"es": {
"video": "https://...", "audio_mp3": "https://...", "audio_wav": "https://...",
"voice_wav": "https://...", "srt": "https://...", "vtt": "https://...",
"title": "Cómo lo construimos", "description": "..."
}
},
"original": { "srt": "https://..." },
"error": null,
"created_at": "2026-11-29T10:00:00Z",
"finished_at": null,
"expires_at": "2026-12-29T10:00:00Z"
}Get, list, delete
GET /v1/dubs/{id} returns one dub, GET /v1/dubs lists yours, and DELETE /v1/dubs/{id} removes a dub and its files.
curl https://api.onlinevideotranslator.com/v1/dubs/dub_... -H "Authorization: Bearer ovt_live_..."
curl "https://api.onlinevideotranslator.com/v1/dubs?limit=20" -H "Authorization: Bearer ovt_live_..."
# { "dubs": [...], "next_cursor": "..." }, pass ?cursor= for the next page
curl -X DELETE https://api.onlinevideotranslator.com/v1/dubs/dub_... -H "Authorization: Bearer ovt_live_..."Uploads
Files up to 5 GB and 2 hours go up in parts, so a dropped connection only resends one part.
# 1. Start: tells you the part size and how many parts to send
curl https://api.onlinevideotranslator.com/v1/uploads \
-H "Authorization: Bearer ovt_live_..." \
-H "Content-Type: application/json" \
-d '{ "filename": "talk.mp4", "bytes": 734003200, "content_type": "video/mp4" }'
# { "upload_id": "up_...", "part_size": 104857600, "parts": 7 }
# 2. Send each part, numbered from 1
curl -X PUT https://api.onlinevideotranslator.com/v1/uploads/up_.../parts/1 \
-H "Authorization: Bearer ovt_live_..." --data-binary @part1
# 3. Finish, then dub it with "upload_id" instead of "source_url"
curl -X POST https://api.onlinevideotranslator.com/v1/uploads/up_.../complete -H "Authorization: Bearer ovt_live_..."Languages and voices
GET /v1/languages lists every language you can dub into, with its code (like es or pt-BR), English name and native name. GET /v1/voices lists the voices you saved from your own dubs, for the voices field.
Webhooks
Set webhook_url and we POST dub.ready or dub.failed with the dub object. Signatures follow Standard Webhooks, so its libraries verify them as they are.
webhook-id: the event id, the same on every retry. Use it to skip duplicates.webhook-timestamp: seconds since 1970. Reject anything older than 5 minutes.webhook-signature:v1,plus the base64 HMAC-SHA256 ofid.timestamp.body, keyed with yourwhsec_secret from the dashboard.
Answer with any 2xx. Anything else is retried after 10 seconds, 1 minute, 5 minutes and 30 minutes.
import crypto from "node:crypto";
// Standard Webhooks: sign "id.timestamp.body" with the secret after whsec_
export function verifyWebhook(secret, headers, rawBody) {
const id = headers["webhook-id"];
const timestamp = headers["webhook-timestamp"];
const signatures = headers["webhook-signature"] ?? "";
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
const key = Buffer.from(secret.slice("whsec_".length), "base64");
const expected = crypto.createHmac("sha256", key).update(`${id}.${timestamp}.${rawBody}`).digest("base64");
return signatures.split(" ").some((entry) => {
const [version, signature = ""] = entry.split(",");
return version === "v1" && signature.length === expected.length && crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
});
}Errors
Errors share one shape. The code is stable; the message is for people.
{
"error": {
"code": "INSUFFICIENT_MINUTES",
"message": "This dub needs 22 minutes and you have 8.",
"details": { "needed": 22, "available": 8 }
}
}| Status | Code | What to do |
|---|---|---|
| 400 | INVALID_REQUEST | A field is missing or has the wrong type. The message names it. |
| 401 | UNAUTHORIZED | No API key, or the key was deleted. |
| 402 | INSUFFICIENT_MINUTES | Not enough minutes. details has needed and available; buy minutes in the dashboard and retry. |
| 404 | NOT_FOUND | No dub or upload with that id on your account. |
| 413 | PAYLOAD_TOO_LARGE | The upload is over 5 GB. |
| 422 | SOURCE_UNSUPPORTED | We can't download from that link. Upload the file instead. |
| 422 | SOURCE_PRIVATE | The video is private or needs a login. Make it public or unlisted, or upload it. |
| 422 | SOURCE_TOO_LONG | The video is longer than 2 hours. |
| 422 | LANGUAGE_UNSUPPORTED | One of the language codes isn't in GET /v1/languages. |
| 429 | RATE_LIMITED | Too many requests. Wait for the Retry-After header, then retry. |
| 500 | INTERNAL | Our fault. Retry with backoff; nothing was charged. |
| 503 | UNAVAILABLE | A short outage. Retry with backoff. |