POST request to the URL you provided.
How It Works
- Submit an async request with a
webhook_receiverin the payload. - Eden AI processes the job in the background.
- On completion, Eden AI sends a signed
POSTrequest to yourwebhook_receiverwith the result.
Request Parameters
Webhook Headers
Every webhook request Eden AI sends includes these headers:Webhook Payload
Signature Verification
Every webhook is signed with Eden AI’s RSA private key so you can verify it was not forged or tampered with in transit. Verify each request against Eden AI’s public key below. Save it asedenai_webhook_rsa.pub.pem next to your handler — this is the file the examples load.
edenai_webhook_rsa.pub.pem
- The payload is serialized to canonical JSON: keys sorted alphabetically, 2-space indent, UTF-8 with non-ASCII characters left as-is (not
\u-escaped). This is exactlyorjson.dumps(payload, option=OPT_INDENT_2 | OPT_SORT_KEYS). sha256(canonical_json_bytes)is computed and its hex digest (a 64-character string) is taken.- That hex digest string is signed with RSA PKCS1 v1.5 over SHA-256.
- The signature is hex-encoded and sent in the
X-Edenai-Signatureheader.
Example
- Python
- JavaScript
Dependencies: Receiving and verifying the webhook (Flask):
pip install requests flask pycryptodome orjsonSending the request:Retry Behavior
Eden AI retries webhook delivery up to 3 times with exponential backoff between attempts (max delay 30 s) when the receiver returns a transient failure. Each attempt has a per-request timeout of 30 s.Webhook vs Polling
Next Steps
Monitoring
Track async job results and API usage in the dashboard