Midjourney

Midjourney API

Full programmatic access to Midjourney — generate grids, upscale, vary, inpaint, outpaint, pan, blend, and more. All operations are asynchronous: you get a task_id immediately and poll /fetch (or use a webhook) for the result.

Asynchronous

Every Midjourney endpoint is async. The API returns a task_id immediately. Generation typically takes 30–90 seconds. Poll with POST /fetch every 5–10 seconds, or pass a webhook_url to receive the result automatically.

Typical workflow

1

Generate a grid

POST /imagine returns a 2×2 image grid and a task_id. All subsequent operations reference this task.

2

Upscale an image

POST /upscale-1x on any of the 4 grid positions to get a full-resolution single image.

3

Refine

Vary, inpaint, outpaint, pan, or zoom on the upscaled image to refine the result.

See the full step-by-step walkthrough in the Midjourney Workflow guide.

Quick start

# Step 1 — Generate a grid
curl -X POST https://journeyapi.co/api/v1/imagine \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a red fox in a snowy forest --ar 16:9",
    "webhook_url": "https://your-server.com/webhook"
  }'
# Returns: { "task_id": "abc123..." }

# Step 2 — Upscale image #1 from the grid
curl -X POST https://journeyapi.co/api/v1/upscale-1x \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "origin_task_id": "abc123...",
    "index": 1
  }'

All endpoints