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.

What it is

When an async task finishes, VMEG sends an HTTP POST with a JSON body to your configured webhook URL. Verify X-Timestamp and X-Signature as described in Webhook verification. The create-async HTTP response only confirms acceptance (taskId, etc.). Deliverables arrive in this webhook body, not in that response.

Common envelope

All async completion callbacks share the same top-level shape. Product-specific fields live in data:
{
  "code": 200,
  "version": "v1",
  "event": "openapi-tts",
  "pipelineKey": "a1b2c3d4e5f6789012345678901234ab",
  "message": "",
  "extraData": { "your": "memo" },
  "data": { }
}
FieldMeaning
codeOutcome of this delivery (200 = task succeeded)
versionAPI version of the task (e.g. v1, v2)
eventWhich product finished — see table below
pipelineKeyStable ID for this async completion — use for receiver deduplication (see below)
messageDetail when code is not success
extraDataEcho of extraData from your async submit request (if you sent it)
dataTask results; schema depends on event

Deduplicate by pipelineKey

VMEG assigns one pipelineKey per accepted async run. It appears in every webhook POST for that completion.
SituationWhat to do
First time you see a pipelineKeyVerify signature, process data, persist the key, return 2xx
Same pipelineKey again (retry)Return 2xx quickly; do not repeat billable or irreversible work
pipelineKey is for webhook delivery deduplication. It is not the same as X-Idempotency-Key on create-async (which prevents duplicate task submission). One accepted async job has one pipelineKey; data.taskId identifies the task but retries are keyed by pipelineKey.

The event field

event is a string in the JSON body that tells your server which Open API product completed. Use it to route parsing logic (switch on event, then read data).
In API reference, the Callbacks block on each create-async page is named for OpenAPI tooling. The value you must implement against is the event field inside the POST JSON, not that section title.

Event values by product

Productevent valueAsync create endpointWhat to read in data
Text to speechopenapi-ttsCreate TTS (async)Synthesis results, taskId — see Callbacks on that page
Text translationopenapi-translateCreate text translation (async)items (translated segments), taskId
Voice cloneopenapi-clone-voiceCreate voice clone (async)voiceId and related clone fields when successful
Media translationopenapi-media-translationCreate media translation (async)result with CDN URLs for deliverables
Today, async task completion uses only these four event values. If we add more callback types later, they will be documented here and in the matching Callbacks schema.

Example handler routing

POST /your-webhook
  → verify signature
  → parse JSON
  → if pipelineKey already processed → return 200
  → switch (event):
       openapi-tts              → parse TTS data
       openapi-translate        → parse translation data
       openapi-clone-voice      → parse clone data
       openapi-media-translation → parse media result
  → store pipelineKey → return 200

Per-endpoint request schema

Field-level types and nested properties are defined under Callbacks on each create-async operation in API reference (linked in the table above).