Image Events
Image Started
Changed onThe request example illustrates what your webhook endpoint should expect.
post/image.started
Request
- Base URLhttps://your-webhook.com
- URLhttps://your-webhook.com/image.started
- Authnone declared. Required headers: magic-hour-event-signature, magic-hour-event-timestamp
Headers
magic-hour-event-signaturestring required
A 64-character hexadecimal HMAC-SHA256 signature. Use the complete webhook secret, not an API key, to sign the timestamp header, a period, and the exact raw request body.
Example:3e771b50c...
magic-hour-event-timestampstring required
Unix time in seconds for this delivery attempt. Reject missing or invalid timestamps; a five-minute window before or after the current time is recommended to limit replay.
Example:1730742038
Request body
Example request
{
"payload": {
"id": "cuid-example",
"name": "Example Name",
"status": "complete",
"image_count": 1,
"type": "AI_IMAGE",
"credits_charged": 5,
"downloads": [
{
"url": "https://videos.magichour.ai/id/output.png",
"expires_at": "2024-10-19T05:16:19.027Z"
}
],
"error": {
"message": "Please use an image with a detectable face",
"code": "no_source_face"
}
}
}Response
Success
Example response
{
"message": "Success message from your endpoint"
}Changes
- warning
removed the request property
/
- warning