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.
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
Generate a grid
POST /imagine returns a 2×2 image grid and a task_id. All subsequent operations reference this task.
Upscale an image
POST /upscale-1x on any of the 4 grid positions to get a full-resolution single image.
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
/imagine
Generate a 2×2 image grid from a text prompt.
/reroll
Re-run the original prompt to get a new grid.
/upscale-1x
Upscale one image from the grid to full resolution. Required before most other operations.
/upscale-alt
Alternative upscaler with different style/detail rendering.
/upscale-2x-4x
Further upscale a 1x image to 2× or 4× resolution.
/variations
Create variations of an upscaled image (subtle or strong).
/inpaint
Edit a region of an image using a mask and prompt.
/outpaint
Expand the canvas of an image outward.
/pan
Extend the image in a cardinal direction (left, right, up, down).
/blend
Blend multiple images together into a new composition.
/describe
Reverse-engineer a prompt from an image URL.
/shorten
Simplify a long prompt to its most impactful keywords.
/seed
Retrieve the seed used to generate a specific image.
/faceswap
Swap a face in a Midjourney image with a reference face.