AI Help
How do I use webhooks to find out when a background AI response is ready?
Register a supported response-completion webhook, verify the incoming signature and retrieve the response identified by the event.
Steps to follow
- Configure the endpoint and selected event types in the provider's dashboard. Store the signing secret securely.
- Verify the original request body and headers with the supported SDK, then persist the event and acknowledge delivery promptly.
- Retrieve the referenced response in a worker and check its terminal state. Deduplicate repeated events before downstream actions.
Example in practice
Illustrative example. A completed report event queues retrieval of its response ID, and a repeated delivery does not send the report twice.
Related AI help
- How do I run a long AI request in the background without keeping the connection open?
- How do I pin an AI model version so my app doesn’t switch models unexpectedly?