3

I want to create an app that creates Midjourney images.

The problem is that Midjourney doesn't provide an API, it works from Discord.

How to automate the process of image generation without the need to open Discord?

Ehab
  • 566
  • 6
  • 24
  • 3
    You don't. The service currently isn't designed for such usage. – Anu6is Jan 09 '23 at 12:46
  • 2
    it should be, its would be more used – Bill Mar 10 '23 at 19:06
  • Good luck getting Midjourney working with Discord ... I wasted a day on this. Discord is an auto-loaded pie in your face. Win 10/64. progra,mmer for > 25 years. Bill – BillW Aug 19 '23 at 05:44

4 Answers4

2

Take a look at thenextleg.io, it has an API available for Midjourney there.

You will need a webook URL to receive responses

njho
  • 2,023
  • 4
  • 22
  • 37
2

If you want to use your own Midjourney account and host it as your own api-service, you could check out projects like Midjourney Proxy (https://github.com/novicezk/midjourney-proxy) on GitHub.

If you are looking for off-the-shelf service providers, there are

nextleg: https://www.thenextleg.io/

midjourneybyapi: https://midjourneybyapi.cloud/

goapi: https://goapi.ai

js_7536
  • 36
  • 1
1

You may do such for Image generation (DALL·E) by using OpenAI API. But it's not free at all Dall-e API

fatihyildizhan
  • 8,614
  • 7
  • 64
  • 88
1

Checkout this guide:

https://medium.com/@neonforge/how-to-create-a-discord-bot-to-download-midjourney-images-automatically-python-step-by-step-guide-3e76d3282871

Also read the comment regarding full automation- there a second post explaining how to do it using GUI automation:

Discord API doesn’t allow sending commands by using bot. So if you are planning to send ‘/imagine” command by using Discord API you are out of luck. The only working way is a GUI automation. Check my recent article on this topic https://medium.com/@neonforge/how-to-automate-midjourney-image-generation-with-python-and-gui-automation-ac9ca5f747ae

roeiba
  • 156
  • 12
  • Note that linked content is not considered part of an answer here. So if you don't think that "GUI automation" is a helpfully detailed answer you might want to [edit] and improve according to [answer]. That way you could also reduce the risk of being considered a self-promoter (and there are worse expression for that....). Compare https://stackoverflow.com/help/promotion – Yunnosch Mar 30 '23 at 17:20