There are no official API from Midjourney.
I'm using ImaginePro, which is not official as well, but an alternative API tool.