Use this workflow to translate video into another language. Weydub can create source subtitles, translated subtitles, AI dubbing, and rendered localized video assets.
Want to inspect output quality before building? Try the same workflow in the Weydub web app: Translate a video.
Endpoint
POST /v-w-c/gateway/ve/work/freeMost translation tasks are asynchronous. Save returned work IDs and read Async task model before building production polling or callback handling.
Access And Limits
| Rule | Requirement |
|---|---|
| Account access | Core video translation requires API access. High-emotion dubbing, voice cloning, and some wyTaskType modes can require account entitlement. |
| Source video | Use a stable public HTTPS URL. Current video hard limits are 15 minutes per file and 1000 MB per file. |
| Billing | Video workflows are billed in 30-second units. Clips shorter than 30 seconds count as 30 seconds. Combining translation, dubbing, text removal, or rendering can stack costs. |
| Failed task | If the final processStatus > 1, zero credits are deducted. |
| Retention | Download final videos and subtitle files after callback. Default platform retention keeps source/rendered assets for the last 30 days. |
Recommended Modes
| Mode | Use It For | Key Fields |
|---|---|---|
| Full subtitle + dubbing | Localized video with translated subtitles and AI voice. | needWanyin: 1, wyTaskType: "FULL", wyNeedText: 1, sourceLang, lang, optional wyVoiceParam. |
| Subtitle only | Generate translated subtitle files without rendered dubbing. | needWanyin: 1, wyTaskType: "NO_TTS" or the account-supported subtitle-only equivalent, wyNeedText: 1. |
| ASR only | Extract spoken dialogue transcript without rendering a new video. | needWanyin: 1, wyTaskType: "ONLY_ASR", wyNeedText: 0. See Subtitle extraction. |
| Manual/pro translation | Professional editing flows where subtitles, timing, or voice settings may be adjusted before rendering. | wyTaskType: "MANUL" or account-specific Pro flow. |
| On-screen text translation | Translate visible text inside the video frame without dubbing. | needWanyin: 0, needChineseOcclude: 11, videoInpaintLang, sourceLang, lang. |
| High-emotion dubbing | Short drama, film, or character-heavy clips that need stronger emotion and speaker preservation. | POST /v-w-c/gateway/ve/work/voice/incorporate when enabled. |
Minimal Dubbing Payload
{
"urls": ["https://example.com/source.mp4"],
"needWanyin": 1,
"sourceLang": "en",
"lang": "es",
"wyTaskType": "FULL",
"wyNeedText": 1,
"callback": "https://your-domain.example/webhooks/weydub"
}Dubbing With Voice And Subtitle Style
{
"urls": ["https://example.com/source.mp4"],
"needWanyin": 1,
"sourceLang": "en",
"lang": "es",
"wyTaskType": "FULL",
"wyNeedText": 1,
"wyVoiceParam": "{\"voice_type\":\"CLONE\",\"character_voices\":[{\"character\":\"role_default\",\"id\":102052}],\"font_param\":{\"style\":\"tpl-31-1-T\",\"font_size\":32,\"position\":0.8}}"
}Keep wyVoiceParam as a compact JSON string. Do not send it as an object unless your account manager has confirmed an alternate contract.
Subtitle-Only Payload
{
"urls": ["https://example.com/source.mp4"],
"needWanyin": 1,
"sourceLang": "en",
"lang": "es",
"wyTaskType": "NO_TTS",
"wyNeedText": 1
}If your account uses a different subtitle-only task type, keep the same async lifecycle and status handling, but follow the task type confirmed for that account.
On-Screen Text Translation Payload
{
"urls": ["https://example.com/source.mp4"],
"needWanyin": 0,
"needChineseOcclude": 11,
"sourceLang": "en",
"lang": "es",
"videoInpaintLang": "en"
}Use this when the main task is visible text in the frame, such as product labels, app screens, tutorial captions, or hardcoded graphic text. Do not use needChineseOcclude: 11 for speech dubbing.
High-Emotion Voice Cloning
High-emotion voice cloning uses a separate task path when enabled for the account:
POST /v-w-c/gateway/ve/work/voice/incorporate{
"urls": ["https://example.com/drama-cn.mp4"],
"incorporatePro": true,
"sourceLang": "zh",
"lang": "en",
"extraOptions": "{\"customer_input\":{\"url\":\"https://example.com/drama-cn.json\"}}",
"callback": "https://your-domain.example/webhooks/weydub"
}Use this mode for short drama, film, or actor-driven content where emotion, speaker identity, and spatial feeling matter. Confirm entitlement and demo payload support before production use.
Parameters
| Parameter | Required | Description |
|---|---|---|
urls | Yes | Publicly reachable source video URLs. |
sourceLang | Yes | Source/spoken language code, such as en, zh, es, or pt. Use enum query for current support. |
lang | Yes | Target language code. Use enum query for current support. |
needWanyin | Yes | 1 for speech/subtitle translation tasks; 0 for on-screen text translation. |
wyTaskType | Conditional | Voice/subtitle task mode. Common values include FULL, NO_TTS, VOICE_CLONE_PRO, ONLY_ASR, and MANUL; availability depends on account and workflow. |
wyNeedText | Conditional | 1 to render translated subtitles with speech translation; 0 when subtitles are not needed. |
wyVoiceParam | Optional | Compact JSON string for voice and subtitle rendering style. |
needChineseOcclude | Conditional | Use 11 for on-screen text translation in video. Use removal modes from Video subtitle and text removal only for text removal. |
videoInpaintLang | Conditional | Source language for visible text detection. |
callback | Optional | Webhook URL for async completion. |
extraOptions | Optional | Compact JSON string for advanced options, customer input files, CRF/write options, or provisioned workflow flags. |
uid | Optional | Your user/customer identifier when your account uses sub-user tracking. |
Outputs
Successful translation tasks can return:
videoUrlcoverUrlsrcSrtUrltgtSrtUrlsourceVideoUrlttsMetaResultwyVoiceParamprocessStatusprocessProgresspaidPoint
Callbacks send the work item payload directly, without the outer code / msg / body wrapper used by polling responses.
Redo And Editing
Use redo endpoints only when you already have an existing task context and need to adjust subtitles, timing, voice settings, or rendered output:
| Endpoint | Purpose |
|---|---|
POST /v-w-c/gateway/ve/work/translationPro/redo | Redo translation/dubbing with adjusted subtitles, timing, or voice settings. |
POST /v-w-c/gateway/ve/work/voice/incorporate | Create high-emotion dubbing task when enabled. |
Every successful redo that changes video content can produce a new video URL. Store the latest result URL after each callback.
Agent Notes
- Start with Demo scenarios before customer media.
- Use
wyTaskType: "FULL"for the public English-to-Spanish demo. - Use enum query (
POST /v-w-c/enum/query2) to fetch currentsourceLangandLangsupport; this enum endpoint does not require signing. - Keep
wyVoiceParamandextraOptionscompact and stringified before signing. - Do not combine speech dubbing, on-screen text translation, and Pro draft generation in one request unless the exact combination is documented for the account.