ProvidersBuilt-in providers
Replicate webhooks
Receive and verify Replicate webhooks with Trigger.dev. Check the Standard Webhooks signature and run a task for each Replicate event, filtered on event.status.
webhooks.replicate() verifies the Standard Webhooks signature Replicate sends in the webhook-* headers on every request.
import { , } from "@trigger.dev/sdk";
export const replicate = ..define({
: "replicate",
: .replicate(),
});
export const replicateEvents = ({
id: "replicate-events",
: replicate,
: async ({ }) => {
.();
},
});To run a subscriber only for some events, add a filter on event.status.
| Setting | Value |
|---|---|
| Source | webhooks.replicate() |
| Verification | Standard Webhooks (webhook-id, webhook-timestamp, webhook-signature) |
| Credential | Signing secret issued by Replicate |
| Event type | event.status |
| Replicate docs | Replicate webhook docs |
Set up Replicate
- Start
trigger devor deploy, then copy the endpoint's Webhook URL from the Webhooks page. - Replicate has no webhook settings page. Pass the webhook URL as
webhookwhen you create a prediction, withwebhook_events_filterset to the events you want (start,output,logs,completed). - Get your signing secret from
GET https://api.replicate.com/v1/webhooks/default/secret. It starts withwhsec_and is the same for every webhook on your user or organization. Choose Set signing secret on the Trigger.dev endpoint and paste it. - Create a prediction with the webhook set, or use the endpoint's Test tab, and check the endpoint's Deliveries tab. See Verify the connection if nothing arrives.
Was this page helpful?
Last updated
Edit on GitHub