Install
Provider source
Supported models and options, settings, and how failures are reported.
Usage
SetMAGIC_HOUR_API_KEY in your terminal and save this as generate.mjs. Keep the key server-side.
node generate.mjs, then open magic-hour-video.mp4 in the same folder.
Keep the video resolution at 480p on the Free plan. With ltx-2.5 selected explicitly, leaving out the resolution defaults to 720p. See the resolution rules.
For text-to-video, pass a string prompt.
Generations consume Magic Hour credits, and the provider never retries a paid request. Once a job is accepted, every error is a MagicHourError with its projectId. Retrieve that project instead of generating again. To keep the ID even if your process stops, save it in onProjectCreated: