Image Events
Image Completed
The request example illustrates what your webhook endpoint should expect.
post/image.completed
Headers
magic-hour-event-signaturestring required
A signatured created with the webhook secret key and a signed_payload, using HMAC with SHA-256
Example:3e771b50c...
magic-hour-event-timestampstring required
Time in seconds since the epoch. Use this value to check whether the request is within a reasonable window of the current time. Usually less than 5 minutes.
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"
}