Skip to main content
POST
cURL

Authorizations

API-KEY
string
header
required

You can obtain your API key from the Midjourney-api Dashboard.

Body

application/json
prompt
string
required

Text prompt for image generation. Since this is a reverse-engineered model, it's recommended to include keywords in your prompt such as: "draw a xxx", "generate a", 'draw a xxx', Language is not restricted; OpenAI itself supports multilingual models with excellent Chinese support.

Example:

"draw a boy play with a girl"

model
enum<string>

Supported models: gpt-image-2

Available options:
gpt-image-2
Example:

"gpt-image-2"

referImages
string[]

Reference image array

Example:
aspect_ratio
enum<string>

Support model: gpt-image-2; Available options: 1:1, 3:4, 4:3, 16:9, 9:16

Available options:
1:1,
3:4,
4:3,
16:9,
9:16
Example:

"1:1"

hookUrl
string

Callback notification URL

Example:

"https://api.example.com/webhook"

Response

Request successful

status
integer
required

Status code, 0: success; 1001: quota not enough,1002 concurrency limit, max 10

Example:

0

data
object
required
message
string

Message

Example:

"success"