Skip to main content
WEBHOOK
See Webhooks for setup, signature verification code in several languages, a test vector and best practices.

Authorizations

Authorization
string
header
required

Your API key from the developer console, sent as Authorization: Bearer sk_live_.... The x-api-key: sk_live_... header is accepted as an alternative.

Headers

webhook-id
string
required

The event id. It equals id in the body and stays the same across retries, so use it to de-duplicate.

Example:

"evt_01J9X7Z0K7Q8W3F2P1N6M5V4R3"

webhook-timestamp
integer<int64>
required

Unix time in seconds when the event was signed.

Example:

1792736585

webhook-signature
string
required

v1,<base64 signature>. During a secret rotation the header carries several space-separated values.

Example:

"v1,RlzoRMsvgGLfVsE6NqX4N5CHAfiWBABarbN8HusOBnE="

Body

application/json
id
string
required

Event id. Equals the webhook-id header and stays the same across retries.

Example:

"evt_01J9X7Z0K7Q8W3F2P1N6M5V4R3"

object
string
required
Allowed value: "event"
type
enum<string>
required
Available options:
task.completed,
task.failed,
task.cancelled
created_at
string<date-time>
required
data
object
required

A generation task. error is always present (null unless the task failed); other empty members are omitted.

Response

200

Any 2xx within 10 seconds marks the event as delivered; it is not sent again.