Install and configure
Requires Python 3.11+ and Haystack 3.4. Install the published source at this verified revision:MAGIC_HOUR_API_KEY in the process environment. The generator and waiter default to
Haystack’s Secret.from_env_var("MAGIC_HOUR_API_KEY"); serialized pipelines retain the variable
name, not its value. Keep keys out of source, shell history, and saved pipeline definitions.
Create once, then resume
Run the repository’s image Pipeline example:output/bird/project.json before polling. The second runs a separate status/download
Pipeline against that ID and saves the image as image-1.bin. Inspect the image format before
renaming it.
Keep project.json and reuse the same output directory after a timeout or download failure.
Repeating the second command retrieves the existing project without submitting another generation.
A missing receipt causes creation, so use a new output directory only when you intend another paid
job. If creation loses its response, check the Developer Hub before submitting again: the service
may have accepted a job whose ID the example could not save.
The downloader returns native Haystack ByteStream objects, keeps signed download URLs intact,
and sends no API authorization to media storage. A fresh status lookup refreshes temporary links.
Prompts are sent to Magic Hour for generation; see our privacy policy.