Webhooks
Webhooks let you react to modelux events in your own infrastructure: budget alerts, config changes, provider health transitions, request anomalies, and scheduled-experiment runs.
Event types
budget.threshold_reachedbudget.exceededrouting_config.updatedrouting_config.createdrouting_config.deletedprovider.health_changedapi_key.revokedrequest.anomaly_detectedexperiment.completed— a scheduled experiment’s run finished. Fires on every run, regardless of whether any threshold was breached. Use it as the firehose for your own observability pipeline.experiment.regression_detected— a scheduled experiment’s latest run breached one or more configured thresholds (cost / latency / error rate / judge-worse). Fires only on the breach, not every subsequent run while the regression persists; pair it withexperiment.completedif you want both. The payload includes asignal_keythat correlates the event with the matching in-app signal on the overview page.
Endpoint setup
- Open Integrations -> Webhooks in the dashboard.
- Click Add endpoint. Enter the destination URL.
- Select which event types to subscribe to.
- modelux generates a signing secret. Save it to verify incoming payloads.
Signature verification
Every delivery includes an X-Modelux-Signature header with an HMAC-SHA256
of the raw body using your signing secret.
import crypto from "crypto";
function verify(body, signature, secret) {
const expected = crypto
.createHmac("sha256", secret)
.update(body)
.digest("hex");
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected),
);
}
Delivery & retries
- Deliveries run asynchronously through a durable queue
- On non-2xx response or timeout: retried with exponential backoff up to 24h
- The dashboard shows per-delivery status, payload, response body, and a replay button for manual redelivery
Slack-compatible format
Set the endpoint URL to a Slack webhook URL. modelux detects it and formats the payload as a Slack message automatically.