Create AI Dubbing

Create an AI dubbing job to translate and dub a video into another language. The request accepts an array of jobs, each defining the source video, source/target languages, dubbing options (voice cloning, lipsync, background sound handling) and quality tier.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

POST /aiworkflow

Create an AI dubbing (voiceover) for a video through the AI workflow endpoint. Dubbing is produced by the same /aiworkflow endpoint used for transcription and translation — the type field and a few flags decide what gets generated.

📘

Authorization

All requests require a valid Panda API token in the Authorization header (no Bearer prefix).

🚧

Dubbing depends on the video's subtitles

TRANSLATION and standalone DUBBING require a source subtitle in from_lang to already exist on the video. On a video that has no subtitle yet, both return 400 "You need to create a from_lang subtitle first".

To dub a video from scratch (audio only, no subtitle yet), use type: "TRANSCRIPTION" with generate_dubbing: true — it transcribes the audio first and then dubs, in a single request.

Choosing the workflow type

GoaltypeNeeds an existing subtitle?Key fields
Dub a video from scratch (recommended)TRANSCRIPTIONNo — it creates the subtitlefrom_lang, generate_dubbing: true, background_sound_mode, additional_langs
Translate an existing subtitle and dub itTRANSLATIONYes (from_lang subtitle)from_lang, to_lang, generate_dubbing: true, background_sound_mode
Dub an existing subtitle (no translation)DUBBINGYes (from_lang subtitle)from_lang, voice_id, background_sound_mode
⚠️

Important: in the TRANSCRIPTION flow the dubbing/translation targets come from additional_langs, not from to_lang. generate_dubbing: true is what turns a transcription/translation into a dubbing — without it you only get subtitles. Whenever generate_dubbing is true, background_sound_mode is required.

HTTP Method & Path

POST /aiworkflow

Base URL: https://api-v2.pandavideo.com.br

Authentication Requirements

  • Security Scheme: PandaAuth (apiKey)
  • Header: Authorization: <your_api_token> (no Bearer prefix)

Parameters

NameInTypeRequiredDescription
AuthorizationheaderstringYesPanda API token (without Bearer prefix)

Request Body

Content-Type: application/json

The body may be a single job object or an array of job objects (submit several jobs in one request). Unknown fields are rejected (additionalProperties: false).

Body Parameters (per item)

FieldTypeRequiredDescription
typestringYesWorkflow type: TRANSCRIPTION, TRANSLATION, DUBBING or ALL_TEXT_ITEMS.
video_idstring (uuid v4)YesID of the source video.
from_langstringConditionalSource language (e.g. pt-BR, en, es). Required for TRANSCRIPTION/TRANSLATION; may be "auto" to auto-detect. For DUBBING it identifies the existing subtitle to dub.
to_langstringConditionalTarget language. Required for TRANSLATION. Not used by DUBBING.
additional_langsarrayNoTargets for the TRANSCRIPTION flow. Array of objects { "lang": "en", "voice_id": "..." } (voice_id optional). Each item is translated and, when generate_dubbing is true, dubbed.
generate_dubbingbooleanNoWhen true, also generates a dubbing track. Requires background_sound_mode. Without it, the job only produces subtitles.
background_sound_modestringConditionalHow background sound is handled. Only value: "ai". Required when generate_dubbing is true.
voice_idstringNoVoice used for the dubbing (e.g. a cloned voice). Omit to let the backend choose.
clone_original_voicebooleanNoClone the original speaker's voice.
num_speakersintegerNoNumber of speakers, 010. 0 auto-detects.
is_lipsyncbooleanNoEnable lipsync. Not supported for videos longer than 60 minutes.
enable_dynamic_durationbooleanNoAllow dynamic duration adjustment.
enhance_voice_qualitybooleanNoApply voice quality enhancement.
remove_background_musicbooleanNoRemove background music from the original audio.
replace_existing_subtitlesbooleanNoReplace existing subtitles with the newly synced ones.
tierstringConditionalQuality tier: essential, pro or advanced. Required for TRANSCRIPTION/TRANSLATION unless generate_dubbing is true.
ctxstringNoOptional context passed to the model.

Example — dub from scratch (TRANSCRIPTION + dubbing)

Use this for a video that has no subtitle yet. It transcribes pt-BR and dubs into English and Spanish in one request.

[
  {
    "type": "TRANSCRIPTION",
    "video_id": "5a3b5516-b08f-4f94-8143-3e7e84fddd6b",
    "from_lang": "pt-BR",
    "generate_dubbing": true,
    "background_sound_mode": "ai",
    "tier": "essential",
    "num_speakers": 0,
    "clone_original_voice": true,
    "additional_langs": [
      { "lang": "en" },
      { "lang": "es" }
    ]
  }
]

Example — translate an existing subtitle and dub it (TRANSLATION)

Requires a from_lang subtitle already on the video.

[
  {
    "type": "TRANSLATION",
    "video_id": "5a3b5516-b08f-4f94-8143-3e7e84fddd6b",
    "from_lang": "pt-BR",
    "to_lang": "en",
    "generate_dubbing": true,
    "background_sound_mode": "ai",
    "tier": "essential",
    "clone_original_voice": true
  }
]

Example — dub an existing subtitle (DUBBING)

Requires a from_lang subtitle already on the video. No translation.

[
  {
    "type": "DUBBING",
    "video_id": "5a3b5516-b08f-4f94-8143-3e7e84fddd6b",
    "from_lang": "pt-BR",
    "background_sound_mode": "ai",
    "voice_id": "your_voice_id",
    "num_speakers": 0
  }
]

Response

Success Response (200)

The endpoint returns the accepted job with a generated id. Processing is asynchronous — track progress with the workflow listing endpoint. When you submit a single object the response is a single object; when you submit an array the response is an array (one item per accepted job).

{
  "id": "3048a34f-5d3a-4244-89d9-f9072ccc682a",
  "type": "TRANSCRIPTION",
  "video_id": "5a3b5516-b08f-4f94-8143-3e7e84fddd6b",
  "from_lang": "pt-BR",
  "generate_dubbing": true,
  "background_sound_mode": "ai",
  "tier": "essential",
  "additional_langs": [
    { "lang": "en" },
    { "lang": "es" }
  ]
}

Response Schema

FieldTypeDescription
idstring (uuid)Generated workflow job ID.
typestringWorkflow type that was accepted.
video_idstring (uuid)Source video ID.
...The remaining fields echo the job you submitted (from_lang, to_lang, generate_dubbing, additional_langs, dubbing options, etc.).
⚠️

Important: the dubbing and translation sub-jobs (one per additional_langs entry) are created and processed asynchronously. Poll the workflow listing endpoint to follow their status.

Error Responses

  • 400 Bad Request — validation error. Common cases:
    • "You need to create a from_lang subtitle first"TRANSLATION/DUBBING on a video without the source subtitle.
    • "You need to delete the to_lang subtitle first" — the target subtitle already exists.
    • "Subtitles already exist for this lang, please delete them first" — transcription for a language that already has a subtitle.
    • "background_sound_mode is required when generate_dubbing is true".
    • "tier is required for TRANSCRIPTION" / "... for TRANSLATION" (when generate_dubbing is false).
    • "Lipsync is not supported for videos longer than 60 minutes".
    • "There is already a dubbing/translation/transcription in progress for this video".
    • "Not enough credits".
  • 404 Not Found — source video not found.
  • 500 Internal Server Error — server-side error.

Example Usage

cURL

curl -X POST \
  'https://api-v2.pandavideo.com.br/aiworkflow' \
  -H 'Authorization: your_api_token_here' \
  -H 'Content-Type: application/json' \
  -d '[
  {
    "type": "TRANSCRIPTION",
    "video_id": "5a3b5516-b08f-4f94-8143-3e7e84fddd6b",
    "from_lang": "pt-BR",
    "generate_dubbing": true,
    "background_sound_mode": "ai",
    "tier": "essential",
    "num_speakers": 0,
    "clone_original_voice": true,
    "additional_langs": [
      { "lang": "en" },
      { "lang": "es" }
    ]
  }
]'
Body Params
Responses

Language
LoadingLoading…
Response
Choose an example:
application/json