Get API Key Get API
Docs

Imagine (text-to-image)

Midjourney text-to-image / image-guided generation. The default entry /v1/midjourney/generations and the explicit /imagine entry behave the same

Request example

curl --request POST \
  --url https://api.openveer.com/v1/midjourney/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "prompt": "a beautiful sunset over mountains",
    "size": "16:9",
    "version": "6.1",
    "speed": "fast"
  }'

Response example

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KV52C0TEJSYZMCG0NCS4YWKK"
    }
  ]
}

Default text-to-image / image-guided endpoint, equivalent to imagine. The explicit /v1/midjourney/generations/imagine endpoint behaves the same way.

Item Value
action IMAGINE
Billing midjourney@imagine[-version][-speed]
Required prompt
Optional image_urls, prompt fields, speed, metadata

Request body

Field Type Required Notes
prompt string Yes Prompt; native MJ flags allowed (e.g. --ar 16:9 --v 6.1)
nsfw_check boolean No Defaults to false.
Run content moderation before submitting a Midjourney task.
• true: use omni-moderation-latest to review prompts and input images
• false: skip moderation without adding moderation cost or latency
speed string No relax (default) / fast / turbo
image_urls string[] No Image URLs or base64 for image-guided generation
metadata object No Custom metadata saved with the task for business-side tracking

Structured fields (optional)

You can set these in the JSON body or in prompt (e.g. --ar 16:9). Body values override prompt.

Field Type MJ equivalent Notes
size string --ar e.g. "16:9", "1:1", "9:16"
quality string --q "0.25", "0.5", "1", "2"
style string --style e.g. "raw"
version string --v Version. Main MJ versions append --v <version>; when used with niji: true and "7" / "6", it is normalized as a Niji version
seed int --seed Seed
negative_prompt string --no e.g. "ugly, blurry"
stylize int --s 0–1000
chaos int --c 0–100
weird int --w 0–3000
tile bool --tile Tile mode
niji bool --niji Niji switch. Recommended: niji: true + version: "7" / "6"
iw float --iw 0–3, image weight
cw int --cw 0–100
sw int --sw 0–1000
cref string --cref Character ref URL
sref string --sref Style ref URL
dref string --dref Depth reference image URL
dw float --dw Depth weight (0–100)
repeat int --repeat 2–40
raw bool --raw Raw style (v5.1+)
draft bool --draft Draft mode (v7+)
hd bool --hd HD mode (v8.1 / v8.2 only; backend auto-injects --v 8.1 when version is unspecified)
stop int --stop Early stop (10–100; v5–6.1 / niji 5–6 only)
extra string any --xxx Escape hatch; appended to prompt verbatim

Examples

All flags in prompt

{
  "prompt": "a beautiful sunset over mountains --ar 16:9 --v 6.1 --style raw --s 750"
}

Structured body (recommended)

{
  "prompt": "a beautiful sunset over mountains",
  "size": "16:9",
  "version": "6.1",
  "style": "raw",
  "stylize": 750
}

Main versions and Niji versions

{
  "prompt": "anime girl in a moonlit garden",
  "niji": true,
  "version": "7",
  "size": "9:16"
}

Verified online versions: 8.2, 8.1, 7, 6.1, 5.2, 5.1, niji 7, and niji 6. Use body field version for main MJ versions. For Niji, use niji: true + version: "7" / "6"; the billing version is normalized to niji7 / niji6.

Mixed (body wins)

{
  "prompt": "a beautiful sunset --ar 1:1",
  "size": "16:9"
}

Final prompt: a beautiful sunset --ar 16:9 (size in body overrides --ar 1:1 in prompt.)

Image-guided

{
  "prompt": "turn this product into a luxury studio photo",
  "image_urls": ["https://example.com/product.png"],
  "size": "1:1",
  "iw": 1.2
}

Fast mode

{
  "prompt": "a cute cat",
  "speed": "fast"
}

speed=relax or omitted speed does not add a billing speed suffix. fast / turbo are applied through the corresponding speed routes and match the corresponding billing keys.

Response

{
  "code": 200,
  "data": [{
    "status": "submitted",
    "task_id": "task_01JWXXXXXXXXXXXX"
  }]
}

After submission, poll the result via Get task.

This documentation is built and hosted on Mintlify, a developer documentation platform.