Can we use MidJourney's API with ChatGPT

I saw this video where someone created using a script written by ChatGPT and MidJourney’s avatar.

Would it be possible to directly create images within ChatGPT by somehow calling MidJourney’s API?

Link to the video: Create your own realistic AI Avatar | AI image generator - YouTube

They also had another video on the channel where they directly created pictures in ChatGPT using pollination ai’s API so I was wondering if that could be done with MidJourney too?

Link to the second video: How to generate images using ChatGPT (No other tools needed) - Text to image AI - YouTube

I was literally thinking the same thing, hense why I am here!! lol
I mean I see all the ChatGPT chrome extensions built from the API, and I have a midjourney from Github installed on my computer, so why couldn’t we just connect the two? Like have midjourney triggered by some sort of webhooks in the prompts and responses. Basically looking out for trigger words to where it would then pick up on any following key descriptions. Intern creating the corresponding image.
I mean it just makes sense to me! However I am not a programmer though. I just play one on TV, so forgive me I used incorrect terms. Ican still understand programming and read it, just not write it.
Either way I say let’s do it!

Сan use the gpt3 API to determine if it’s a request to generate a photo.
If custom API keys will be used then I will try to do this

if you are asking for midjourney’s api, this could help:

You can call Midjourney via unofficial API, you can use curl / Python / JavaScript or really any language since it is just a simple REST API call.