WWeydub API

API reference

API Reference

This reference gives developers and automation agents one compact place to find Weydub API endpoints, access checks, request shape, async behavior, billing/retention rules, and troubleshooting signals.

Request Basics

ItemValue
Base URLhttps://api.zhaoli.com
ProtocolHTTPS
MethodPOST for the documented API calls
EncodingUTF-8
Content typeapplication/json
AuthAppKey and AppSign headers, except endpoints explicitly marked unsigned

Some legacy infrastructure names may still appear in public demo assets or older account paths. Treat this Weydub API documentation as the current product-facing contract.

Before You Call

CheckWhat To ConfirmWhy It Matters
API accessYour signed-in Weydub account can open API access for free; confirm workflow-specific entitlements when needed.Some task families, especially image translation and high-emotion dubbing, may be provisioned per account.
CredentialsYou have AppKey and AppSecret, stored as backend secrets.AppSecret must never appear in frontend code, public repos, logs, screenshots, or prompts.
Media URLsSource files are publicly reachable and stable for the processing window.Weydub workers need to download source media before processing.
Callback URLProduction callbacks return HTTP 200 plus a non-empty body only after durable storage.Async jobs can complete after the original request has returned.
Result storageYour service stores work IDs, task IDs, status, result URLs, and errors.Generated assets may follow retention policy, so copy durable references quickly.

Authentication

Most requests use headers:

text
Content-Type: application/json
AppKey: $WEYDUB_APP_KEY
AppSign: md5(md5(request_body) + $WEYDUB_APP_SECRET)

Sign the exact compact JSON body that will be sent. Read Auth and signing before debugging signature failures.

Unsigned exception:

text
POST /v-w-c/enum/query2

The enum query endpoint is used for dynamic language/status lists and does not require signing.

Endpoint Index

MethodPathFamilyPurposeAccess Notes
POST/v-w-c/gateway/ve/work/freeVideoCreate most video tasks: subtitle/text removal, video translation, OCR subtitle extraction, ASR extraction, and subtitle rendering.Core API access required.
POST/v-w-c/gateway/ve/work/statusVideoQuery video task status and result fields by work IDs.Use after task creation or as callback fallback.
POST/v-w-c/gateway/ve/work/listVideoQuery historical video tasks.Useful for internal dashboards and reconciliation.
POST/v-w-c/gateway/ve/work/video/inpaint/redoVideoRedo text removal/inpainting with adjusted masks.Requires an existing work/task context.
POST/v-w-c/gateway/ve/work/translationPro/redoVideoRedo translation/dubbing with adjusted subtitles, timing, or voice settings.Requires an existing translation task context.
POST/v-w-c/gateway/ve/work/voice/incorporateVideoCreate high-emotion voice cloning and dubbing tasks.Confirm account entitlement before wiring production traffic.
POST/v-w-c/gateway/ve/image/translateImageCreate image text removal or image translation task.Image workflow entitlement may be required after free API access.
POST/v-w-c/gateway/ve/image/translate/redoImageRegenerate an image task after editing result text/style metadata.Requires existing image task ID and result JSON.
POST/v-w-c/ve/image/translate/task/launchImage legacy/webCreate a single image task in older account or web flows.Use only when confirmed for the account.
POST/v-w-c/ve/image/translate/task/launch2Image legacy/webCreate a batch image task in older account or web flows.Confirm batch limits and callback policy.
POST/v-w-c/ve/image/translate/task/queryImage legacy/webQuery one image task in older account or web flows.Poll until terminal status before reading outputs.
POST/v-w-c/enum/query2UtilityQuery dynamic enums such as statuses and language lists.No signature required.

Create Video Task

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

Common workflows using this endpoint:

WorkflowRequired SignalStart Page
Subtitle/text removalneedChineseOcclude: 1, 2, or 3; Advanced Lite/Pro via extraOptions.extra_inpaint_configVideo subtitle and text removal
Video translation/dubbingneedWanyin: 1, sourceLang, lang, wyTaskTypeVideo translation
On-screen text translationneedChineseOcclude: 11, sourceLang, lang, videoInpaintLangVideo translation
OCR subtitle extractionneedChineseOcclude: 14, videoInpaintMasks, videoInpaintLangSubtitle extraction
ASR subtitle extractionneedWanyin: 1, wyTaskType: "ONLY_ASR", wyNeedText: 0Subtitle extraction

Minimal request:

json
{
  "urls": ["https://example.com/demo.mp4"],
  "needChineseOcclude": 1,
  "videoInpaintLang": "all",
  "callback": "https://your-domain.example/webhooks/weydub"
}

Typical create response fields:

FieldMeaning
idProjectBatch/project ID.
dataList[].idWork ID for status polling and callback matching.
dataList[].urlSource URL accepted for processing.

Query Video Status

text
POST /v-w-c/gateway/ve/work/status
json
{
  "idWorks": [488026661]
}

Status values:

processStatusMeaningClient Behavior
< 1Processing.Poll later or wait for callback.
1Succeeded.Read result URLs and persist them.
> 1Failed.Surface errorDetail. Failed tasks deduct zero credits.

Successful video tasks can include videoUrl, coverUrl, srcSrtUrl, tgtSrtUrl, sourceVideoUrl, ttsMetaResult, wyVoiceParam, and task metadata.

Image Tasks

Current public create endpoint:

text
POST /v-w-c/gateway/ve/image/translate

Redo endpoint:

text
POST /v-w-c/gateway/ve/image/translate/redo

Image translation request:

json
{
  "srcLang": "en",
  "tgtLang": "es",
  "translateOn": 1,
  "synthesisOn": 1,
  "commodityFilterOn": 0,
  "downloadInfo": "{\"url\":\"https://example.com/product.png\",\"fileName\":\"product.png\",\"id\":12345,\"materialName\":\"product.png\"}",
  "app": "WD"
}

Image text removal request:

json
{
  "srcLang": "en",
  "tgtLang": "en",
  "translateOn": 0,
  "synthesisOn": 1,
  "commodityFilterOn": 0,
  "downloadInfo": "{\"url\":\"https://example.com/banner.png\",\"fileName\":\"banner.png\",\"id\":12346,\"materialName\":\"banner.png\"}",
  "app": "WD"
}

Read Image translation before implementing image jobs because downloadInfo, downloadInfos, and redo result must keep their documented string shape.

Enum Query

text
POST /v-w-c/enum/query2

This endpoint does not require AppSign.

json
{
  "text": "Lang"
}

Common enum names:

textPurpose
ProcessStatusVideo task status codes.
ImageTaskStatusImage task status codes.
sourceLangVideo translation source language list.
LangVideo translation target language list.
musicRegionSmart music region list where supported.

Billing, Limits, And Retention

TopicRule
Video durationCurrent hard limit is 15 minutes per video file. Split longer media into segments shorter than 15 minutes, for example 14:59 to avoid duration rounding issues.
Video sizeCurrent hard limit is 1000 MB per video file. Compress oversized files before submission.
Image limitsMaximum 2000*2000 px, maximum 50 MB, supported formats png, jpeg, jpg, bmp, webp; image URLs must not contain Chinese characters.
Billing unitVideo workflows are billed in 30-second units. A video shorter than 30 seconds counts as 30 seconds.
Combined servicesCombining services such as text removal and voice translation can stack costs.
Failed tasksFinal failed tasks (processStatus > 1) deduct zero credits.
RetentionAPI-generated data follows Weydub web retention rules. By default, source files and rendered outputs for the last 30 days are retained. Download and store important assets after callback.
CRFDefault video CRF is 17, visually lossless for most distribution. Lower values such as 15 or 16 may be available via extraOptions.write_options and can add bandwidth/storage charges.

Callback Summary

Pass a callback URL in create requests when supported. Weydub sends the completed work item directly to your server, without the outer code / msg / body wrapper used by polling responses.

Callback handling rules:

  • Verify Callback-Sign using the raw callback request body and your AppSecret.
  • Return HTTP 200 plus any non-empty body only after durable storage succeeds.
  • Make handlers idempotent by work/task ID.
  • Failed callbacks for tasks created within the last 24 hours are retried about every 30 minutes.
  • If a redo changes video or image content, the output URL can change; store the newest result URL.

Read Async task model for callback details.

Troubleshooting

SymptomLikely CauseCheck
Signature errorBody bytes changed after signing, or pretty JSON was signed but compact JSON was sent.Log a non-secret body hash and compare signing/sending code paths.
Task created but no resultAsync processing is still running.Poll /v-w-c/gateway/ve/work/status or wait for callback.
Missing output URLWrong workflow mode or task not terminal.Confirm processStatus === 1 and inspect workflow-specific output fields.
Callback not reflected in your appHandler returned before durable storage, failed signature verification, or did not match work ID.Store raw callback payload, compare Callback-Sign, and make updates idempotent.
Endpoint unavailableAccount entitlement not enabled.Confirm API access for the specific task family.
Video hard-limit errorVideo is longer than 15 minutes or larger than 1000 MB.Segment or compress before submitting.
Image hard-limit errorImage is over 2000*2000 px, over 50 MB, unsupported, or URL contains Chinese characters.Resize, recompress, rename/encode URL, then retry.

Agent Contract

Automation agents should:

  • Load llms.txt and Weydub API Skill.
  • Use Demo scenarios before customer media.
  • Keep credentials in environment variables or a secret manager.
  • Persist IDs before reporting success to users.
  • Model jobs as submitted -> processing -> succeeded | failed | timed_out.
  • Never expose AppSecret or invent enabled endpoints.