No-code integrations
Midjourney in n8n
You could call our API from n8n with HTTP Request nodes, but there is no need: we published a community node, n8n-nodes-userapi, with all the methods already in it.
Updated
Installing
- In n8n open Settings → Community Nodes.
- Install, package name
n8n-nodes-userapi. - After that the UserAPI node shows up in the node list.
Needs n8n 1.80.0+ and Node.js 18.10+. The package is on npm, the code on GitHub.
Key
Create UserAPI credentials in n8n and paste the API key, the node adds the headers itself. No key yet? Here is how to get one, the first 50 requests are free.
Operations
| Operation | What it does |
|---|---|
| Imagine | Grid of four pictures from a prompt |
| Upscale | One picture from the grid (1-4) |
| Upsample | Upscale Subtle / Creative / 2x / 4x |
| Variation, Vary Subtle, Vary Strong, Reroll | Variations, with a prompt if Remix is on |
| Animate | Video from an upscaled picture |
| Inpaint | Vary Region, mask in base64 |
| Zoom | Zoom Out (50 / 75) or Custom Zoom with a prompt |
| Pan | Right, left, up, down |
| Blend | 2 to 5 images |
| Describe | Four prompts for an image |
| Upload, Seed | Upload an image to Discord; seed of a task |
| Info, Speed, Toggle Remix Mode | Account plan info; relax/fast/turbo; Remix on/off |
| Status | Task by hash |
Example: prompt → picture → file
- Any trigger that gives you a prompt: a form, a schedule, a new row in Google Sheets, a Telegram message.
- UserAPI → Imagine with that prompt. It outputs the task
hash. - Wait for 30-60 seconds, then UserAPI → Status with the hash. After it an If on
status: notdoneyet, back to Wait;error, stop. - UserAPI → Upscale with the hash and
choice1-4, then the same Wait/Status loop. - HTTP Request downloads
result.url, and the file goes to Google Drive, S3 or wherever you keep images.
With a webhook
The generation operations have Webhook URL and Webhook Type fields. Put the URL of a Webhook node from a second workflow there. When the task is ready, that workflow gets the task with status, result.url and hash. Imagine also has a Callback ID field, handy for matching the result with your own record.
Try it on 50 free requests
Register, add a Discord account that has Midjourney, and you get an API key. The first 50 requests are free and you don't need to enter a card. Since 2023 more than 10,000 people have signed up and sent over 8 million requests through the API.
Questions
Is there a Midjourney node in n8n?
Not a built-in one, since Midjourney has no official API. Our community node n8n-nodes-userapi does the job and works through your own Midjourney account.
Which n8n version?
1.80.0 or newer, on Node.js 18.10+.
What about n8n Cloud?
On self-hosted n8n the node is installed via Settings > Community Nodes. Whether a given community node can be used on n8n Cloud is decided by n8n, so check their current rules.
Wait + Status or a webhook?
For a simple workflow a loop with Wait and Status is enough. If there are many images, a webhook is more convenient: results arrive in a separate workflow with a Webhook node.