How to write prompts to generate images

The structure that works best in Midjourney, DALL-E, Stable Diffusion, Flux or Firefly: subject, style, light, composition and parameters, with examples.

Image generators do not chat like a chatbot: they turn a visual description into an image. The more concrete the description of what is seen, the better the result.

The basic structure

Order the prompt from most to least important:

  1. Image type: photograph, illustration, 3D render, watercolor, logo…
  2. Subject: who or what appears, with details (age, clothing, material, color).
  3. Action or pose: what it is doing.
  4. Setting: where it is, era, weather.
  5. Lighting: golden-hour natural light, soft studio light, neon…
  6. Camera and composition: wide shot, close-up, 85mm lens, top-down view, rule of thirds.
  7. Style and color: palette, aesthetic, art movement references (not living artists).

Example

Professional food photograph of a bowl of ramen with a soft-boiled egg,
on a dark wooden table, steam rising, soft window light from the left,
close-up from a 45-degree angle, shallow depth of field,
warm and moody color palette, editorial magazine style

Differences between tools

  • Midjourney accepts parameters at the end of the prompt, such as --ar 16:9 for aspect ratio. These parameters do not work in other tools.
  • DALL-E (in ChatGPT) understands natural-language descriptions well and you can request changes conversationally.
  • Stable Diffusion often also uses a negative prompt to state what you do not want (e.g. “blurry, extra fingers, watermark”).
  • Flux and Ideogram stand out for following detailed descriptions and, in Ideogram's case, rendering text inside images.
  • Adobe Firefly is integrated into Adobe tools and lets you pick styles in the interface.

Features change often: check each tool's official documentation.

Practical tips

  • Describe what you want to see, not what you do not (“a clear blue sky” rather than “no clouds”), except in negative prompts.
  • If in-image text matters, put it in quotes and keep it short.
  • Generate several versions and keep the best; then refine by changing one thing at a time.
  • Use reference images where supported to keep the same character or product.

Responsible use

Do not generate images of real people without their consent, or images imitating a living artist's style to compete with them. Check each tool's commercial-use terms.

Explore the image generation prompts and the Midjourney prompts.

Learn prompting

  • What is a prompt and how does it work

    A prompt is the instruction you give an artificial intelligence. Learn its parts, why the result depends so much on how you write it, and how to get started.

  • How to create a prompt from scratch

    A 6-step method to go from a vague idea to a clear, reusable prompt, with a complete end-to-end example.

  • How to write effective prompts

    Ten practical principles to write prompts that work on the first try more often: clarity, specificity, examples, format and review.

  • How to write prompts for ChatGPT

    Practical tips to get more out of ChatGPT: message structure, custom instructions, long conversations, files and reviewing answers.

  • How to write prompts for Claude

    How to write prompts for Anthropic's Claude: direct instructions, rich context, long documents, tags for structure and requests for reasoning.

  • How to write prompts to generate videos

    How to describe a shot for Runway, Kling, Sora or Veo: one subject, one action, camera movement, light and mood. And how to plan multi-shot videos.

  • How to improve a bad prompt

    A diagnostic process to find out why a prompt is not working and how to fix it, with a before-and-after example and a prompt to let the AI help you.

  • What are variables in a prompt

    Variables turn a prompt into a reusable template. Learn how to define them, name them and use them on HomeCasa Prompts.

  • What is context in a prompt and how much to give

    Context is the information the AI cannot guess. Learn what to include, what to avoid and how to organize documents and data inside a prompt.

  • How to define roles in a prompt

    What telling the AI “act as…” really does, how to choose a good role, combine it with concrete criteria and avoid roles that do not help.

  • How to structure prompt instructions

    Numbered steps, delimiters, sections and logical order: how to organize a long prompt so the AI does not skip anything.

  • Good and bad prompt examples

    Eight comparisons of real prompts for text, code, image and video, explaining what fails in the bad version and what the good one improves.

  • Common mistakes when writing prompts

    The ten most common prompt-writing mistakes and how to avoid them: from missing context to blindly trusting the answer.

  • Advanced prompting techniques

    Few-shot examples, step-by-step reasoning, prompt chaining, self-critique, structured outputs and evaluation: techniques for more reliable results.