hf_webhook query parameter when submitting generation. Higgsfield sends one or more HTTP POST deliveries after the request reaches completed, failed, or nsfw.
Configure a webhook
Payload envelope
All deliveries use the same top-level envelope. Successful output is nested inpayload.
payload.audio. Some video and 3D operations can also include zip, mov, jsx, fbx, or ply artifacts.
expires_at is the time after which the request’s files are deleted and the URLs in payload stop working; download them before then. See Data retention and deletion.
Verify signatures
Webhook deliveries are signed using the Standard Webhooks specification. Verify every delivery before trusting its contents: anyone who knows your endpoint URL can send it a request. Each signed delivery includes three headers:Get your signing secret
Open Settings in Higgsfield Console and reveal the webhook signing secret. It starts withwhsec_. The secret is created the first time it is revealed; until then, deliveries for your account are not signed.
One secret covers every API key and request of the account. In an organization, only admins can reveal or rotate it. Store it with your other server-side credentials and never expose it in browser or mobile code.
Verify with a library
Use an official Standard Webhooks library. It checks the signature and rejects timestamps outside a five-minute tolerance. Verify the raw request body before parsing JSON: re-serialized JSON does not match the signature.pip install standardwebhooks or npm install standardwebhooks. Libraries for other languages are listed in the Standard Webhooks repository.
Verify manually
- Remove the
whsec_prefix from the secret and base64-decode the rest to get the HMAC key. - Build the signed content
{webhook-id}.{webhook-timestamp}.{raw body}. - Compute HMAC-SHA256 of the signed content with the key and base64-encode the result.
- Compare it with each
v1,entry ofwebhook-signatureusing a constant-time comparison. Accept the delivery if any entry matches. - Reject deliveries whose
webhook-timestampis more than five minutes from your current time.
Rotate the secret
Rotate the secret in Settings if it may have been exposed. The new secret takes effect immediately, and the previous secret keeps working for 24 hours. During that windowwebhook-signature carries one signature per secret, so update your server before the previous secret expires. At most two secrets are valid at the same time.
Integrations that pass a secret with the webhook in the request body still receive it in the
X-Webhook-Secret-Key header. That header will be retired; switch to signature verification.Delivery and retries
- Return any
2xxresponse after durably recording the event. - Network failures and
5xxresponses are retried for up to two hours. 4xxresponses are treated as permanent and are not retried.- Duplicate deliveries are possible. Deduplicate by
webhook-id, or byrequest_idand terminalstatusfor unsigned deliveries. - If delivery fails permanently, retrieve the result through the authenticated status endpoint.
- No deliveries are made after a request’s data is deleted. With retention shorter than the retry window, keep polling as a fallback.
2xx.