How to Write AI Image Generation Prompts That Work

Most AI image prompts leave five decisions to the model and get a generic result back. Here is the exact structure, subject, composition, lighting, style, negative constraints, with two before/after rewrites showing why it works.

Steve Jefferson
Steve Jefferson
Developer Advocate
8 August 20261 min read

A useful AI image generation prompt spells out five things: the subject, the composition, the lighting, the style, and what to leave out. Most prompts only cover one of those, usually the subject, and let the model guess the rest. It guesses safe: even framing, flat lighting, a generic background. The fix isn't piling on adjectives. It's naming the specific elements a model uses to build the image, then telling it what's off limits. Here's the difference between a prompt that leaves those decisions to chance and one that doesn't.

a woman drinking coffee in a cafe
Editorial photo of a woman in her early 30s, wearing a cream wool sweater, sitting at a small marble table beside a window, holding a white ceramic cup in both hands, looking down at the cup rather than the camera.
Composition: medium shot, eye-level camera, subject placed in the left third of the frame, shallow depth of field.
Lighting: soft natural window light from camera-left, low contrast, warm color temperature.
Style: 35mm film photography, muted color grade, slight grain.
Negative: no text, no logos, no other people in frame, no harsh shadows, no smiling directly at camera.

Both prompts could produce a photo of a woman drinking coffee. Only one produces a specific photo you could picture before you typed it. The vague version leaves five decisions to the model: who this person is, where the camera sits, where the light comes from, what visual medium this even is, and what's allowed to wander into frame. A model answers all five with statistical defaults, which is why short prompts on most tools tend to converge on the same look: three-quarter angle, flat even lighting, a slightly plastic sense of skin and fabric. For the mechanics behind why an unstructured prompt lands on that generic default, see what a diffusion model actually does.

The structured version answers all five before the model has to guess, and it adds something the vague prompt has no room for: a list of what shouldn't show up. That last line matters more than it looks. Coffee-shop training images are full of background extras and text on menus and cups, so without an explicit no-other-people, no-text instruction, one or both tend to appear anyway.

The five parts of a prompt that actually change the output

These are the elements worth writing out on every image prompt, not just the ones that go wrong. Together they cover the decisions a model otherwise has to make on its own. If you're new to structuring prompts in general, the same prompt engineering fundamentals apply here, image prompts just add visual variables on top of the usual ones.

  1. Subject. Describe who or what is in frame concretely: age range, clothing and material, pose, expression, what they're doing, not just a category like "a woman" or "a dog." A category is a request for the model's average example of that category, which is rarely the specific image you had in mind.

  2. Composition. Set the shot type (close-up, medium, wide), camera angle (eye-level, low, overhead), where the subject sits in the frame, and depth of field. Composition is expensive to fix after the fact. Getting a model to relight a scene is easy; getting it to re-block where the subject stands in the frame usually means starting over.

  3. Lighting. Name the direction, quality, and color of the light: soft window light from the left, hard overhead sun, warm tungsten glow at dusk. Lighting does more to make an image look intentional than any other single element, and it's the one most people skip entirely.

  4. Style and medium. State the visual medium explicitly: photograph, oil painting, flat vector illustration, 3D render, screenshot mockup. Anchor it with a reference point the model can lock onto, like "35mm film" or "gouache painting" or "isometric vector." Without this, the model picks a default medium you didn't ask for.

  5. Negative constraints. Say what should not appear: extra limbs, text, watermarks, specific background clutter, colors that clash with a brand palette. Some tools take negative constraints in a separate field; others want them written into the same prompt as plain instructions. Either way, list them, don't assume the model will leave them out on its own.

A second before/after: product photography

Portraits aren't the only place vague prompts cost you. Product shots for a landing page or store listing are just as sensitive to structure, and the failure mode is different: instead of a generic face, you get a generic bottle with blown-out highlights and props you never asked for.

product photo of a water bottle on a white background
Studio product photo of a matte black 24oz insulated water bottle, centered in frame, three-quarter angle showing the front and side, no visible logo.
Composition: tight crop, bottle fills roughly 70% of the frame, plain background.
Lighting: soft two-point studio lighting, gentle highlight on the cap, no blown-out reflections on the matte surface.
Style: commercial e-commerce product photography, pure white background, subtle soft-edged drop shadow directly beneath the bottle.
Negative: no text, no watermark, no props, no background gradient, no visible fingerprints or dust, no lifestyle setting.

The word "matte" is doing real work in that second prompt. Glossy and metallic surfaces are overrepresented in product photo training data, so a bare water-bottle prompt tends to default to a shiny surface with a hot, blown-out highlight, which is exactly what "no blown-out reflections on the matte surface" heads off. "No props" matters for a similar reason: e-commerce and lifestyle photography get trained side by side, so a generic product prompt will sometimes add a plant, a hand, or a countertop you didn't ask for. Specifying the drop shadow, directly beneath, soft-edged, stops the model from inventing a shadow that falls at the wrong angle for a straight-on studio shot, a small detail that reads as off even to people who can't say why. If an output is already close but not quite right, a full rewrite usually isn't the fastest path; see how to fix a bad AI prompt for a more targeted approach.

Where negative constraints actually belong

Not every image tool handles exclusions the same way. Some interfaces give you a separate negative prompt field, where a short list of nouns is enough. Conversational, multimodal tools work differently: Google's guidance for prompting Gemini's image generation recommends describing what you want positively rather than relying on a list of banned words, a technique it calls a semantic negative prompt. OpenAI's prompting guide for its image models makes a related point from the editing side, recommending that you state exclusions and invariants explicitly, things like "no watermark" or "keep everything else the same" when revising an existing image. The mechanics differ by tool. The habit underneath doesn't: decide what's off limits before you generate, not after you're staring at a result you have to patch.

Putting it together

None of this requires a longer prompt, just a more deliberate one. Write the subject first, then composition, then lighting, then style, then whatever needs to stay out of frame. There's no fixed length that makes a prompt good; for a general sense of how much detail is enough versus too much, see how long a prompt should be. Once a structured prompt is reliably producing what you want, save it as a template instead of reconstructing it from memory next time; the same logic behind building a reusable prompt library applies just as well to image prompts.

Frequently asked questions

What is the best format for an AI image prompt?

A short paragraph or a set of labeled lines covering subject, composition, lighting, style, and what to exclude, roughly in that order. Full sentences tend to outperform a comma-separated list of keywords on current multimodal tools, since sentences let the model parse relationships between words, not just the words themselves.

How long should an AI image prompt be?

Long enough to cover the five structural elements and not much longer. That's usually two to five sentences, or a short labeled paragraph. Extra adjectives past that point rarely change the output; missing one of the structural elements changes it a lot.

What are negative prompts in AI image generation?

Instructions for what should not appear in the output: extra limbs, watermarks, text, specific colors, background clutter. Some tools accept these in a dedicated negative prompt field; others expect them written as plain instructions inside the main prompt.

Why do AI generated images look generic?

Usually because the prompt left composition, lighting, or style undefined, so the model filled the gap with its most statistically common example. Naming those elements explicitly, instead of describing only the subject, is the direct fix.

Can you use full sentences instead of keywords in an AI image prompt?

Yes, and on most current multimodal image tools it performs better than a keyword list, because natural language lets the model understand how the words relate to each other instead of treating them as an unordered set of tags.

How did this land?

About the author

Steve Jefferson
Steve Jefferson

Developer Advocate

Steve builds something with Swarmz every week and writes up what worked, what broke, and what he'd do differently. Tutorials and hands-on guides are his lane.

Share

Get the next post in your inbox

One email a month. Product updates, engineering posts, and the best of Built with Swarmz.

I agree to receive emails about AI building tips and Swarmz product news. Unsubscribe any time.