v15

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-019074.6 KB
Video Events

Video Started

The request example illustrates what your webhook endpoint should expect.

post/video.started

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

type'video.started' required

Example request

{
  "payload": {
    "id": "cuid-example",
    "name": "Example Name",
    "status": "complete",
    "type": "FACE_SWAP",
    "width": 512,
    "height": 960,
    "end_seconds": 15,
    "credits_charged": 450,
    "fps": 30,
    "error": {
      "message": "Please use an image with a detectable face",
      "code": "no_source_face"
    },
    "downloads": [
      {
        "url": "https://videos.magichour.ai/id/output.mp4",
        "expires_at": "2024-10-19T05:16:19.027Z"
      }
    ]
  }
}

Response

Success

messagestring required

Example response

{
  "message": "Success message from your endpoint"
}
All 9 operations