Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.vmeg.ai/llms.txt

Use this file to discover all available pages before exploring further.

Translate one or more text segments between locales supported in Supported languages.

Sync vs async

ModeEndpointResults
SyncPOST /openapi/v1/task/translate/createdata.items in HTTP response
AsyncPOST /openapi/v1/task/translate/create-asyncWebhook when event is openapi-translate (data.items)
Every create and create-async call requires X-Idempotency-Key. Async also needs a configured Webhook.

Workflow (sync)

curl -X POST "https://api.vmeg.ai/openapi/v1/task/translate/create" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "language": { "source": "zh-CN", "target": "en-US" },
    "segments": [{ "text": "你好" }]
  }'
Translated text appears in data.items, aligned with input segments.

Workflow (async)

  1. Configure Webhooks
  2. POST to create-async with idempotency key
  3. Save taskId from acceptance response
  4. Read translated segments from webhook data.items

Request details

For segment structure and options, see Create text translation (sync). For async-only extraData (echoed in webhooks), see Create text translation (async).