Skip to main content
POST
/
mj
/
submit
/
imagine
Create a Midjourney imagine task
curl --request POST \
  --url https://api.cometapi.com/mj/submit/imagine \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "a paper boat floating on calm water at sunrise --v 6.1"
}
'
{
  "code": 1,
  "description": "提交成功",
  "result": "1773314942177684",
  "properties": {
    "discordChannelId": "5e6ca8e1f40e4de6",
    "discordInstanceId": "5e6ca8e1f40e4de6"
  }
}
Use this endpoint to start the main Midjourney workflow. Every later step, including upscale, variation, and custom zoom, begins with a successful imagine task.

What the first response gives you

  • result is the task id you will poll next
  • description is a wrapper message and may be localized
  • code can still be a success code even when it is not HTTP-style 200

Core workflow

1

Submit the imagine task

Send the prompt and store the returned task id.
2

Poll until the task finishes

Use Fetch Single Task until the task reaches SUCCESS, MODAL, or FAILURE.
3

Continue with post-processing

When buttons appear, use Action for upscale, variation, reroll, zoom, and similar follow-up operations.

Optional video prompt pattern

If you want motion from a source image, add an image URL plus Midjourney video flags in the prompt, such as --video and --motion.
Live validation on 2026-03-12 confirmed that a FAST imagine request returned a task id immediately, and the subsequent fetch request reached SUCCESS with an imageUrl and 9 action buttons.

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your CometAPI key.

Body

application/json
prompt
string
required

Text prompt for the generation. Supports standard Midjourney parameters such as --v, --ar, --stylize, etc.

Example:

"a paper boat floating on calm water at sunrise --v 6.1"

botType
enum<string>
default:MID_JOURNEY

Bot type to use. MID_JOURNEY for Midjourney (default), NIJI_JOURNEY for Niji.

Available options:
MID_JOURNEY,
NIJI_JOURNEY
accountFilter
object

Filter which Midjourney account modes may be used for this task.

base64Array
string[]

Base64-encoded reference images. Each item should be a data URI such as data:image/png;base64,xxx.

state
string

Custom state string. Returned as-is in the task result and webhook callback for your own tracking.

Response

200 - application/json

Task accepted.

code
integer
required
description
string
required
result
string
required

Task id returned after submission.

properties
object