Skip to main content
Webhooks are a feature of the DeepInfra Native API. They are not supported with the OpenAI-compatible API. Webhooks let you submit an inference request and receive the result via an HTTP callback, instead of waiting for the response synchronously. This is useful for long-running requests or fire-and-forget workloads.

How it works

Add a webhook parameter to your request. The API immediately responds with status queued, then calls your webhook URL with the result once inference is complete.

Text generation example

Embeddings example

Webhook payload

On success, your endpoint receives:
On failure:

Retry behavior

DeepInfra will make a few retry attempts if your webhook endpoint returns a 4xx or 5xx status code.