PromptZone - AI Prompts, Guides and Tools for Builders

Cover image for How to Find the Prompt of Any AI-Generated Image (2026)
Jj Chao
Jj Chao

Posted on Edited on

How to Find the Prompt of Any AI-Generated Image (2026)

Have you ever stumbled upon a cool AI-generated image and wondered about the prompt behind it? There are two ways to find it: read the exact prompt from the metadata the generator embedded in the file, or, when that metadata is missing, reconstruct a close prompt with an image-to-prompt tool or a vision model. This article walks through both routes, tool by tool, so you can reproduce an image or draw inspiration from it.

Let's explore how to transform simple admiration into deep understanding and perhaps even a source of inspiration for your own creations.

Prompt and Metadata

There are essentially two ways to obtain the prompt of an image:

  1. Find the exact prompt and generation parameters in the image file's metadata.
  2. Guess the prompt using AI.

Metadata of an AI image is a set of information that describes or provides data about an image file and is contained directly within it. For images created with Stable Diffusion, this metadata often includes the image prompt and generation parameters (model, seed, sampler, etc.).

The catch is that metadata survives only as long as the file is untouched. Screenshots, social networks, messaging apps and most image hosts re-encode uploads and strip embedded text, which is why an image saved from a feed almost never carries its prompt. If you have the original PNG from the generator, start with metadata; if you have a JPEG from the web, skip to reconstruction.

Which Method to Use

Use metadata when you hold the original file, and reconstruction for everything else; the table below summarises the trade-offs.

Method Works when Accuracy Effort
PNG Info / metadata viewer Original PNG from A1111, Forge, ComfyUI or Fooocus Exact prompt, seed and settings Seconds
ComfyUI drag-and-drop Original PNG saved by ComfyUI Exact full workflow Seconds
Fooocus history log Image generated on your own Fooocus install Exact prompt and settings Seconds
ChatGPT gen_id / content credentials Image made in ChatGPT or DALL·E Provenance only, no prompt Minutes
CLIP Interrogator Any image, including stripped JPEGs Approximate, tag-style prompt A minute
Describe (Fooocus, Midjourney) Any image Approximate, several variants A minute
Vision model (ChatGPT, Claude, Gemini) Any image Approximate but editable and detailed A few minutes

Extracting Image Metadata

PNG Info (Automatic1111)

Automatic1111 or Forge has a built-in tool to extract the prompt and parameters of an image generated with Stable Diffusion.

Screenshot of Automatic1111 PNG Info tool

Open the PNG Info tab, drop the image in, and the positive prompt, negative prompt, steps, sampler, CFG scale, seed, model hash and resolution appear as text. The "Send to txt2img" button copies everything into the generation tab so you can re-run or modify the prompt immediately.

Reading Metadata by Generator

Each local Stable Diffusion frontend stores the prompt differently, so the right reader depends on which tool made the image.

Generator Where the prompt lives How to read it
Automatic1111 / Forge A parameters text chunk inside the PNG PNG Info tab, or any PNG metadata viewer
ComfyUI The whole workflow as JSON inside the PNG Drag the PNG onto the ComfyUI canvas; the complete node graph, prompts and seeds are restored
Fooocus A per-session HTML log in the outputs folder, plus optional embedded metadata Open the log for the generation date, or enable metadata saving in the settings so the PNG carries the prompt
Midjourney Not in the file Use the original Discord message or the Midjourney web gallery, where the prompt is shown next to the image
ChatGPT / DALL·E Not in the file as readable text See the gen_id section below

ComfyUI is the most complete of these: because the entire workflow is embedded, dropping the image back onto the canvas gives you not just the prompt but the exact model, LoRAs, samplers and post-processing chain. Fooocus is the most likely to disappoint, because embedding is off by default on many installs, so the history log is the reliable fallback for images you generated yourself. Our Fooocus image prompt guide covers the related technique of feeding an image back in as a prompt.

PNG Info (Web)

Linaqruf, creator of the AnimagineXL model, also offers a web version of PNG Info to retrieve metadata from images generated with A1111, ComfyUI, and other interfaces.

Data Viewer

Alternatively, any tool capable of extracting image metadata can allow you to retrieve the parameters of an image. For example, you can use Jimpl, a free and very easy-to-use tool.

Data Viewer

Generic viewers show every text chunk and EXIF field, so they also work for images where a custom pipeline wrote the prompt under an unusual key. If a viewer shows no text chunks at all, the file has been re-encoded and the prompt is gone; move on to reconstruction.

ChatGPT and DALL·E Images: gen_id Metadata

Images generated in ChatGPT do not carry a readable prompt, and the generation ids you may see attached to them cannot be converted back into one. Each image ChatGPT produces has an internal generation id (often shown as gen_id), and an image edited from an earlier one also references a parent id. These identifiers exist so the model can refer back to a specific image within a conversation; they are opaque keys, not encoded text, and no tool can "decode" a prompt out of them.

What OpenAI images do carry is provenance. They include C2PA content credentials, a signed manifest that records the image was produced by an OpenAI tool and when. A content-credentials verifier can read that manifest to confirm origin, but the manifest does not contain the prompt, and it is stripped just like other metadata when the image is screenshotted or re-uploaded to most platforms.

The practical route is the conversation itself. If the image is yours, ask ChatGPT in the same chat to print the exact prompt it sent to the image model; it can also describe which parts of the prompt drove specific details. If the image is someone else's, treat it like any stripped image and reconstruct the prompt with the methods below. For a comparison of what today's hosted generators can and cannot expose, see our Midjourney vs GPT Image vs Flux comparison.

Guessing the Prompt

When the prompt is not directly available with the image, it's still possible to obtain a prompt capable of reproducing a similar image. This is the principle of Image to Prompt, which consists of converting an image into a textual description.

CLIP Interrogator

A solution for Image to Prompt is to use a CLIP Interrogator - an AI model capable of describing any images, whether AI-generated or not.

CLIP Interrogator screenshot

A CLIP Interrogator combines a captioning model, which writes a natural-language description, with CLIP similarity scoring against large lists of artists, mediums, styles and modifiers. The output is a Stable Diffusion style prompt: a caption followed by comma-separated tags. It is fast and often gets the subject and medium right, but the artist and style tags are guesses ranked by similarity and should be pruned.

Interrogate CLIP in Automatic1111

The Automatic1111 web interface has a CLIP Interrogator tool directly integrated into the img2img tab.

Screenshot of Interrogate CLIP in Automatic1111

The same tab also offers a DeepBooru interrogator, which produces Danbooru-style tags and works much better than CLIP for anime and illustration images.

CLIP Interrogator Extension (Automatic1111)

There's an extension that allows you to choose from different models: CLIP Interrogator ext.

Online CLIP Interrogator

It's also possible to use an online CLIP interrogator rather than going through Automatic1111. Hugging Face and Replicate both offer an online interface that allows you to upload an image and choose the CLIP model to use to generate the description.

Describe Functions

An alternative to CLIP Interrogators is to use the Describe function offered by several image generation tools.

Fooocus Describe

Here's how to use the Describe feature in Fooocus:

Screenshot of Fooocus Describe feature

Fooocus offers separate photo and anime describe modes; pick the one that matches the image, then paste the result into the prompt box and generate with a checkpoint of the same style.

Midjourney Describe

If you're also a Midjourney user in addition to Stable Diffusion, know that it also has a Describe feature that you can use to get the prompt of an image.

Midjourney Describe

Describe returns several candidate prompts rather than one, which makes it a good way to see different vocabulary for the same look.

Image to Prompt with a Vision Model

The most flexible reconstruction method today is to upload the image to a multimodal assistant and ask for a generation prompt, because you can steer the output toward the tool and level of detail you need. ChatGPT, Claude and Gemini all accept images; the original method with ChatGPT is still the simplest:

  1. Upload the image and ask ChatGPT to describe it.
  2. Then ask ChatGPT to write the prompt to generate the image with Stable Diffusion.

Example of ChatGPT image analysis

A good reconstruction prompt asks the model to extract the visual details a diffusion model actually responds to: subject, medium, lighting, lens and camera, colour palette, style references, composition and mood. Copy and adapt this one:

Analyze this image and write a prompt to recreate it with a Stable Diffusion SDXL model.
Work through these elements before writing the prompt:
1. Subject: who or what, pose, expression, clothing, key objects.
2. Medium: photograph, digital painting, 3D render, anime, watercolor, etc.
3. Lighting: direction, softness, time of day, practical lights, colour temperature.
4. Camera and lens: focal length feel, depth of field, angle, framing.
5. Colour palette and mood.
6. Style and era references (name movements or genres, not living artists).
7. Composition: rule of thirds, symmetry, negative space, foreground/background.
Then output:
- A positive prompt as comma-separated phrases, most important first, under 75 tokens.
- A negative prompt listing what to avoid.
- Suggested aspect ratio and a checkpoint type (photoreal, anime or general).
Enter fullscreen mode Exit fullscreen mode

Run the prompt, generate, compare with the original, and feed the differences back ("the light is warmer and comes from the left, the shot is wider"). Two or three rounds usually get closer than any single interrogator output. Save the prompts that work in a collection; our prompt directory is built for exactly that.

Improving Results

When trying to reproduce an image using Stable Diffusion by guessing its prompt, the tools presented above should not replace your knowledge and imagination. None are perfect, and it's quite possible that the proposed prompts are incomplete or even erroneous. Don't hesitate to modify and correct the prompts to make them better correspond to what you see in the image.

Also try to choose a model adapted to the image you want to obtain: There are different models for different types of images (anime, photo, illustration, etc.), so use one that suits your needs.

Remember that you can also use an image as a prompt. Our article on Fooocus image prompt shows how to use this technique to reproduce the style or colors of an image.

Finally, remember that the prompt is only part of the recipe. The same prompt on a different checkpoint, seed, sampler or resolution produces a different image, so when metadata is available, copy the settings too, and when it is not, expect to match the look rather than the exact picture.

FAQ

Can you find the exact prompt of any AI image?

Only if the original file still carries its metadata, which is the case for untouched PNGs from Automatic1111, Forge, ComfyUI and Fooocus with metadata enabled. Images that have been screenshotted, compressed or shared on social platforms lose that data, and the prompt can then only be approximated.

How do I see the prompt of a Stable Diffusion image?

Drop the PNG into the PNG Info tab of Automatic1111 or Forge, or onto the ComfyUI canvas, or open it in any metadata viewer that lists PNG text chunks. The prompt, negative prompt, seed, sampler, steps and model hash appear as plain text.

Can I get the prompt from a ChatGPT image's gen_id?

No. The gen_id and parent id are internal references to a specific generation and contain no prompt text. Ask ChatGPT in the same conversation for the exact prompt it used, or reconstruct one with a vision model if the image is not yours.

Is there an AI image prompt detector that works on JPEGs from the web?

Tools like CLIP Interrogator, Fooocus Describe and Midjourney Describe work on any image, including stripped JPEGs, but they produce an approximate prompt rather than the original. A vision model such as ChatGPT or Claude gives the most detailed and editable reconstruction.

Why does the reconstructed prompt not reproduce the image?

Because the prompt is only one input; the checkpoint, seed, sampler, CFG scale, resolution and any LoRAs also shape the result. Match the model family to the image style, iterate on the prompt after comparing outputs, and use an image prompt or img2img to carry over composition and colour.

Cheers 🍻

Get the daily AI digest

One email each morning — what shipped in AI, and the prompts we tested. No filler.

Top comments (1)

Collapse
 
stabletom profile image
Thomas

Next time, remember to credit the author of the original post when you post a translation...

I guess copying is a form of compliment. So thank you for your interest.