No-code integrations

Midjourney in n8n

You could call our API from n8n with HTTP Request nodes, but there is no need: our node, n8n-nodes-userapi, has all the methods in it and is verified by n8n, so you can install it right from the nodes panel.

Updated

Installing

  1. On the canvas open the nodes panel: + or the N key.
  2. Search for UserAPI. The node is under More from the community at the bottom of the panel.
  3. Open it and click Install. The instance owner or an admin can do this, on n8n Cloud and on self-hosted n8n.

On self-hosted n8n you can also install it by package name in Settings → Community Nodes: n8n-nodes-userapi. The package is on npm, the code on GitHub.

Key

Create UserAPI API 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

OperationWhat it does
ImagineGrid of four pictures from a prompt
UpscaleOne picture from the grid (1-4)
UpsampleUpscale Subtle / Creative / 2x / 4x
Variation, Vary Subtle, Vary Strong, RerollVariations, with a prompt if Remix is on
AnimateVideo from an upscaled picture
InpaintVary Region, mask in base64
ZoomZoom Out (50 / 75) or Custom Zoom with a prompt
PanRight, left, up, down
Blend2 to 5 images
DescribeFour prompts for an image
Upload, SeedUpload an image to Discord; seed of a task
Info, Speed, Toggle Remix ModeAccount plan info; relax/fast/turbo; Remix on/off
StatusTask by hash

Example: prompt → picture → file

  1. Any trigger that gives you a prompt: a form, a schedule, a new row in Google Sheets, a Telegram message.
  2. UserAPI → Imagine with that prompt. It outputs the task hash.
  3. Wait for 30-60 seconds, then UserAPI → Status with the hash. After it an If on status: not done yet, back to Wait; error, stop.
  4. UserAPI → Upscale with the hash and choice 1-4, then the same Wait/Status loop.
  5. HTTP Request downloads result.url, and the file goes to Google Drive, S3 or wherever you keep images.

This flow is ready to import, together with a Telegram bot and bulk generation from Google Sheets: three example workflows.

With a webhook

In the generation operations open Additional Fields and add Webhook URL and Webhook Type. 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 there, 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 node n8n-nodes-userapi is verified by n8n and does the job: with your own Midjourney account, or without one on UserAPI Cloud.

Does it work on n8n Cloud?

Yes. The node is verified by n8n, and verified community nodes can be installed on n8n Cloud as well as on self-hosted n8n. The instance owner or an admin installs it from the nodes panel.

Are there ready workflows?

Yes, three to import: generate and upscale, a Telegram bot, and bulk generation from Google Sheets to Google Drive.

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.

See also

Use image generation Magic with UserAPI