Skip to main content
WEBHOOK

Headers

webhook-id
string
required

Event ID, the same on every retry of a delivery; use it to drop duplicates.

webhook-timestamp
string
required

When the delivery was sent, in Unix seconds.

webhook-signature
string
required

Space-separated v1,<base64> HMAC-SHA256 signatures of <webhook-id>.<webhook-timestamp>.<body>, made with your webhook signing secret (whsec_…).

Body

application/json

The finished generation, as GET /generations/{id} returns it.

id
string
required

ID of the generation.

Pattern: ^gen_
model
string
required

Slug of the model, as submitted.

status
enum<string>
required

The terminal state.

Available options:
succeeded,
failed
input
object
required

The input, normalized: input assets point at Codzen copies; other fields are as submitted.

outputs
object[]
required

Delivered outputs; empty until the generation succeeds.

cost
object
required

What the generation costs.

error
object | null
required

Why the generation failed; null unless it failed.

created_at
string<date-time>
required

ISO 8601 time in UTC.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
started_at
string<date-time> | null
required

When processing started; null while queued.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
completed_at
string<date-time> | null
required

When the generation finished; null until then.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$

Response

200

Received. Any 2xx status ends the delivery; any other answer is retried.