Docsapiendpoints

Endpoints

Base URL

https://dublab.app/api/v2

All endpoints use the apikey header (or Authorization: Bearer) and snake_case fields. See Authentication for keys.

Endpoint Summary

MethodPathDescription
GET/api/v2/meProfile and credit balance
POST/api/v2/dubsCreate a dubfile upload or source_url
GET/api/v2/dubsList your dubs, paginated
GET/api/v2/dubs/A single dub with download links

Workflow

POST /dubs (file or source_url)  →  poll GET /dubs/{id}  →  read `outputs`
  1. Create: POST /api/v2/dubs with a file upload or a source_url.
  2. Poll: GET /api/v2/dubs/{id} until external_status_id = 5 (Completed).
  3. Download: read the outputs map on the dub — signed URLs are included directly on the List and Dub Details responses (no separate call).

Status Codes (external_status_id)

external_status_idMeaning
1Uploading
2In Queue
3Processing
4Failed
5Completed

The public status surface is 15 (the pipeline tracks a separate internal status not returned by the API).

Output types

outputs is a map of { <type>: { url, download_url } }. url is inline-viewable, download_url forces a file download. Both are presigned and expire ~1 hour after the response. The map is empty until the dub completes.

TypeMeaning
translated_mp4Dubbed video (MP4)
translatedDubbed video (pipeline format)
translated_mp3Dubbed audio (MP3)
translated_subtitleSubtitles in the target language
original / original_mp4Original uploaded video
original_mp3Original audio
original_subtitleSubtitles in the source language
posterThumbnail image

Error Handling

All errors return { "error": "message" } with an appropriate HTTP status code:

StatusMeaning
400Bad request — missing or invalid parameters
401Unauthorized — missing or invalid API key
402Payment required — insufficient credit balance
404Not found — dub or user doesn't exist
413Payload too large — file exceeds the 1 GB limit
502Bad gateway — processing backend unavailable
500Internal server error

Notes

  • Billing: credits are charged once on completion, against the server-measured output duration (measured_duration), not the duration you submit.
  • Multiple target languages = multiple POST /dubs calls (one per dest_lang).