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
| Item | Value |
|---|---|
| Base URL | https://api.zhaoli.com |
| Protocol | HTTPS |
| Method | POST for the documented API calls |
| Encoding | UTF-8 |
| Content type | application/json |
| Auth | AppKey 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
| Check | What To Confirm | Why It Matters |
|---|---|---|
| API access | Your 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. |
| Credentials | You have AppKey and AppSecret, stored as backend secrets. | AppSecret must never appear in frontend code, public repos, logs, screenshots, or prompts. |
| Media URLs | Source files are publicly reachable and stable for the processing window. | Weydub workers need to download source media before processing. |
| Callback URL | Production callbacks return HTTP 200 plus a non-empty body only after durable storage. | Async jobs can complete after the original request has returned. |
| Result storage | Your 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:
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:
POST /v-w-c/enum/query2The enum query endpoint is used for dynamic language/status lists and does not require signing.
Endpoint Index
| Method | Path | Family | Purpose | Access Notes |
|---|---|---|---|---|
POST | /v-w-c/gateway/ve/work/free | Video | Create 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/status | Video | Query video task status and result fields by work IDs. | Use after task creation or as callback fallback. |
POST | /v-w-c/gateway/ve/work/list | Video | Query historical video tasks. | Useful for internal dashboards and reconciliation. |
POST | /v-w-c/gateway/ve/work/video/inpaint/redo | Video | Redo text removal/inpainting with adjusted masks. | Requires an existing work/task context. |
POST | /v-w-c/gateway/ve/work/translationPro/redo | Video | Redo translation/dubbing with adjusted subtitles, timing, or voice settings. | Requires an existing translation task context. |
POST | /v-w-c/gateway/ve/work/voice/incorporate | Video | Create high-emotion voice cloning and dubbing tasks. | Confirm account entitlement before wiring production traffic. |
POST | /v-w-c/gateway/ve/image/translate | Image | Create 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/redo | Image | Regenerate 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/launch | Image legacy/web | Create 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/launch2 | Image legacy/web | Create a batch image task in older account or web flows. | Confirm batch limits and callback policy. |
POST | /v-w-c/ve/image/translate/task/query | Image legacy/web | Query one image task in older account or web flows. | Poll until terminal status before reading outputs. |
POST | /v-w-c/enum/query2 | Utility | Query dynamic enums such as statuses and language lists. | No signature required. |
Create Video Task
POST /v-w-c/gateway/ve/work/freeCommon workflows using this endpoint:
| Workflow | Required Signal | Start Page |
|---|---|---|
| Subtitle/text removal | needChineseOcclude: 1, 2, or 3; Advanced Lite/Pro via extraOptions.extra_inpaint_config | Video subtitle and text removal |
| Video translation/dubbing | needWanyin: 1, sourceLang, lang, wyTaskType | Video translation |
| On-screen text translation | needChineseOcclude: 11, sourceLang, lang, videoInpaintLang | Video translation |
| OCR subtitle extraction | needChineseOcclude: 14, videoInpaintMasks, videoInpaintLang | Subtitle extraction |
| ASR subtitle extraction | needWanyin: 1, wyTaskType: "ONLY_ASR", wyNeedText: 0 | Subtitle extraction |
Minimal request:
{
"urls": ["https://example.com/demo.mp4"],
"needChineseOcclude": 1,
"videoInpaintLang": "all",
"callback": "https://your-domain.example/webhooks/weydub"
}Typical create response fields:
| Field | Meaning |
|---|---|
idProject | Batch/project ID. |
dataList[].id | Work ID for status polling and callback matching. |
dataList[].url | Source URL accepted for processing. |
Query Video Status
POST /v-w-c/gateway/ve/work/status{
"idWorks": [488026661]
}Status values:
processStatus | Meaning | Client Behavior |
|---|---|---|
< 1 | Processing. | Poll later or wait for callback. |
1 | Succeeded. | Read result URLs and persist them. |
> 1 | Failed. | 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:
POST /v-w-c/gateway/ve/image/translateRedo endpoint:
POST /v-w-c/gateway/ve/image/translate/redoImage translation request:
{
"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:
{
"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
POST /v-w-c/enum/query2This endpoint does not require AppSign.
{
"text": "Lang"
}Common enum names:
text | Purpose |
|---|---|
ProcessStatus | Video task status codes. |
ImageTaskStatus | Image task status codes. |
sourceLang | Video translation source language list. |
Lang | Video translation target language list. |
musicRegion | Smart music region list where supported. |
Billing, Limits, And Retention
| Topic | Rule |
|---|---|
| Video duration | Current 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 size | Current hard limit is 1000 MB per video file. Compress oversized files before submission. |
| Image limits | Maximum 2000*2000 px, maximum 50 MB, supported formats png, jpeg, jpg, bmp, webp; image URLs must not contain Chinese characters. |
| Billing unit | Video workflows are billed in 30-second units. A video shorter than 30 seconds counts as 30 seconds. |
| Combined services | Combining services such as text removal and voice translation can stack costs. |
| Failed tasks | Final failed tasks (processStatus > 1) deduct zero credits. |
| Retention | API-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. |
| CRF | Default 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-Signusing the raw callback request body and yourAppSecret. - 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
| Symptom | Likely Cause | Check |
|---|---|---|
| Signature error | Body 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 result | Async processing is still running. | Poll /v-w-c/gateway/ve/work/status or wait for callback. |
| Missing output URL | Wrong workflow mode or task not terminal. | Confirm processStatus === 1 and inspect workflow-specific output fields. |
| Callback not reflected in your app | Handler 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 unavailable | Account entitlement not enabled. | Confirm API access for the specific task family. |
| Video hard-limit error | Video is longer than 15 minutes or larger than 1000 MB. | Segment or compress before submitting. |
| Image hard-limit error | Image 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
AppSecretor invent enabled endpoints.