WWeydub API

Workflow

Image Translation

Use image translation for product images, screenshots, comic panels, app UI captures, game UI, marketing creatives, and any static image that contains text. The same image task family can also erase image text without translating it.

Want to inspect output quality before building? Try the same workflow in the Weydub web app: Translate an image.

Current Public Endpoint

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

This endpoint creates an asynchronous image processing task. It can run text OCR/erasure, translation, and layout synthesis depending on the flags you send.

Redo Endpoint

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

Use redo only after a task has produced a result and you need to adjust translated text, fill color, stroke color, or font size, then regenerate the final image.

Legacy And Web Task Paths

Some existing Weydub web flows and older account integrations still use task-family paths:

EndpointPurpose
POST /v-w-c/ve/image/translate/task/launchCreate a single image task in legacy/web flows.
POST /v-w-c/ve/image/translate/task/launch2Create a batch image task in legacy/web flows.
POST /v-w-c/ve/image/translate/task/queryQuery one image task in legacy/web flows.
POST /v-w-c/ve/image/translate/task/listList image tasks when enabled.
POST /v-w-c/ve/image/translate/task/list2Alternate list endpoint used by some account flows.

For new public API documentation, prefer the gateway endpoint above. If your account was provisioned against the older task paths, keep using the shape confirmed for that account.

Access And Limits

RuleRequirement
Account accessImage API access must be enabled for the account. Confirm batch policy and callback support before production traffic.
Image sizeMaximum 2000*2000 px.
File sizeMaximum 50 MB.
URLThe image URL must be publicly reachable and must not contain Chinese characters.
Formatspng, jpeg, jpg, bmp, webp.
RetentionStore returned image assets after callback; generated assets follow platform retention rules.

Image Translation Payload

Use this when you want to translate source text and render translated text back into the image.

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",
  "callback": "https://your-domain.example/webhooks/weydub"
}

Image Text Removal Payload

Use this when the product requirement is image text erasure only.

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"
}

Batch Payload Shape

When batch creation is enabled for your account, use downloadInfos instead of downloadInfo. Each item is a compact JSON string.

json
{
  "srcLang": "en",
  "tgtLang": "es",
  "translateOn": 1,
  "synthesisOn": 1,
  "commodityFilterOn": 1,
  "downloadInfos": [
    "{\"url\":\"https://example.com/product-1.png\",\"fileName\":\"product-1.png\",\"id\":12345,\"materialName\":\"product-1.png\"}",
    "{\"url\":\"https://example.com/product-2.png\",\"fileName\":\"product-2.png\",\"id\":12346,\"materialName\":\"product-2.png\"}"
  ],
  "app": "WD"
}

downloadInfo Shape

downloadInfo and each downloadInfos item are compact JSON strings before signing.

FieldTypeRequiredDescription
urlstringYesPublic image URL. The URL must not contain Chinese characters.
fileNamestringRecommendedOriginal or display filename, including extension.
idnumber/stringRecommendedYour stable asset/material ID when available.
materialNamestringRecommendedDisplay name used for task lists and user-facing records.

Parameters

ParameterRequiredDescription
srcLangYesSource language code. Use enum query or account docs for current support.
tgtLangYesTarget language code. Use the same value as srcLang for removal-only tasks.
translateOnYes1 translates recognized text; 0 skips translation and can be used for text removal.
synthesisOnYes1 renders the processed text/layout back into the image.
commodityFilterOnOptional1 enables product-photo filtering when desired for e-commerce images; 0 disables it.
downloadInfoConditionalCompact JSON string for one image.
downloadInfosConditionalArray of compact JSON strings for batch tasks when enabled.
appRecommendedUse WD for Weydub flows unless your account has a different app code.
callbackOptionalWebhook URL for async completion when enabled.
uidOptionalYour user/customer identifier when your account uses sub-user tracking.

Redo Payload

Redo requires the existing image task ID and a result JSON string based on the original query result.

json
{
  "id": 123456789,
  "result": "{\"meta_data\":[{\"translation\":\"Oferta de verano\",\"fill_color\":\"#111111\",\"stroke_color\":\"#ffffff\",\"trans_font_size\":32}]}"
}

Recommended edit boundary:

  • Keep all original coordinate, box, layer, and positioning fields from the query result.
  • Modify only meta_data.translation, meta_data.fill_color, meta_data.stroke_color, and meta_data.trans_font_size unless Weydub support confirms a wider edit contract.
  • A redo that changes image content can produce new result assets; store the latest returned URLs.

Outputs

Successful tasks can return an image task ID, task status, original image metadata, OCR/translation result JSON, rendered output assets, and callback payloads when enabled.

Because image tasks are asynchronous, do not treat task creation as completion. Query the task endpoint confirmed for your account or process the callback before exposing result assets to users.

For human-facing tools:

  • Keep the UI simple: upload image, choose source language, choose target language, submit.
  • Show translated image, original image, and editable text layers if available.
  • Flag dense panels or brand-critical creatives for manual inspection.
  • Let users try the web workflow first: Translate an image.

For API and Agent users:

  • Confirm image API access is enabled for the account.
  • Validate image dimensions, file size, extension, and URL characters before sending.
  • Prefer callback-based completion for large batches when provisioned.
  • Store returned assets before retention cleanup.
  • Keep terminology consistent across batches.

Common Scenarios

ScenarioNotes
E-commerce product imagesPrioritize clean text replacement and layout readability. Use commodityFilterOn: 1 when product-photo filtering is desired.
Image text removalUse translateOn: 0 and synthesisOn: 1.
Social screenshotsUse source language auto-detection only when your account contract supports it.
Comic or manga panelsExpect dense text regions and manually inspect important pages.
App or game UIKeep product terms and short UI strings consistent across batches.

Agent Notes

  • Use the gateway endpoint for new public integrations: POST /v-w-c/gateway/ve/image/translate.
  • Do not assume image endpoint access or batch limits; confirm activation first.
  • Keep downloadInfo and downloadInfos stringified before signing.
  • Validate image hard limits locally: 2000*2000 px, 50 MB, supported extension, no Chinese characters in URL.
  • For redo, edit only the documented text/style fields and preserve all coordinate fields.
  • Store result assets before retention cleanup.