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

  1. In n8n open Settings → Community Nodes.
  2. Install, package name n8n-nodes-userapi.
  3. 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

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.

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.

See also

Use image generation Magic with UserAPI