New dub version

Another result from POST /v1/dub on an existing cut. Same required canvasId, canvasVersionId, and canvasVideoId. First run: Dub. Map of every service: New service versions.

Two kinds of version

  • Canvas version — a named cut. Separate guide: Create a canvas version.
  • Service version — another artifact on the same cut + pool video. This page.

What you need

  • A canvas, a cut, and a pool canvasVideoId from Dub.
  • Project key with service:dub and job:read.
  • An active transcript on that cut + video (ASR or import).
  • A completed translation in the same targetLanguage.
  • targetLanguage — Same ISO code for POST /v1/translate and POST /v1/dub.

1. Add another take

POST /v1/dub again. Omit overwrite to keep the current active result and add another. The response is a queued job.

POST /v1/dub
curl -X POST "{BASE_URL}/v1/dub" \
  -H "Authorization: Bearer {PROJECT_KEY}" \
  -H "Content-Type: application/json" \
-d '{
    "canvasId": "{CANVAS_ID}",
    "canvasVersionId": "{CANVAS_VERSION_ID}",
    "canvasVideoId": "{CANVAS_VIDEO_ID}",
    "targetLanguage": "{TARGET_LANGUAGE}"
  }'

2. Or replace the active result

Same ids. Set overwrite: true to replace the active dub result on that cut + video.

POST /v1/dub (overwrite)
curl -X POST "{BASE_URL}/v1/dub" \
  -H "Authorization: Bearer {PROJECT_KEY}" \
  -H "Content-Type: application/json" \
-d '{
    "canvasId": "{CANVAS_ID}",
    "canvasVersionId": "{CANVAS_VERSION_ID}",
    "canvasVideoId": "{CANVAS_VIDEO_ID}",
    "overwrite": true,
    "targetLanguage": "{TARGET_LANGUAGE}"
  }'

3. Poll the job

Same loop as the first run — How jobs work.

GET /v1/jobs/{jobId}
curl "{BASE_URL}/v1/jobs/{JOB_ID}" \
  -H "Authorization: Bearer {PROJECT_KEY}"

# Repeat until data.status is completed (or failed / cancelled).

4. Read the result

The dub lands on the canvas. Refresh GET /v1/canvases/{canvasId}, then GET /v1/dubbings/{dubbingId}. Skip translate and the Dubbing record reports translationStatus: missing.

GET /v1/canvases/{canvasId}
curl "{BASE_URL}/v1/canvases/{CANVAS_ID}" \
  -H "Authorization: Bearer {PROJECT_KEY}"
# versions[].artifacts holds every service take on each cut.

First run: Dub. Every service: New service versions. A new named cut: Create a canvas version.