- Synchronous HTTP responses — direct return of
POST /xxx - Webhook callback bodies — POSTed to your
callback_urlonce an async task finishes
Synchronous response: success
On success the response carries upstream business fields and usually includes asuccess: true marker. See each API’s API reference for exact fields.
Example (Midjourney /midjourney/imagine):
Synchronous response: error
Error responses have nosuccess field — only error and trace_id:
Webhook callback body
If you passedcallback_url when creating the task, we POST a JSON to that URL when the task finishes. The callback envelope differs from the sync envelope — it always includes a success field:
Success callback:
callback_url is hard to guess, or verify the incoming task_id against tasks you previously created.
HTTP status codes
Verified error codes
These all come fromPlatformGateway exception classes. Service-specific upstream codes (e.g. Midjourney’s own task_failed) follow each API’s own docs.
Retry guidance
- 4xx generally should not be auto-retried (429 excepted); inspect
error.messageand fix the request - 429 / 5xx may be retried with exponential backoff and jitter
- Persist
trace_idto your logs for the fastest support resolution
Filing a ticket
Always include:trace_id- Request URL, headers (mask the Token), and body
- Response status and body
support@acedata.cloud / status page.
