如何通过代码创建AI图像(Midjourney)?

huangapple go评论111阅读模式
英文:

How to create AI Images (Midjourney) by code?

问题

我想创建一个能生成Midjourney图片的应用程序。

问题在于Midjourney没有提供API,它是通过Discord运行的。

如何自动化生成图片的过程,而不需要打开Discord?

英文:

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?

答案1

得分: 2

请查看thenextleg.io,它提供了一个用于Midjourney的API。

您将需要一个Webhook URL来接收响应。

英文:

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

You will need a webook URL to receive responses

答案2

得分: 2

如果您想使用您自己的Midjourney帐户并将其托管为您自己的API服务,您可以查看GitHub上的项目,例如Midjourney Proxy(https://github.com/novicezk/midjourney-proxy)。

如果您正在寻找现成的服务提供商,可以考虑以下选项:

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

midjourneybyapi:https://midjourneybyapi.cloud/

goapi:https://goapi.ai

英文:

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

答案3

得分: 1

你可以使用OpenAI API来进行图像生成(DALL·E),但这并不是免费的。

DALL·E API

英文:

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

答案4

得分: 1

请查看此指南:

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

还要阅读有关完全自动化的评论-有第二篇文章解释如何使用GUI自动化进行操作:

Discord API不允许使用机器人发送命令。因此,如果您计划使用Discord API发送"/imagine"命令,那就没戏了。唯一有效的方法是使用GUI自动化。查看我最近关于这个主题的文章:
https://medium.com/@neonforge/how-to-automate-midjourney-image-generation-with-python-and-gui-automation-ac9ca5f747ae

英文:

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

huangapple
  • 本文由 发表于 2023年1月9日 19:19:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/75056524.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定