Quick start
When submitting a task, add awebhook field to the request body:
your URL + /callback.
Other async task endpoints (video, audio, etc.) work the same way — just add the
webhook field to the request body.URL rules
Thewebhook you provide is the base URL, and we automatically append /callback:
Your webhook | Where we actually POST |
|---|---|
https://your-server.com | https://your-server.com/callback |
https://your-server.com/api | https://your-server.com/api/callback |
https://your-server.com/api/ | https://your-server.com/api/callback |
POST .../callback.
What you’ll receive
The pushed payload is exactly the same as what the “Get Task Status” endpoint returns — you can process it with the same parsing logic.For video tasks the result is in
result.videos, and for audio in result.audios.Retries and deduplication (important)
- Retries: If your server doesn’t return
2xxwithin about 10 seconds, or returns5xx, we’ll retry automatically, up to 3 times, at intervals of roughly 10s, 30s, and 60s. If all 3 fail we give up (within about 2 minutes). - No retry: If your endpoint returns
4xx(treated as a bad URL / request), we give up immediately without retrying. - Deduplication: Normally a task is pushed only once. But in extreme cases (e.g. a restart on our side after sending but before confirmation) you may receive duplicate pushes. Be sure to deduplicate idempotently by
id(task_id) to avoid double-processing.
Return 2xx as soon as possible
Accept and enqueue first, then process asynchronously — don’t make us wait for your processing to finish.
Requirements for the callback URL
For security, the callback URL must meet the following:| Requirement | Description |
|---|---|
| Publicly accessible | Cannot be an internal / local address (e.g. 127.0.0.1, 10.x, 192.168.x will be rejected) |
| Protocol | http or https (https recommended) |
| Port | Use standard ports (80 / 443); non-standard ports may be blocked |
| Domain | Cannot point to our own service domain |
FAQ
I submitted a task with a webhook but didn't receive a push?
I submitted a task with a webhook but didn't receive a push?
Check the following one by one:
- Did the task actually finish? Check the task details — is
statuscompleted/failed(no push while processing)? - Is your URL publicly accessible? Can we reach your
/callback? - Is the port a standard port (80 / 443)? Non-standard ports may be blocked by security policies.
- Did your
/callbackreturn 2xx promptly? Returning 4xx is given up immediately. - Are you using
https? Is the certificate valid?
Why is url in the result an array?
Why is url in the result an array?
Some models produce multiple images at once, so
images[].url may be an array — just handle it as an array.Do result links expire?
Do result links expire?
If
result includes expires_at (a Unix timestamp), it indicates the link’s expiration time — transfer/store it promptly.Do you push the 'processing' status?
Do you push the 'processing' status?
No. We only push once, when the task finally succeeds or fails.
Minimal receiver example
Python
200 as soon as possible, and run your processing logic asynchronously in the background.