How to create AI Images (Midjourney) by code?
Asked Answered
H

6

5

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?

Hirudin answered 9/1, 2023 at 11:19 Comment(4)
You don't. The service currently isn't designed for such usage.Selfconsequence
it should be, its would be more usedNauseating
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. BillStimulate
A reminder: Per Midjourneys TOS any kind of automation will get your account banned.Judiejudith
F
3

Take a look at thenextleg.io (closed service) userapi.ai, it has an API available for Midjourney there.

You will need a webhook URL to receive responses

Fabron answered 24/3, 2023 at 2:9 Comment(1)
A reminder: Per Midjourneys TOS any kind of automation will get your account banned.Judiejudith
C
2

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

Chromogen answered 30/3, 2023 at 17:15 Comment(1)
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 How to Answer. That way you could also reduce the risk of being considered a self-promoter (and there are worse expression for that....). Compare stackoverflow.com/help/promotionGlory
W
1

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

Waring answered 14/3, 2023 at 16:0 Comment(0)
O
1

You can use any of the services for working with Midjourney via API. For example tnl (they have a very good community, but lately, of course, there have been a lot of complaints and account bans), on the downside, the service is paid for

You can use free services, the same userapi.ai

In any case, you need to have a Discord account and a subscription in this account on Midjourney

Oro answered 10/10, 2023 at 8:2 Comment(0)
V
1

Take a look at ttapi.io, it has an availableMidjourney Api. also can use v6

Vestige answered 10/1, 2024 at 4:46 Comment(0)
T
0

The most popular Midjourney APIs are APIFRAME, ImagineAPI and MyMidjourney.

Keep in mind that none of them is official, they are tools developed by third-parties.

Takara answered 30/10, 2024 at 16:39 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.