WWeydub API

Workflow

Video Translation

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

text
POST /v-w-c/gateway/ve/work/free

Most translation tasks are asynchronous. Save returned work IDs and read Async task model before building production polling or callback handling.

Access And Limits

RuleRequirement
Account accessCore video translation requires API access. High-emotion dubbing, voice cloning, and some wyTaskType modes can require account entitlement.
Source videoUse a stable public HTTPS URL. Current video hard limits are 15 minutes per file and 1000 MB per file.
BillingVideo 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 taskIf the final processStatus > 1, zero credits are deducted.
RetentionDownload final videos and subtitle files after callback. Default platform retention keeps source/rendered assets for the last 30 days.
ModeUse It ForKey Fields
Full subtitle + dubbingLocalized video with translated subtitles and AI voice.needWanyin: 1, wyTaskType: "FULL", wyNeedText: 1, sourceLang, lang, optional wyVoiceParam.
Subtitle onlyGenerate translated subtitle files without rendered dubbing.needWanyin: 1, wyTaskType: "NO_TTS" or the account-supported subtitle-only equivalent, wyNeedText: 1.
ASR onlyExtract spoken dialogue transcript without rendering a new video.needWanyin: 1, wyTaskType: "ONLY_ASR", wyNeedText: 0. See Subtitle extraction.
Manual/pro translationProfessional editing flows where subtitles, timing, or voice settings may be adjusted before rendering.wyTaskType: "MANUL" or account-specific Pro flow.
On-screen text translationTranslate visible text inside the video frame without dubbing.needWanyin: 0, needChineseOcclude: 11, videoInpaintLang, sourceLang, lang.
High-emotion dubbingShort 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

json
{
  "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

json
{
  "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

json
{
  "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

json
{
  "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:

text
POST /v-w-c/gateway/ve/work/voice/incorporate
json
{
  "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

ParameterRequiredDescription
urlsYesPublicly reachable source video URLs.
sourceLangYesSource/spoken language code, such as en, zh, es, or pt. Use enum query for current support.
langYesTarget language code. Use enum query for current support.
needWanyinYes1 for speech/subtitle translation tasks; 0 for on-screen text translation.
wyTaskTypeConditionalVoice/subtitle task mode. Common values include FULL, NO_TTS, VOICE_CLONE_PRO, ONLY_ASR, and MANUL; availability depends on account and workflow.
wyNeedTextConditional1 to render translated subtitles with speech translation; 0 when subtitles are not needed.
wyVoiceParamOptionalCompact JSON string for voice and subtitle rendering style.
needChineseOccludeConditionalUse 11 for on-screen text translation in video. Use removal modes from Video subtitle and text removal only for text removal.
videoInpaintLangConditionalSource language for visible text detection.
callbackOptionalWebhook URL for async completion.
extraOptionsOptionalCompact JSON string for advanced options, customer input files, CRF/write options, or provisioned workflow flags.
uidOptionalYour user/customer identifier when your account uses sub-user tracking.

Outputs

Successful translation tasks can return:

  • videoUrl
  • coverUrl
  • srcSrtUrl
  • tgtSrtUrl
  • sourceVideoUrl
  • ttsMetaResult
  • wyVoiceParam
  • processStatus
  • processProgress
  • paidPoint

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:

EndpointPurpose
POST /v-w-c/gateway/ve/work/translationPro/redoRedo translation/dubbing with adjusted subtitles, timing, or voice settings.
POST /v-w-c/gateway/ve/work/voice/incorporateCreate 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 current sourceLang and Lang support; this enum endpoint does not require signing.
  • Keep wyVoiceParam and extraOptions compact 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.