/imagineapi

The MidJourney API (unofficial)

Primary LanguageTypeScriptOtherNOASSERTION

ImagineAPI.dev — Midjourney API 👋

To get started with self-hosted version, go here.

To get us to setup for you and handle the hard work, try a Cloud Plan

Contributing

  1. Follow these steps to setup a Discord bot with Midjourney
  2. Create a .shared.env file using these instructions.
  3. Run docker compose -f docker-compose.dev.yml build to build the contianers from source.
  4. Start the containers using docker compose -f docker-compose.dev.yml up -d

If you run into issues, log them here.

Troubleshooting

If you encounter issues, you can run docker compose -f docker-compose.dev.yml logs api or docker compose -f docker-compose.dev.yml logs bot to see logs for the api or bot services respectively.

Architecture

There are 3 services at work: API, RabbitMQ, Bot as follows:

In more detail, this is roughly how things work:

License

ImagineAPI is licensed under the Elastic License 2.0 (ELv2) license because it provides the best balance between freedom and protection. The ELv2 license is a permissive license that allows you to use, modify, and distribute ImagineAPI as long as you follow a few simple rules:

  1. You may not provide ImagineAPI's API to others as a managed service. For example, you cannot host ImagineAPI yourself and sell it as a cloud-based licensing service, competing with ImagineAPI Cloud. However, you can sell a product that directly exposes and utilizes ImagineAPI's API, as long as ImagineAPI cannot be used outside of your product for other purposes (such as your customer using an embedded ImagineAPI instance to license their product in addition to your product).

  2. You may not alter, remove, or obscure any licensing, copyright, or other notices.

Anything else is fair game. There's no clause that requires you to open source modifications made to ImagineAPI or other derivative works.

You can embed ImagineAPI in your on-premise application.

You can run ImagineAPI on a private network.

You can fork ImagineAPI into a private repo.

If the ELv2 license doesn't work for your company, please reach out.

The license is available here.