Midjourney prompt formula

I Tested 20 Midjourney API Calls. Here’s What Actually Worked

The image we ended up using: one tile from a $0.04 Midjourney grid, picked, upscaled, and later animated.

Most Midjourney prompt guides are written from the web app, where you type a line, look at four pictures, and type another line. That loop hides a lot. You do not see how long each job really takes, what each word in the prompt is worth, or which tricks quietly fail. When you call Midjourney from code, all of that becomes visible, and a prompt stops being a magic sentence and becomes a set of parameters you can test one at a time.

So we tested one. We invented a small publisher, Tidewater Press, that wants a picture-book series called Little Tide Pool: a cover, several inside illustrations, a web banner, and a short animated teaser, all in the same soft gouache style. We wrote a six-part prompt formula, fixed the seed, and changed one part at a time. In total, we sent 20 requests: 14 image grids (56 images), four requests that failed, one upscale, and one image-to-video job. The whole test cost $0.77. Below are the exact prompts, timings, prices, and the failures, including a few that surprised us.

Tidewater Press is fictional; it is our test scenario, not a client. Every image in this article was generated during the test and is shown without retouching.

The formula

The formula has six slots, written in this order and separated by commas:

  1. Subject, with one clear action: “A sea otter floating on its back holding a small sea urchin”.
  2. Setting: “in a calm kelp forest bay at the surface”.
  3. Medium: “gouache illustration with visible brush strokes”.
  4. Light: “soft morning light from the left”.
  5. Composition: “eye-level close-up with the horizon in the upper third”.
  6. Mood and palette: “muted teal and warm sand palette, calm and curious mood”.

Put together, that is a 52-word prompt. The idea is not new, and many illustrators work this way, but it has a practical advantage in code: each slot is a variable. If the art director wants a linocut instead of gouache, you change one string and leave everything else, including the seed, untouched. That is what makes a fair comparison possible.

All jobs used Midjourney version 8.1, a 3:2 aspect ratio, seed 2610 and relax mode, which is the slower and cheaper queue. Here is the core of the script, with the host kept in an environment variable:

import os, time, requests

BASE = os.environ[“MJ_API_BASE”]          # your provider’s /v1 endpoint

H = {“Authorization”: “Bearer ” + os.environ[“MJ_API_KEY”]}

SLOTS = dict(

    subject=”A sea otter floating on its back holding a small sea urchin”,

    setting=”in a calm kelp forest bay at the surface”,

    medium=”gouache illustration with visible brush strokes”,

    light=”soft morning light from the left”,

    comp=”eye-level close-up with the horizon in the upper third”,

    mood=”muted teal and warm sand palette, calm and curious mood”,

)

def prompt(**changes):

    s = {**SLOTS, **changes}

    return “, “.join(s[k] for k in (“subject”, “setting”, “medium”, “light”, “comp”, “mood”))

def imagine(text, size=”3:2″, **extra):

    body = {“prompt”: text, “version”: “8.1”, “size”: size,

            “seed”: 2610, “speed”: “relax”, **extra}

    tid = requests.post(f”{BASE}/midjourney/generations”, headers=H,

                        json=body).json()[“data”][0][“task_id”]

    print(“submitted”, tid)                # log the id before polling

    while True:

        d = requests.get(f”{BASE}/midjourney/{tid}”, headers=H).json()[“data”]

        if d[“status”] in (“SUCCESS”, “FAILURE”, “CANCEL”):

            return d

        time.sleep(4)

grid = imagine(prompt(medium=”linocut print, two colors, bold carved lines”))

Two practical notes. First, the task record echoes back the prompt it actually sent to Midjourney, and the structured fields arrive as the familiar flags: our body became “… calm and curious mood –ar 3:2 –v 8.1 –seed 2610 –relax”. That echo is the quickest way to confirm a parameter was understood. Second, log the task id before you start polling. One of our polling scripts died on a dropped TLS connection, and because the id was already on disk, we could pick the job up again instead of paying for it twice.

Test 1: how long should a prompt be?

Midjourney prompt formula

Same seed, same settings, three prompt lengths.

We started with a ladder of three prompts on the same seed:

A: “A sea otter”

B: the full six-part formula (52 words)

C: the formula plus 19 stacked keywords:

   “…, watercolor and oil painting, hyperrealistic, cinematic, 8k, ultra detailed,

   award-winning, trending, dramatic sunset, foggy night, golden hour, bokeh,

   wide angle, fisheye, vibrant neon colors, moody, epic, masterpiece,

   highly detailed fur, octane render”

A produced four photographic close-ups of an otter’s face, staring into the camera from blue water. They are well made, and they are exactly what you get when you leave every decision to the model: a stock wildlife photo. No urchin, no kelp, no illustration.

B did what we asked in every frame. All four images are painted, all four otters hold an urchin, three of four float on their backs, and the teal and sand palette is there throughout. It was not perfect. The fourth image shows a second pair of paws in the lower right corner, as if a hidden otter were floating next to the first one, and the first image added small white flowers on the water that nobody asked for. Two of the four tiles also came with a cream paper border, which looks charming on screen but has to be cropped for print.

C is the interesting one. Adding 19 popular keywords, several of which contradict each other (sunset and foggy night, golden hour and neon, wide angle and fisheye), did not produce chaos. It produced something blander. The gouache look drifted toward a smooth, semi-realistic oil painting, none of the contradictory lighting terms visibly applied, and the urchin is clearly visible in only two of the four frames. One frame again grew an extra set of paws. The model seems to average a long list rather than obey it, and the average of “everything” is a generic painterly picture.

The cost of each grid was identical, $0.0405 for four images, so length is not a price issue. It is a control issue: every extra word dilutes the words that matter. Our rule after this test was to fill each of the six slots once and stop.

Test 2: multi-prompt weights did not run

Midjourney prompt formula

Four attempts with :: weights. None produced an image, and none were charged.

Midjourney has long supported multi-prompts, where a double colon splits the prompt into parts and a number after it sets the weight, for example “sea otter::3 kelp forest::1”. We wanted to use that to balance the otter against the kelp. We sent four variations: weights of 3 and 1 in both directions, and a shorter version with weights of 2 and an empty “::” separator.

All four came back as failures with a “prompt format error” message and a note that failed tasks do not consume GPU time; our billing confirmed they cost nothing. The first two waited in the relax queue for 275 and 303 seconds before failing, so the error was not raised at submission. The second pair failed after 14 and 21 seconds. We do not know whether the syntax has changed in version 8.1 or is simply not accepted on this path, and we did not spend more requests finding out. The useful lessons are general. Do not assume an older prompt trick still works with a new model version. Validate unusual syntax with one cheap job before you build a batch around it. And because a failure can arrive five minutes after submission, a batch script must handle late failures, not only HTTP errors at submit time.

In practice, we did not miss the weights. When we wanted more kelp, writing “dense kelp forest” into the setting slot moved the balance enough.

Test 3: keeping people out of the picture

Midjourney prompt formula

“No people” inside the prompt versus a separate negative prompt field.

A picture book about tide pools needed an establishing shot of a small harbor, and the art director wanted it empty, so that readers look at the boats and the birds. A common warning in prompt guides is that writing “no people” can backfire, because the model sees the word “people”. We tested both approaches on the same seed:

Prompt: “A small seaside harbor at dawn with wooden fishing boats moored along a stone quay,

stacked lobster traps and coiled ropes, seagulls overhead, gouache illustration with

visible brush strokes, soft morning light from the left, wide view from the end of the

quay, muted teal and warm sand palette, calm and curious mood”

Version 1: “, no people” added inside the prompt

Version 2: negative_prompt = “people, person, fisherman, figures”

Both versions worked. We inspected all eight images at full size, including the shadowy quay walls where small figures like to hide, and found zero people. We found plenty of gulls, including a few perched on the wall that look a little like people at thumbnail size, which is worth checking before you sign off on an image. The two grids are also strikingly similar. With the same seed, the negative field changed the details of each frame, such as the number of masts or where the traps are stacked, but not the layout.

So the warning did not apply here, at least for a simple exclusion. We still prefer the separate negative field for production, for a different reason: it keeps the positive prompt readable and lets you maintain one shared exclusion list, for example “people, text, watermark, signature”, across every job in a series.

Test 4: changing the medium

Midjourney prompt formula

Only the medium slot changed between these three grids.

Next we asked whether the series could switch medium for a special edition. We kept five slots fixed and changed only the medium, first to “linocut print, two colors, bold carved lines” and then to “risograph print in teal and coral, grainy halftone texture”.

The linocut grid is lovely and very convincing, and that is part of the problem. Midjourney did not just draw in the linocut style; it rendered the whole object: each image sits on cream paper with a margin, and in three of the four frames the bottom margin carries pencil-like scribbles where an artist would write the title, the edition number, and a signature. They are not readable words, but they would have to be removed before printing, and some publishers have a firm rule against anything that imitates a signature. “Two colors” was also treated loosely; most frames use three or four tones.

The risograph grid went further. All four images came back as photographs of a printed sheet lying at an angle on a table, complete with paper edges and soft shadows. The teal and coral palette and the halftone grain were exactly right, but you cannot place a photograph of a print on a book page. For a mock-up, it is perfect. For artwork, it is useless.

Midjourney prompt formula

The follow-up: describing the output format, not just the style.

We spent one more grid on a fix. We replaced the medium slot with “flat scan of a risograph print in teal and coral, grainy halftone texture, full-bleed artwork filling the frame”. That brought the angled table shots down from four of four to one of four. Two of the remaining three still have a thin paper margin, which is easy to crop. The lesson applies to any print medium: tell the model what kind of file you want back, a flat scan, full bleed, edge to edge- not only which technique the picture should imitate.

Test 5: camera words versus lighting words

Midjourney prompt formula

Changing the composition slot barely registered. Changing the light slot changed every frame.

Photography terms are popular in prompts, so we tried two changes. In the composition slot we wrote “macro shot with a 100mm lens and shallow depth of field”. In a separate job, we left composition alone and changed the light slot to “blue-hour twilight with bioluminescent plankton glowing in the water”.

The macro instruction had almost no visible effect. The otters are, if anything, slightly smaller in the frame than in the baseline, and there is no shallow focus at all: the background is as crisp as the subject, as you would expect from a painting. One frame even switched to a white otter. In an illustrated style, lens language has little to hold on to, because a gouache painting has no lens. If you want a tighter crop in an illustration, describe what fills the frame (“the otter’s head and paws fill the frame”) instead of naming focal lengths.

The light slot, by contrast, changed every image. The whole grid moved to deep blues, and three of the four frames show glowing specks in the water and around the kelp. The fourth reads more like low, warm evening sun than night. What stayed the same is just as useful: with a fixed seed, each tile kept the same basic layout as its baseline counterpart. The first otter still floats left of centre, the third is still framed by tall leaves. For a book, where a day spread and a night spread should feel like the same place, that seed stability is worth more than any single beautiful image.

Test 6: one style, three different animals

Midjourney prompt formula

Subject and setting changed; medium, light, composition, and mood stayed locked.

A series lives or dies on consistency, so this was the test that mattered most for Tidewater Press. We kept the last four slots identical and swapped only subject and setting: “A humpback whale breaching beside a small research sailboat, in open water off a rocky coast” and “A hermit crab moving into a larger spiral shell, in a shallow tide pool with anemones”.

For a team that wants to script this kind of series, the useful property is that the style tail is just a string. Our whole series generator, written against the Midjourney image generation API, is the six-slot function above plus a list of subject and setting pairs, which means a new animal for the next book is one line of code and four cents.

The shared tail did its job. All twelve images in the three grids sit comfortably together: the same teal and sand palette, the same warm light from the left, the same painted surface. The whale grid followed its prompt in all four frames, with a breaching humpback and a sailboat each time; one sail turned coral, which happens to match the palette. The whale and crab images are noticeably more detailed and naturalistic than the otter, so the style drifts a little with the subject. If you need tighter matching, a style reference image is the next tool to test.

The crab grid shows a typical limitation. Every frame has a hermit crab, a large spiral shell, and anemones around a pool, but none shows the story we asked for, a crab moving from one shell into a bigger one. There is only ever one shell. Midjourney is good at nouns and weaker at events, especially events that need two versions of the same object in one picture. For a picture-book spread that depends on the action, plan to show it in two images, before and after, or to edit the image afterwards.

Test 7: a 3:1 web banner with room for a headline

Midjourney prompt formula

First attempt: the birds were right, the space was not.

The publisher’s website needed a wide banner with space on the right for the series title. We changed the aspect ratio to 3:1 and wrote the composition slot as “wide panoramic composition with empty pale sky across the right third for a headline”, with five sanderlings running along the water’s edge as the subject.

The bird count was perfect: five birds in each of the four banners, 20 of 20, which is better than older Midjourney versions managed with exact numbers. The empty space was not. In two banners, the birds stretch to 86 and 92 percent of the width, leaving nothing for a headline; one leaves about 15 percent clear, and only one, with about 38 percent of clear sky on the right, would work as delivered.

Midjourney prompt formula

Second attempt: describing where the subject goes worked far better.

For the second attempt, we described where the birds should be rather than where the emptiness should be: “all five birds grouped in the left third of the image, the right two thirds are empty pale sky and smooth wet sand”. Now all four banners were usable. The birds did not stay inside the left third; they reached 49 to 63 percent of the width, but the right 37 to 51 percent was clear in every image, which is plenty for a headline. There was a trade-off. The count slipped: two banners have five birds, one has six, and one has four. Models are often better at placing positive things than at keeping an area empty, and here the more spatial language seems to have taken attention away from the number. If the exact count matters, generate a second grid and pick.

Test 8: upscale and a five-second teaser

Midjourney prompt formula

 

The chosen tile and one frame per second from the 5.2-second clip.

For the teaser, we picked the second tile of the baseline grid and sent an upscale request with the original task id and index 2. It finished in 12.7 seconds and cost nothing, but it is worth knowing what it returns: a 1344 by 896 pixel image, the same size as the tile in the grid. In this mode, the “upscale” selects and delivers the single image; it does not add pixels. For print at picture-book size, you will need an external upscaler or a creative upscale step.

We then animated the image with Midjourney’s image-to-video option at the 480p tier with low motion:

action: video

image_urls: [the upscaled image]

prompt: “the sea otter gently bobs on slow rolling waves, strands of kelp sway,

         soft morning light shimmers on the water, painted gouache texture stays still”

video_type: vid_1.1_i2v_480, motion: low, batch_size: 1

The job took 82 seconds and cost $0.20, and returned a 5.2-second clip at 768 by 512 pixels and 24 frames per second. The motion is what we wanted for a calm book: the otter bobs and turns its head, and the urchin moves from paw to paw without disappearing or melting, a common failure in image-to-video. The brush texture mostly holds, though the kelp in the foreground moves less than we asked and some strokes shimmer slightly between frames. Because low motion keeps the composition close to the source, the first and last frames could be used as stills in the same layout, which is handy for a web page that plays the clip on hover.

Test 9: how fast is relax mode in practice?

Midjourney prompt formula

Submit-to-finish time for the first 12 successful grids.

Relax mode is cheap because it waits for spare capacity, and the wait is the price. We submitted seven jobs at once, then sent the rest as slots freed up. The first wave took 303 to 404 seconds per grid, five to almost seven minutes. Jobs that started later, when fewer of ours were in flight, finished faster: 242 seconds for the linocut grid, 122 to 160 seconds for the whale, crab, and night grids, and 59 seconds for the banner. The two follow-up grids, sent on their own later in the day, took 118 and 150 seconds. Submitting took one to two seconds in almost every case, so nearly all of the time is queue.

The planning implication is simple. A batch of a dozen relax jobs is a coffee break, not an interactive session, and your script should be built for that: submit everything, store the ids, and poll with retries. If you need a grid back in under a minute for a live review, the faster tier is the right choice and the cost difference is small at this volume. For a book series, where the art director reviews a batch the next morning, relax mode is ideal.

The walkthrough video

The video below walks through the formula, the main comparisons and the teaser clip in under three minutes.

Walkthrough: testing a six-part Midjourney prompt formula (about 3 minutes).

What it cost

StepRequestsTime per requestCost
Imagine grids, relax mode (56 images)1459–404 s$0.57
Multi-prompt attempts (failed)414–303 s$0.00
Upscale (selection)113 s$0.00
Image-to-video, 480p, 5 s182 s$0.20
Total20 $0.77

Fifty-six illustrations and a short animation cost 77 cents, and a quarter of that was the video. At about one cent per image, the price of exploring is close to zero, which changes how you should work. It is cheaper to run a controlled comparison, one slot at a time on a fixed seed, than to spend an hour rewording a single prompt by feel. The narration in our walkthrough video was produced separately and is not included above.

A checklist for prompt-driven series

  1. Write prompts in fixed slots. Subject, setting, medium, light, composition, mood. Change one slot per test.
  2. Fix the seed while you compare. It kept layouts stable across light and negative-prompt changes, which is what makes a comparison readable.
  3. Do not stack keywords. Nineteen extra terms made the image blander, not richer.
  4. Test unusual syntax with one job first. Our:: weights failed four times, once after five minutes in the queue.
  5. Use a negative field for exclusions you reuse. Both methods kept people out, but the field keeps prompts clean.
  6. Name the output format for print media. “Flat scan, full-bleed” cut angled print photos from four of four to one of four.
  7. Describe where the subject goes, not where the space goes. Usable headline space went from one banner in four to four in four.
  8. Check counts, paws and margins at full size. Extra paws, fake signatures and paper borders are easy to miss in a grid.

The bottom line

A structured six-part prompt gave us a consistent illustrated series for less than a dollar. The formula worked best when each slot did one job: light words were obeyed in every frame, medium words were obeyed so faithfully that they brought paper margins and signatures with them, and camera words were largely ignored in a painted style. The failures were as instructive as the successes: multi-prompt weights did not run, a hermit crab never changed shells, and an “empty right third” stayed full until we described the birds’ position instead. None of that needs a better model, only a more deliberate prompt and a script that records what happened. If you want to run the same kind of controlled tests across Midjourney and other image and video models with one key, you can find them on apimart.ai.

Related: SeeAPI: One AI API for Images and Videos—Is It Worth It?

Disclaimer: This article was submitted by a guest contributor. The views, testing results, and experiences expressed are solely those of the author and do not necessarily reflect the opinions of AIInsightsNews. The content is provided for informational and educational purposes only.

 

Tags: