Why use webhooks
Webhooks push status changes to your backend the moment a task finishes, fails, or emits progress. This reduces API polling, lowers latency to downstream systems, and keeps processing aligned with your own retry and monitoring logic.Prerequisites
- A webhook secret generated in the ppt.video dashboard (used for HMAC verification)
- An HTTPS endpoint that can accept POST requests and return a fast 2xx
- Secure storage for the secret; do not embed it in client-side code
Register your webhook URL
Provide the callback URL when you create a task. Setwebhook directly in the request body so ppt.video can reach your endpoint.
Required fields vary by model (for example,Kling,Google Veo,OpenAI Sora,Runway,Hailuo AI,Vidu AI,Luma AI,Pika AI,PixVerse AI,Wan Video,Hunyuan). Use the corresponding OpenAPI schema for required parameters.
Verify webhook signatures
Each delivery includes headers you must validate before trusting the payload (replace with the exact header names from your dashboard or OpenAPI schema):X-Webhook-Id: unique delivery identifierX-Webhook-Timestamp: Unix timestamp (seconds) when ppt.video sent the eventX-Webhook-Signature: Base64-encoded HMAC-SHA-256 signature
Signature algorithm (HMAC-SHA-256)
- Read the raw request body as a string.
- Build the signed content:
<webhook_id>.<webhook_timestamp>.<body>. - Base64-decode your webhook secret.
- Compute HMAC-SHA-256 over the signed content using the decoded secret.
- Base64-encode the digest and compare it to
X-Webhook-Signatureusing a timing-safe comparison.
JavaScript example
Python example
Event payload
Event shapes vary by model; consult the model’s OpenAPI schema. A typical delivery looks like:id to correlate with the original request and status to branch your business logic. payload, meta, and data are model-dependent; error is present on failure.
Response and retries
- Return HTTP 2xx as soon as the signature is validated; avoid long-running work in the handler.
- ppt.video will retry failed deliveries with backoff. Confirm the retry limit, schedule, and timeout in your environment (
<RETRY_LIMIT>,<TIMEOUT_SECS>); design handlers to be idempotent. - If your endpoint is unavailable for an extended period, re-register or rotate the webhook secret and replay missed tasks as needed.