webhook URL when you start it; there is no account-wide webhook setting. Each POST carries the job’s result as JSON plus X-Percify-Timestamp and X-Percify-Signature headers.
Which calls accept a webhook?
The MCP tools
generate, replicate_video and make_video take the same webhook argument.
URL requirements
- It must be a valid URL that starts with
https://. - The host must resolve to a public IP address.
localhost,.localand.internalhosts and private network addresses are refused. - Percify checks the URL when you start the job, so a bad URL fails the start call with a
400such aswebhook must use https.
What Percify sends
Every webhook is aPOST with these headers:
Generation payload
"status": "failed", "output": null and the reason in error. Its credits were already refunded.
Replication payload
The same fields asGET /v3/replicate/v1/runs/{id}, plus "event": "replication.completed". Check status for done or failed.
Short video payload
{ "jobId": "…", "status": "failed", "error": "…" }.
Delivery rules
- One attempt. Percify sends each webhook once and does not retry. If your server is down, recover with the polling endpoint.
- Your response is not read. Return
200quickly and do slow work afterwards. - No polling needed. Percify checks running jobs in the background, so the webhook is sent even if you never poll.
Verify a webhook
The signature is an HMAC-SHA256 of the timestamp, a dot and the exact raw request body, keyed with a signing secret for your account. The developer console does not show that secret, so you cannot checkX-Percify-Signature yourself today.
Treat the webhook as a notification and confirm it with your API key instead: take the id from the body and read the job from Percify. Anyone can POST to your URL, but only Percify can answer GET /v1/generations/{id} for your key.
GET /v3/replicate/v1/runs/{id}. For short videos, use GET /v3/mascot/api/{jobId}.
Tips
- Store the job id when you start it, and ignore webhooks for ids you do not know.
- Make your handler safe to run twice for the same id.
- Keep a slow fallback poll for jobs that never reported back, for example if your server was down when the POST arrived.
Related
Async jobs and polling
Statuses, timeouts and refunds.
Start a generation
Where the webhook field goes.
Get a generation
Confirm a webhook with your key.
Code examples
Node.js, Python and cURL end to end.