How to get started with Midjourney API with GoAPI

C. Fontenot
3 min readSep 25, 2023

--

Posted on 2023/09/25, by GoAPI

Hi developers! We are very excited to make this introductory tutorial to show you how you can get started with Midjourney API developed by the GoAPI team!​

Full disclosure, this is not an official API by Midjourney. We are a team of computer graphics experts and backend engineers. With the advent of generative AI, we fell in love with Midjourney, and thought this neat API service can help a lot of developers to be incorporated into their existing workflow.​

To get started, go to GoAPI’s Docs and click on “Midjourney API”, then you would be able to see the list of endpoints that we currently offer (and we are constantly maintaining and adding more endpoints).

A screenshot of GoAPI’s Midjourney API documentation, showing the list of available endpoints.

You can also see the different processing modes that we offer: “mixed mode” from GoAPI means that your task will either be processed under Midjourney’s relaxed or fast mode, “fast mode” from GoAPI means that your task will only be processed under Midjourney’s fast mode, and “turbo mode” from GoAPI means that your task will only be processed under Midjourney’s turbo mode.

Different operation modes under Midjourney API

If you go to our documentation’s pricing plan, you can see the pricing info we have for both Midjourney and Stable Diffusion API.

Under the PPU (Pay Per Use) option for Midjourney, each API call will work out to be about $0.015USD for mixed mode, $0.045USD in fast mode, and $0.1USD in turbo mode.

Thus, if you do the math on how many pictures you use per month, you will find that our pricing is very competitive for your needs.​

We also offer the option of trying our service for free when you sign up for our Dashboard (for which you get free credits) — it is a great way to test the API and see if that would fit into your existing workflow.

Then, we are going to use Postman to test out the Midjourney API service with the following steps:

  • Download/open up Postman, create a new HTTP request, change the request to POST.
  • Under Headers, type “X-API-KEY” under the Key, and your API key under Value.
  • Under Body, click “raw”. and copy the python code from our docs into the body.
  • And press the Send button
  • Next, create a new HTTP request, change the request to POST. Find the Fetch endpoint in our documentation, copy the endpoint url and do the following as shown in the screenshot below. Press Send, and you would get the URLs to your picture in the Response.

When you send the fetch request, the result might say “pending” or “processing” instead of “finished” which means that you would have to wait for a bit and then re-send the fetch post request. If you don’t want to wait, you could also use the webhook function, which will send you a message automatically after the task in completed. We will cover how to use the webhook in another tutorial.

Finally, copy the returned URL into your web browser to retrieve your picture!

And that is how your get started with Midjourney API in a few minutes with GoAPI. Thank you for getting this far through the tutorial, and feel free to share our service with anyone who might find it useful — we are immensely grateful! :D

The returned Midjourney picture accessed through the fetched link

--

--

C. Fontenot

AI and software engineering with deep expertise in 3D computer graphics, dev ops, and generative AI. Passionate about AI-related applications!