Magic Hour
  • Pricing
Video

Start your first video in under 60 seconds

Generate or edit video, image, and audio - free to start.
Start Creating Free
No credit card requiredFree daily creditsNo signup required
Join the Discord
Video
Company
PricingAboutBlogAPIAll ToolsTemplatesAI ModelsPrivacy PolicyTerms of ServiceRefund Policy
Video Products
AI Avatar GeneratorAI UGC Ad GeneratorAI Video DubbingAI Video EditorAI Video ExpanderAI Video ExtenderAI Video TranslatorAI Video UpscalerAnimationAudio-to-VideoCharacter ReplaceColor GraderFace Swap VideoImage-to-VideoLip SyncMusic Video GeneratorSubtitle GeneratorTalking PhotoText-to-VideoVideo ColorizerVideo-to-Video
Image Products
AI Clothes ChangerAI Face EditorAI GIF GeneratorAI Headshot GeneratorAI Image EditorAI Image ExpanderAI Image GeneratorAI Image UpscalerAI Influencer GeneratorAI Meme GeneratorAI Selfie GeneratorAI Storyboard GeneratorBackground RemoverBody SwapFace Swap PhotoHead SwapPhoto ColorizerQR Code GeneratorCharactersMoodboards
Audio Products
AI Audio TranslatorAI Music GeneratorVideo-to-AudioVoice ChangerVoice ClonerVoice Generator
Support
CommunityFAQHelp CenterContact UsStatus
Social
Instagram
X
TikTok
Facebook
YouTube
LinkedIn
support@magichour.ai
Backed byCombinator

© 2026 Magic Hour AI, Inc.

Back to Blog
  1. Blog
  2. Guides

Image-to-video in n8n: Magic Hour API workflow

Runbo Li
Runbo Li
·
CEO of Magic Hour
·
Sep 10, 2025· 9 min read
AI Summary:
ChatGPTClaudeGeminiPerplexity
Magic Hour AI x N8n

Contents

Create with Magic Hour
Make videos and images with AI.

To automate image-to-video in n8n, submit a supported image and prompt to the generation API, save the returned project ID, wait for the job to finish, then retrieve the output URL. Poll the existing job instead of submitting another generation when a status request fails. Use Magic Hour’s current API documentation for request fields and the selected model’s limits.

Connecting Magic Hour AI with n8n

Welcome! In this post, we’ll show you how to integrate Magic Hour AI with n8n to automate image to video. Whether you're a seasoned automation expert or just starting your journey with no-code tools and APIs, this guide is designed to help you seamlessly connect Magic Hour AI's powerful video generation capabilities with your n8n workflows.

What to Expect

This guide will walk you through the entire process, from setting up your Magic Hour AI account and obtaining your API key to building and testing various API requests within n8n and we attached a video at the end for your understanding, to guide you

How to Best Use This Guide

This document is structured to allow you to quickly find the information most relevant to your needs.

  • For a complete overview: Start from the beginning and follow the steps sequentially to understand the foundational setup and connection process.
  • Troubleshooting: Throughout the guide, you'll find important tips and common error messages to help you troubleshoot any issues you might encounter.

By the end of this guide, you'll be able to leverage the power of Magic Hour AI directly within your n8n workflows, automating creative tasks and bringing your ideas to life!

Some tips when connecting Magic Hour and n8n

  • Store the API key in an n8n HTTP Header Auth credential: header name Authorization, value Bearer followed by your key. Select that credential on the submit and status-request nodes. Keep real keys out of shared workflow JSON. See n8n HTTP Request authentication.
Magic Hour AI x N8n 1 imageMagic Hour AI x N8n 2 image
  • Before you dive into using any Magic Hour API to create videos or images, you'll want to check out their documentation (docs.magichour.ai). It'll tell you all the fields you need to fill in. For example, if you're using the Image Background Remover API, you'll first need to figure out what parameters it requires.


Just to give you an idea, the image_file_path field would be a must-have. If you don't provide that, you'll end up with a server error.

{"message": "Missing Request Body"}

Magic Hour AI x N8n 3 image


Create an Account on Magic Hour AI and Obtain API Key

  1. Create an account

    Go to Magic Hour AI and sign up
Magic Hour AI x N8n 4 image

Animate your own image

Upload a source image to Magic Hour, describe the motion and camera behavior, and review a short draft before generating more variations.

Try Image-to-Video
  1. Get your API Key
  • After logging in, go to the Developer Hub
Magic Hour AI x N8n 4 image
  • Go to  API KEYS and click on Create API Key (you can name it anything).
Magic Hour AI x N8n 5 image
  • Copy the key and save it somewhere safe (it won’t be shown again).

3. Always open documentation where you copy curL request from , so you can see the proper fields and usage of api.

Magic Hour AI x N8n 6 image


Image to Video

  •  POST Request
  • Go to the docs .
  • Copy the curL request.
Magic Hour AI x N8n
  • Go to n8n , add a HTTP Request and import the curL you copied from doc.
Magic Hour AI x N8n 8 image
Prepare your workflow in n8n
  • Open n8n and start a new workflow.
  • Choose a trigger (something that starts the workflow, e.g., manual or scheduled trigger), I am choosing manual.
Magic Hour AI x N8n 9 image
Add the API request
  • In the workflow, add a new node from Core → HTTP Request (or cURL request).    
Magic Hour AI x N8n 10 imageMagic Hour AI x N8n 11 image
  • Paste the cURL code you copied earlier into the import curl box.
  • Remove any imported example Authorization header and select your saved Header Auth credential. Keep only one Authorization header on the request.
Magic Hour AI x N8n 12 image

Add Wait Node after POST request

  • Use a Wait node between status checks, then loop back to GET the same project. A fixed delay does not establish that generation is complete. Set an overall timeout appropriate to your workflow.
  • Check the chosen endpoint’s documented formats and input fields. For uploaded media, use the asset-upload workflow and returned file_path; a third-party URL or file extension alone does not establish that the input is accepted.
  • Use a Wait node between status checks, then loop back to GET the same project. A fixed delay does not establish that generation is complete. Set an overall timeout appropriate to your workflow.
Magic Hour AI x N8nMagic Hour AI x N8n 13 image

Add another node and add GET the video

  • Go to Get video details .
  • Copy the curL request.
Magic Hour AI x N8n new image
  • Now , go to n8n node panel and add GET request from HTTP Request ( after wait ) 
Magic Hour AI x N8n 14 image
  • Select the same saved Header Auth credential on this GET request. Use the project ID returned by the original POST; keep it available across the polling loop.
Magic Hour AI x N8n 14 image
  • Run the status request and inspect status before reading downloads. Continue polling queued or rendering jobs; stop and inspect error or canceled jobs.
  • Only when status is complete and downloads contains an item, pass {{ $json.downloads[0].url }} to a separate GET node configured to return a file. Do not send your Magic Hour Authorization header to the download URL.
Magic Hour AI x N8n 15 imageMagic Hour AI x N8n 3 image
  • And now you can see your generated Video

Basic Workflow

Magic Hour AI x N8n image

Video For Reference


        

Handle completion, failure and expiring downloads

Get video details returns the project status. Keep polling the existing ID while it is queued or rendering. Download only after complete; route error or canceled to a failure branch. A temporary status-request failure is not a reason to submit another paid generation.

Save the downloaded file to your destination storage. Output URLs expire: if a completed job's link has expired, fetch its details again for a fresh download link. Keep the project ID with the workflow record so you can recover the output without generating it again.

The earlier screenshots and reference video below illustrate the workflow's original interface. Follow the current authentication and status-handling instructions above when building a new automation.

Runbo Li
Runbo Li is the Co-founder and CEO of Magic Hour, where he builds AI video and image tools for content creation. He is a Y Combinator W24 founder and former Data Scientist at Meta, where he worked on 0-1 consumer social products in New Product Experimentation. He writes about AI video generation, AI image creation, creative workflows, and creator tools.
See all articles

Continue Reading

Collage of the best AI image generator logos
App Picks
10 best AI image generators: features, costs and examples
Oct 27, 2025
AI-generated sports highlight image of two basketball players using Magic Hour.
GuidesVideos
How to create a sports highlight reel: the ultimate playbook
Sep 18, 2025
Prompting AI Videos Cover
Videos
How to prompt AI videos: 10 tips for better results in 2026
May 21, 2024
Top AI video generators for YouTube content creation, featuring avatars, text-to-video, and style transfer tools
Videos
10 best AI video generators in 2026: models, features, and costs
Nov 23, 2025
Face Swap Example
Face Swap
Face swap video tips: fix blur, flicker and bad blending
Jan 16, 2025
How to Lip Sync a Video With AI
Videos
How to lip sync a video with Magic Hour: 5 steps
Jun 24, 2026