Skip to main content
POST
/
v3
/
async
/
mj-txt2img
Midjourney Text-to-Image
curl --request POST \
  --url https://api.highwayapi.ai/v3/async/mj-txt2img \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "text": "<string>"
}
'
{
  "task_id": "<string>"
}
Use the Midjourney image generation model to quickly generate high-quality images from text descriptions. This API uses asynchronous processing, so the client needs to query the final generated result using the task_id.

Request Headers

Content-Type
string
required
Enum value: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API key}}.

Request Body

text
string
required
Text information used to describe the desired image content.Length limit: 1-8192 characters.

Response Parameters

task_id
string
required
The task_id of the asynchronous task. You should use this task_id to request the Get Task Result API to obtain the generated result.