Skip to content

Webhooks

Instead of polling, you can have Moonez.ai call a URL when a job finishes (done or failed).

Per-request

Pass callback_url in the body of a generation request. Applies to that job only.

Account-wide

Register a default webhook in the web panel. Called automatically for all jobs.

{
"prompt": "a red panda astronaut floating in a nebula",
"aspect_ratio": "16:9",
"resolution": "2K",
"callback_url": "https://example.com/webhooks/image-ready"
}

The webhook is called once the job reaches a terminal state. The payload is a subset of the GET /jobs/{job_id} response: it carries job_id, status, result (or error) and metadata, but no timestamps (created_at, started_at, finished_at). Note that the webhook status uses the raw job status (success / failed), while GET /jobs/{job_id} returns the legacy value (done for a successful job).