Midjourney
Midjourney V7 and V8, plus Niji V7 for anime and illustration. Each task returns 4 upscaled images.
midjourney-v7midjourney-v8midjourney-nijiAsyncGenerate
POST
/api/v1/generateReturns a task_id immediately. Poll /api/v1/status for the result -- a completed task returns up to 4 image URLs in output. Credits are deducted upfront and auto-refunded if the generation fails.
Parameters
modelstringrequired
midjourney-v7 midjourney-v8 midjourney-niji (anime/illustration style)promptstringrequired
Text prompt describing the image. Midjourney parameters (
--ar, --chaos, --stylize, etc.) are supported in the prompt text.aspect_ratiostring
16:9 9:16 1:1 4:3 3:4 21:9 and more. Default: 1:1reference_imagesstring[]
A single public image URL used as the source/style image. One reference image per task; only the first URL is used. Upload via /api/v1/upload.
tagstring
Tag the output for reuse:
character object style location. Applied to all returned images.Midjourney has no
resolution or duration parameter -- the model always returns 4 upscaled images at its native output size.Examples
Text-to-image (V7)
curl -X POST https://www.lunostudio.ai/api/v1/generate \
-H "Authorization: Bearer luno_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "midjourney-v7",
"prompt": "a lighthouse on a rocky cliff at golden hour, dramatic clouds, cinematic --ar 16:9",
"aspect_ratio": "16:9"
}'V8
curl -X POST https://www.lunostudio.ai/api/v1/generate \
-H "Authorization: Bearer luno_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "midjourney-v8",
"prompt": "portrait of an old sailor, weathered face, studio lighting",
"aspect_ratio": "3:4"
}'Niji (anime/illustration)
curl -X POST https://www.lunostudio.ai/api/v1/generate \
-H "Authorization: Bearer luno_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "midjourney-niji",
"prompt": "a girl standing in a field of sunflowers, anime style, soft pastel colors",
"aspect_ratio": "9:16"
}'With a reference image
curl -X POST https://www.lunostudio.ai/api/v1/generate \
-H "Authorization: Bearer luno_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "midjourney-v7",
"prompt": "reimagine this as a watercolor painting",
"reference_images": ["https://storage.lunostudio.ai/.../source.jpg"],
"tag": "style"
}'Response
{
"task_id": "mj:task_xmkzu7pbzizlees93764uy6q",
"credit_cost": 8,
"status": "pending",
"model": "midjourney/v7",
"type": "image"
}Models
| Model | model value | Best for |
|---|---|---|
| Midjourney V7 | midjourney-v7 | General-purpose photorealism and illustration, most consistent prompt following |
| Midjourney V8 | midjourney-v8 | Latest model, improved detail and coherence |
| Niji V7 | midjourney-niji | Anime, manga, and illustration styles |
Check Status
GET
/api/v1/status?task_id={task_id}Poll every 5-10 seconds. Typical generation time is 30-90 seconds. The task_id for Midjourney always starts with mj: -- pass it back exactly as returned from /api/v1/generate.
Request
curl "https://www.lunostudio.ai/api/v1/status?task_id=mj%3Atask_xmkzu7pbzizlees93764uy6q" \
-H "Authorization: Bearer luno_sk_your_key_here"Generating
{ "task_id": "mj:task_xmkzu7pbzizlees93764uy6q", "status": "generating" }Success (up to 4 images)
{
"task_id": "mj:task_xmkzu7pbzizlees93764uy6q",
"status": "success",
"output": [
"https://storage.lunostudio.ai/generations/user/1716234567-0.png",
"https://storage.lunostudio.ai/generations/user/1716234567-1.png",
"https://storage.lunostudio.ai/generations/user/1716234567-2.png",
"https://storage.lunostudio.ai/generations/user/1716234567-3.png"
]
}Failed (auto-refunded)
{
"task_id": "mj:task_xmkzu7pbzizlees93764uy6q",
"status": "failed",
"error": "Generation failed",
"refunded": true
}Credits are automatically refunded when a generation fails.
The full 4-image array is only returned by the poll that first observes
success. If you poll again after that (e.g. to re-check an old task_id), you'll get the primary image only -- save all 4 URLs from the first successful response.Status values
pendingQueued, waiting
generatingActively rendering
successDone. Up to 4 images in output.
failedFailed. Credits refunded.
Need help?
Engineering team responds within 5 minutes.