Skip to main content
Webhooks let you receive results from async Universal AI jobs via HTTP callbacks instead of polling. When a job completes, Eden AI sends a signed POST request to the URL you provided.

How It Works

  1. Submit an async request with a webhook_receiver in the payload.
  2. Eden AI processes the job in the background.
  3. On completion, Eden AI sends a signed POST request to your webhook_receiver with 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.
Ask Eden AI support for the webhook public key (webhook_rsa.pub.pem) and store it with your service configuration.
The signature is built as follows:
  1. The payload is serialized with canonical JSON (sorted keys, 2-space indent, UTF-8).
  2. sha256(canonical_json_bytes) is computed and its hex digest is taken.
  3. That hex digest is signed with RSA PKCS1 v1.5 / SHA-256.
  4. The hex-encoded signature is sent in X-Edenai-Signature.
To verify, reproduce the same canonical JSON before hashing — do not re-serialize with default formatting.

Example

Dependencies: pip install requests flask pycryptodome orjsonSending the request:
Receiving and verifying the webhook (Flask):
Do not re-serialize the parsed JSON with defaults (e.g. JSON.stringify(obj) or json.dumps(obj) without sort_keys=True, indent=2) — any difference in spacing, key ordering, or unicode escaping will make the signature fail to verify.

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.
Keep your webhook handler idempotent — Eden AI may deliver the same job_id more than once if a retry races with a slow response from your server.

Webhook vs Polling

Next Steps

Monitoring

Track async job results and API usage in the dashboard