Payload structure
Every event shares the same envelope:JSON
Event type - one of the values below.
Timestamp when the event was dispatched (ISO 8601).
Unique delivery identifier (UUID). Use this for idempotency.
Generation snapshot that triggered the event.
webhook_data
Only fields with values are included. Optional fields are omitted (not set to null) when they do not apply to the event.
| Field | Present on |
|---|---|
| account_id | All events |
| model_identifier | All events |
| generation_provider_initialize | generation.started |
| generation_provider_used | generation.completed |
| generation_status | All events |
| generation_prediction_id | generation.started, generation.completed |
| generation_id | All events |
| generation_output_file | generation.completed |
| generation_error | generation.failed |
| generation_error_code | generation.failed |
| credits_refunded | generation.canceled |
generation.started
Fired when BabySea has submitted the generation to an inference provider and processing has begun. Use this event to track that a generation is in-flight.
- The
webhook_data.generation_statuswill beprocessing.
JSON
generation.completed
Fired when all output images have been generated and stored.
- The
webhook_data.generation_statuswill besucceeded. - The
webhook_data.generation_output_filewill contain the output URL.
JSON
generation.failed
Fired when all inference providers in the failover chain returned errors or timed out.
- The
webhook_data.generation_statuswill befailed. - No credits are charged for failed generations.
JSON
generation.canceled
Fired when the user called POST /image-generation/{generation_id}/cancel.
- The
webhook_data.generation_statuswill becanceled. - The
credits_refundedfield indicates whether credits were refunded for this generation.
JSON
webhook.test
Fired when you click Send test event in your BabySea workspace. Use this event to verify that your endpoint is reachable and correctly verifying signatures.
- Test events use a fixed
generation_idof00000000-0000-0000-0000-000000000000and are not retried on failure. You can send another test event manually.
JSON