Generate images with Midjourney V7 via the Muapi REST API. Pay per generation — no subscription needed.
POST https://api.muapi.ai/api/v1/midjourney-v7Submit a job with your MuApi API key in the x-api-key header, then poll https://api.muapi.ai/api/v1/predictions/{request_id}/result until status is completed.
| Name | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Text description of the image to generate. |
| image_url | string | No | Optional reference image URL. Influences the style and content of the generation. |
| aspect_ratio | string | No | Output image aspect ratio.Options: 1:1, 16:9, 9:16, 3:4, 4:3, 21:9Default: "1:1" |
| stylize | int | No | Controls how artistic the result is. Range: 0–1000. Lower = more literal, higher = more stylized.Default: 100 |
| chaos | int | No | Controls variation between the 4 images. Range: 0–100. Higher = more diverse.Default: 0 |
| weird | int | No | Adds unconventional aesthetics. Range: 0–3000.Default: 0 |
| negative_prompt | string | No | Things to exclude from the image, e.g. "text, watermark". |
| seed | int | No | Reproducibility seed. Range: 0–4294967295. Same seed + same prompt ≈ similar result.Default: 0 |
REQUEST_ID=$(curl -s -X POST https://api.muapi.ai/api/v1/midjourney-v7 \
-H "x-api-key: $MUAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"<prompt>"}' | jq -r .request_id)
curl -s https://api.muapi.ai/api/v1/predictions/$REQUEST_ID/result -H "x-api-key: $MUAPI_API_KEY"import os, time, requests
API = "https://api.muapi.ai/api/v1"
headers = {"x-api-key": os.environ["MUAPI_API_KEY"]}
r = requests.post(f"{API}/midjourney-v7", headers=headers, json={"prompt":"<prompt>"})
request_id = r.json()["request_id"]
while True:
res = requests.get(f"{API}/predictions/{request_id}/result", headers=headers).json()
if res["status"] == "completed":
print(res["outputs"]); break
if res["status"] == "failed":
raise RuntimeError(res.get("error"))
time.sleep(3)Full docs and agent/MCP integration: llms.txt. Get an API key at muapi.ai/access-keys.