What a webhook does
When a configured request finishes, Inference.net sends an HTTP POST to your webhook endpoint with the completion payload.Typical setup flow
- Create a webhook in the dashboard.
- Copy the webhook identifier.
- Attach that identifier to the request as
webhook_id. - Handle the completion event in your endpoint.
Supported event types
| Event | When it fires |
|---|---|
generation.completed | A background generation completed |
async-embedding.completed | An async embedding request completed |
slow-group.completed | A grouped async job completed |
webhook.test | A test event triggered from the dashboard |
Delivery behavior
- Inference.net performs an
OPTIONSreadiness check before trying to send event payloads. - The actual event is delivered with an HTTP
POSTcontaining JSON. - Your endpoint should return a
2xxresponse when the event was handled successfully. - You should treat webhook handlers as idempotent because retries can happen.
Source-backed receiver example
The e2e test suite uses a small Bun server to receive webhook traffic. This is the minimal working shape.Payload shapes
Single-generation completion
This payload shape is enforced byWebhookGenerationCompletionPayloadSchema and matches the e2e webhook assertions:
Group completion
Async embedding completion
Async embedding completions use the same top-level structure asgeneration.completed, but the event name is async-embedding.completed.
Test webhook payload
Thewebhook.test schema is slightly different from completion payloads. It currently uses webhook_id instead of webhookId.
Testing webhooks
The dashboard lets you send test events to verify that your endpoint is reachable and correctly configured.Best practices
- verify the event type before processing the payload
- log the webhook identifier and request identifier on your side
- make the handler idempotent
- keep processing lightweight and hand off heavier work to a queue if needed