Download the PHP package yc-open/midjourney without Composer

On this page you can find all versions of the php package yc-open/midjourney. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package midjourney

PHP-midjourney-proxy

使用PHP实现代理 MidJourney 的discord频道,用最简单的方式调用AI绘图。

前段时间四处寻找midjourney的绘画接口,交了好几万的学费,现在我终于自己写出来了,而且还开源出来且是PHP版本。

PHP降低了门槛,过一段时间就会全网沸腾。。。

本项目仅实现基本思路,全网第一个PHP版本实现的Midjourney-proxy,如果觉得对你有帮助,给个star。

现有功能

后续计划

注意事项

  1. 本项目仅作为参考示例,已经跑通整个流程
  2. 因市面上暂无Midjourney的开源代理项目,所以参考了Github的Java项目改成了PHP版本的
  3. Java版项目地址:https://github.com/novicezk/midjourney-proxy
  4. 本项目仅作为研究交流使用,如果有借鉴本项目思路或代码,还请给个链接,尊重下劳动成果,谢谢。

作者微信

交流群二维码

应用项目

安装方式

你可以使用Composer安装此库,在项目目录中运行以下命令:

使用方式

要使用midjourney生成图像,首先需要创建Midjourney类的实例:

参数1:$channel_id

将此值替换为安装Midjourney的频道ID,右键单击频道可以获得频道ID,然后复制频道ID。 请记住,你可以邀请中途机器人到你自己的服务器来工作 https://docs.midjourney.com/docs/invite-the-bot

参数2:$oauth_token

Discord不允许使用自动用户帐户(self-bots),如果发现,可能会导致帐户终止,因此使用该帐户的风险自负。 要获取用户令牌,请访问 https://discord.com/channels/@me ,然后打开“开发人员工具”中的“网络”选项卡。在请求之间查找授权标头。

请求方法

本方法使用提示生成图像,并返回表示包含生成图像的消息的对象。$prompt参数是一个将用于生成图像的字符串。

本方法放大给定对象中包含的图像,并返回放大图像的URL。$imagine_object参数是从imagine/getImagine方法返回的对象。$upscale_index参数是一个介于0和3之间的整数,表示我们要升级的MJ机器人提供的选项。


All versions of midjourney with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
guzzlehttp/guzzle Version ^7.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yc-open/midjourney contains the following files

Loading the files please wait ....