Everything you need to know to get started with webhooks.
/chat/completions
and /embeddings
calls. Support for /completions
will come later.ngrok http 3000
lt --port 3000
AhALzdz8S
) that you’ll use when creating generations.
metadata
field).
When the generation completes, your webhook endpoint will receive a notification.
response
object is compatible with the types exported from the official OpenAI SDKs.
response
object follows the standard OpenAI embeddings format.
Header | Description | Example |
---|---|---|
X-Inference-Event | Event type | generation.completed |
X-Inference-Webhook-ID | Webhook identifier | AhALzdz8S |
X-Inference-Generation-ID | Generation ID (for completion events) | XBKcs7F1s2oJ_AHiLMbF4 |
User-Agent | inference.net webhook agent | inference.net-Webhook/1.0 |
Content-Type | Always application/json | application/json |
X-Inference-Webhook-ID
is a good way to verify that the payload you’re recieving is officially coming from our API.This ID is unique to your webhook, and is completely private to you and your team.If the ID does not match what you see in the dashboard, your endpoint has most likely been discovered by a malicious actor.generation_id
to ensure you don’t process the same event twice:
webhook_id
in generation requestsgeneration_id