Register a dashboard webhook
Dashboard-managed webhooks are the default production path. They are reusable across tasks and signed with HMAC-SHA256.- Open the webhooks dashboard.
- Create a webhook with your HTTPS endpoint and the events you care about.
- Save the signing secret when it is shown — you need it to verify deliveries.
webhook field on each generate request.
Handle a delivery
Every delivery is an HTTPPOST with Content-Type: application/json.
Respond with a
2xx status as soon as you accept the payload. Treat deliveries as at-least-once: make handlers idempotent using task.id.
Completed generate task
Failed generate task
Failed tasks includeevent, task, request, and errors. They do not include result.
errors[0].code. Treat client-side failures as terminal; retry only when the code is transient:
request is the task request as stored by Mynth (including metadata when you set it). See Use Metadata.
For rate and alt payloads, see the Webhooks reference.
Verify webhook signatures
Dashboard-managed deliveries includeX-Mynth-Signature. Verify it before trusting the body.
Header format:
@mynthio/sdk/convex — see Convex integration.
Attach request-level custom webhooks
Onimage.generate only, you can add up to 5 extra endpoints per task with webhook.custom. These are useful for task-specific or temporary URLs.
Choose events
Mynth delivers these concrete events:
When you subscribe in the dashboard, you can also use broader filters:
The
X-Mynth-Event header and payload.event always use the specific event name (for example task.image.generate.completed), even if the webhook was subscribed with task.completed or all.
Generation-time content rating (rating on generate) does not emit task.image.rate.*. Rating is attached to the generate result; see Use Content Rating.
Delivery retries
Mynth retries failed deliveries (non-2xx or network errors) with exponential backoff and jitter, up to 12 attempts. For dashboard-managed webhooks, consecutive failures are tracked. After 30 consecutive failed delivery attempts, Mynth disables that webhook. Fix the endpoint, then re-enable it in the dashboard. Custom request-level endpoints are not auto-disabled; retries still apply for that job.REST example
webhook and rely on that registration.
When to use webhooks vs polling
Next steps
- Payload reference: Webhooks
- Polling and task endpoints: Async and polling
- Convex helper: Convex integration
- Full Convex walkthrough: Convex full-stack image generation