Skip to content
← All writing
Image and video4 November 202615 min read20 sources

How to create images with JSON prompts in ChatGPT and Gemini

OpenAI and Google give JSON prompts no special status, so their value is as a complete, reusable brief. A template, three worked prompts and the checks to run.

By Mani Bharij, SEO & AI Search Consultant

In this postHover or tap a point
010203040506

Chapter 011 min

Which image models ChatGPT and Gemini use

JSON prompts for AI images are often sold with a promise attached: write the brief as code and the model will follow it more exactly. This post checks that against what OpenAI and Google publish about their own image models, sets out which models ChatGPT and Gemini use now, and gives a template and three worked prompts you can adapt. The last part covers putting generated images on a website, which is where the SEO questions start. The wider subject is in the image and video SEO guide.

Chapter 01 / 061 min

Which image models ChatGPT and Gemini use

Image generation in ChatGPT is now called ChatGPT Images 2.5. OpenAI's system card for it, dated 8 September 2026, names the two models behind it: GPT Image 2.5 Sunburst and GPT Image 2.5 Flare.1 In OpenAI's API, Sunburst is the choice where editing precision matters most and Flare is for fast everyday generation. OpenAI points new integrations to these two, documents GPT Image 2 as an earlier model, and shut the original GPT Image 1 down on 23 October 2026.2

Nano Banana is Google's name for Gemini's native image generation.3 In the Gemini app, Nano Banana 2 handles image requests when the Gemini model is set to Flash or Pro, Nano Banana 2 Lite is used on Flash-Lite, and anyone on a Google AI plan can redo an image with Nano Banana Pro when it needs more detail.4 The Gemini API lists a newer Nano Banana 2.1 as its main model for generation and editing, alongside Nano Banana 2 (Gemini 3.1 Flash Image), Nano Banana Pro (Gemini 3 Pro Image), Nano Banana 2 Lite and the original Nano Banana (Gemini 2.5 Flash Image), which Google now calls a legacy model.3

Where you use itModelsNotes
ChatGPTGPT Image 2.5 Sunburst and FlareReleased as ChatGPT Images 2.5 in September 2026.1
OpenAI APIgpt-image-2.5-sunburst, gpt-image-2.5-flareSunburst for precise edits, Flare for speed. GPT Image 1 was shut down on 23 October 2026.2
Gemini appNano Banana 2, Nano Banana 2 Lite, Nano Banana ProPro is on Google AI plans, for redoing an image with more detail.4
Gemini APINano Banana 2.1 plus the models aboveEvery generated image carries a SynthID watermark.3
Image models in ChatGPT and Gemini, November 2026

These names change often. The prompting advice below has stayed much the same in Google's guides from the first Nano Banana to Nano Banana 2, so it should outlast the version numbers.

Chapter 02 / 062 min

Does JSON prompting work better?

A JSON prompt is a brief written as keys and values, such as "lighting": "soft daylight from a window on the left". You can paste one into ChatGPT or Gemini and get an image back. The real question is whether the format does anything that a well-written paragraph with the same details does not.

OpenAI answers it in its prompting guide for GPT Image 2.5. The guide says short prompts, descriptive paragraphs, JSON-like structures, instructions and tags can all express the same intent, and advises picking whichever format makes the requirements easiest to read and update, without relying on special syntax. For complex requests it suggests organising the prompt into scene, subject, details and constraints, as labelled sections.5 There is a second reason the braces may matter little. In OpenAI's API, when a chat model calls the image tool, it rewrites your prompt before the image model sees it, and the rewritten prompt in OpenAI's example is plain prose.2 OpenAI does not document whether ChatGPT does the same.

Google's guides lean further towards prose. A Google Developers Blog post on prompting the first Nano Banana told readers to describe the scene instead of listing keywords, and said a flowing description nearly always produces a more coherent image than a string of unconnected words.6 Google Cloud's guide to Nano Banana 2 and Nano Banana Pro, published in March 2026, says a simple keyword list is not enough and gives a formula: subject, action, location or context, composition, style. Its worked example labels each part in square brackets inside ordinary sentences.7 Neither guide mentions JSON, and nor does the prompting section of the Gemini API documentation.3

JSON does matter when a model was trained on it. Bria AI's FIBO is an open text-to-image model trained on long structured captions, each one a detailed JSON that breaks the image into fields, and its authors note that most existing models are trained to map short natural-language prompts to detailed images.8 None of the OpenAI or Google documentation I read describes anything like that for their image models.

The practitioner tests I found point the same way, with the caveat that they are small. Finn McKenty, writing on photographer Chase Jarvis's site in December 2025, ran a JSON prompt and the same description in prose twice each on Nano Banana Pro and concluded that the JSON was a placebo.9 Chris Green, after a few weeks of using JSON prompts (his examples were made with Flux.2), found they did not produce better images than a well-crafted natural-language prompt, though they made his prompts easier to reuse and adjust.10 Four images and one person's experience are anecdotes. They agree with what the platforms publish.

So treat JSON as a way of organising a brief, which is still worth something. Named fields stop you forgetting the framing or the words that must appear, and a saved prompt can be reused across a product range with one field changed. If your team prefers labelled lines in plain English, they do the same job, and that is what OpenAI's guide suggests for complex requests.5 I would use JSON where prompts are stored in a spreadsheet or a script, and labelled lines everywhere else.

Chapter 03 / 061 min

A reusable JSON template for marketing images

The fields below come from what the two companies' guides ask for: what the image is for, the subject, setting, composition, light, style, exact text, reference images and, for edits, what must stay the same.53 Delete any field you do not need, but fill in the ones you keep. Models given sparse prompts tend to fill the missing details in arbitrarily.8

Prompt /ChatGPT, Claude or similar

JSON image prompt template

Create this image: { "use": "[where it will appear, e.g. product page, blog header, Instagram post]", "image_type": "[photograph, illustration, 3D render or flat vector graphic]", "subject": "[what the image shows, with materials, colours, size and condition]", "action": "[what the subject or any person is doing, or still life]", "setting": "[location and background]", "composition": "[framing, camera angle, where the subject sits, any empty space to leave]", "aspect_ratio": "[e.g. 16:9, 4:5 or 1:1]", "lighting": "[light source, direction, time of day]", "style": "[colour palette, texture, finish, amount of retouching]", "text_in_image": "[exact words in quotes, with position and lettering style, or none]", "references": "[Image 1 is ..., Image 2 is ..., with the role of each, or none]", "keep_unchanged": "[for edits: everything that must stay exactly as it is]", "exclude": "[things that keep appearing and must not, e.g. extra text, logos, watermarks]" }

Fill in the parts in brackets before you send it

CheckReplace every bracketed placeholder or delete the line. When the image comes back, check it against each field in turn, starting with text_in_image and keep_unchanged, and ask for one correction at a time.

In the Gemini app, Google suggests starting a request with a word such as draw, generate or create,4 which is why the template opens with a plain instruction above the JSON. Some fields need more care than others:

  • use: Google says explaining what an image is for shapes the result, so a logo request that names the kind of brand does better than a bare request for a logo.3 Say where the image will sit and who will see it.
  • text_in_image: put the exact words in quotes, say where they go and how they should look, and ask for no other text.5 Google adds that Gemini works best if you settle the wording in conversation first, then ask for the image with that text.3
  • exclude: OpenAI recommends listing exclusions such as unwanted text, logos or watermarks.5 Google suggests describing what you want positively where you can, an empty street instead of a street with no cars.3 Do both: describe the scene you want, and keep the exclusion list short.
  • aspect_ratio: in the APIs, size is a setting passed separately from the prompt.5 In the chat apps, write the ratio into the prompt unless the app gives you a control for it. Nano Banana 2 and Nano Banana Pro support ratios including 1:1, 4:5, 9:16, 16:9 and 21:9.7
  • style: describe what you want to see. OpenAI's guide treats camera details such as a 50mm lens as cues for how the image should look, with no promise that the optics are simulated exactly.5
  • references: number each image you attach and give it a role, such as subject, style or background, then say how they should combine.5
Chapter 04 / 061 min

Worked prompts: a product shot, a blog header and an edit

The three prompts below are written for an invented business, Ashdown Candle Co., with placeholders where your own details go. Paste them into either app and adjust.

Product lifestyle shot from a real product photo

For product images, start from a photograph of the real product and make the prompt protect it. A generated product that drifts from the real one in shape, colour or label shows customers something you do not sell. OpenAI's guide says to give each attached image a role and to list what must be preserved,5 and Google's formula for prompts with references follows the same pattern: the references, how they relate, then the new scene.7

Prompt /ChatGPT, Claude or similar

Product lifestyle shot (attach the real product photo)

Create this image, using the attached photo as image 1: { "use": "Secondary lifestyle image for the product page of [product name, e.g. Ashdown Fig and Cedar candle]", "image_type": "Photorealistic product photograph", "references": "Image 1 is the real product. Keep its shape, proportions, colours, label design and label text exactly as they are in image 1.", "subject": "[product, e.g. a 300g amber glass jar candle with a cream paper label], lit, with a small steady flame", "setting": "[surface and room, e.g. an oak side table in a calm, uncluttered living room], softly out of focus behind the product", "composition": "Product in the left third, three-quarter view at eye level, sharp focus on the label, open space on the right", "aspect_ratio": "4:5", "lighting": "Soft daylight from a window on the left, warm glow from the flame, gentle shadow falling to the right", "style": "Natural colour, real textures, light retouching only", "text_in_image": "Only the text already printed on the product label", "exclude": "Other products, props with brand names, added text, watermarks" }

Fill in the parts in brackets before you send it

CheckCompare the label letter by letter, and the jar shape and colour, with the real product. If anything has drifted, regenerate, or composite the real packshot into the scene in an image editor. Keep a real photograph as the main product image and use the generated scene as a secondary one.

Blog header image

A header image works best with no words in it. The title belongs in the HTML, and Google advises against an image with text as the preferred image you give it through og:image or schema.org markup, along with images that are extremely narrow or wide.11 Leave a quiet area so the image can sit beside a headline and survive cropping.

Prompt /ChatGPT, Claude or similar

Blog header image

Create this image: { "use": "Header image for a blog post titled [post title], shown at 16:9 above the headline and used as the og:image", "image_type": "[editorial photograph or flat illustration]", "subject": "[one concrete scene that shows the topic, e.g. a candle maker pouring wax into amber jars in a small workshop]", "setting": "[place and time, e.g. a bright workshop with shelves of finished candles behind]", "composition": "Wide shot, main subject on the right third, calm uncluttered area on the left, nothing important near the edges", "aspect_ratio": "16:9", "lighting": "[light, e.g. low morning sun through a side window]", "style": "[house style, e.g. muted natural colours with one accent of deep green, subtle film grain]", "text_in_image": "None", "exclude": "Any lettering, logos, readable screens or labels, watermarks" }

Fill in the parts in brackets before you send it

CheckCheck the image at the crops your theme uses, on mobile and desktop. Look for stray lettering on signs, jars or screens in the background and ask for a version with that area simplified. If the scene is photorealistic, decide how you will label it before it goes live.

Editing an existing image

Edits go wrong when the prompt says what to change but not what to keep. OpenAI's guide advises telling the model to change only the named element and listing what to preserve. It warns that repeated edits can still alter details you meant to keep, and suggests compositing the approved edit back into the original where part of the image must stay pixel-identical.5 Google's inpainting template makes the same point: change only the named element and keep everything else exactly as it was, including the style, lighting and composition.6

Prompt /ChatGPT, Claude or similar

Replace the background of a product photo

Edit the attached photo (image 1) as described: { "task": "Change only what is listed under change. Leave everything else as it is.", "references": "Image 1 is our photo of [product] on [current background, e.g. a cluttered workbench]", "change": "Replace the background with a plain [colour, e.g. light warm grey] studio backdrop with no visible edges or folds, and add a soft, natural contact shadow under the product", "keep_unchanged": "The product's shape, proportions, colours, label text and edges, plus the camera angle, framing and lighting direction", "match": "Light the new background to match the existing light on the product", "exclude": "New objects, added text, logos, watermarks" }

Fill in the parts in brackets before you send it

CheckPut the original and the edit side by side at full size and check the label, the product edges and anything reflective. Treat each further change as a new request and repeat the keep_unchanged line, so the constraints are restated every time.
Chapter 05 / 061 min

What to check by hand before you publish

Both companies publish limits worth turning into a checklist. OpenAI says its models can still struggle with precise text placement, with keeping recurring characters or brand elements consistent, and with placing elements exactly in layout-sensitive compositions.2 Google says its models will not always return the number of images you ask for.3

Checklist0 of 7 done
Chapter 06 / 064 min

Using generated images on a website

A generated image goes through the same search systems as any other image, so the ordinary image SEO rules apply. The image and video SEO guide covers them in full. These are the parts that matter most for generated images.

File names and alt text

Rename every generated file before you upload it. Google says a file name gives it very light clues about an image's subject, and prefers short, descriptive names to generic ones such as image1.jpg.11 Alt text matters far more. Google calls it the most important attribute for giving it information about an image, reads it together with computer vision and the page's content, and warns that filling it with keywords can get a site treated as spam.11

Write the alt text from the finished image. The prompt describes what you asked for, and the image may differ from it. Google's guidance on generative AI content says AI output needs a manual check for accuracy before publishing, and names alt text among the metadata that check covers.13 If a header image only sets the mood and adds no information, it is decorative, and the W3C's alt decision tree says decorative images get an empty alt attribute.14

HTML: a product image and a decorative header
<!-- A meaningful image: descriptive file name and alt text -->
<img src="/images/fig-cedar-candle-oak-side-table.webp"
  alt="Lit Fig and Cedar candle in an amber glass jar on an oak side table"
  width="1600" height="2000">

<!-- A decorative header: empty alt, with a visible label -->
<figure>
  <img src="/images/candle-workshop-pouring-wax.webp" alt="" width="1920" height="1080">
  <figcaption>Image created with AI.</figcaption>
</figure>

Provenance: C2PA Content Credentials and SynthID

Images from ChatGPT and from Google's image models can carry two kinds of provenance signal. The first is C2PA Content Credentials, the plain name for a C2PA manifest: a signed set of statements about where a file came from and what was done to it. The standard can bind those statements to the file with a cryptographic hash, or with a fingerprint or invisible watermark, and it is designed to make no judgement on whether a set of provenance data is good or bad, only whether its statements can be validated.15 The second is SynthID, Google DeepMind's invisible watermark.1

OpenAI says ChatGPT Images 2.5 keeps C2PA metadata and adds SynthID watermarking across ChatGPT, Codex and its API.1 Its verification tool checks for both, and its documentation is plain about the limits: editing, converting or sharing a file can remove the metadata, the watermark may survive some changes, and a negative result does not prove an image was made by a person.16 Google says every image from its Gemini image models carries a SynthID watermark,3 and its Cloud guide says images generated there include C2PA Content Credentials as well.7 In May 2026 Google began rolling out C2PA checks in the Gemini app, said they would reach Search and Chrome in the following months, and said OpenAI, Kakao and ElevenLabs were bringing SynthID to their own AI content.17

A third label sits in ordinary image metadata. The IPTC Digital Source Type vocabulary has one value for images created using generative AI, trainedAlgorithmicMedia, and another for images edited using generative AI, for example by inpainting or outpainting, compositeWithTrainedAlgorithmicMedia.18 Google's guidance for ecommerce sites says Merchant Center requires AI-generated images to carry the TrainedAlgorithmicMedia value.13 The ecommerce SEO guide covers the feed side.

The weak point is usually your own pipeline. Converting or editing a file can remove its C2PA metadata,16 and image optimisers, CMS uploads and CDNs can convert or recompress files on the way. Take one generated image through the whole route to the live page, download the file the site serves, and check what survived. I have seen no evidence that provenance data changes rankings. Keep it because it is honest, and because Merchant Center requires it for product images.

Labelling rules in the EU and the UK

In the EU, the AI Act's transparency obligations have applied since 2 August 2026. Providers of generative AI, such as OpenAI and Google, must mark outputs in a machine-readable format so they can be detected as artificially generated. Deployers must disclose deepfakes, content that would falsely appear to a person to be authentic or truthful. The Commission's code of practice on this is voluntary, but the obligations themselves are law.19 The Act defines a deployer as anyone using an AI system under their authority, except in a personal, non-professional activity, so on that definition a business publishing images it generated is one. It defines a deepfake as AI-generated or manipulated image, audio or video that resembles existing persons, objects, places, entities or events and would falsely appear authentic or truthful.20

On my reading, a stylised illustration does not meet that test. A photorealistic image of your premises, your staff or a customer event that never happened could, and that is the kind of image to label clearly for EU audiences.

The UK has no equivalent rule. The ASA said in May 2025 that there is no blanket legal requirement to disclose the use of AI in ads, and that the advertising codes apply however content is made. It also said disclosure alone is very unlikely to rescue a fundamentally misleading ad, with the example of an AI image showing a cosmetic effect the product does not deliver.12

The rule I would follow everywhere: label any generated image that could pass for a photograph of something real, with a short caption such as "Image created with AI", and never use a generated image to show what a product looks like or does unless it matches the real product. If you are weighing generated video as well, read whether AI video generation is worth paying for yet.

Questions5 answered

Common questions

01Can ChatGPT create an image from a JSON prompt?
Yes. Paste the JSON into a message with a line asking for the image. OpenAI's prompting guide treats JSON-like structures as one of several equally valid formats, alongside short prompts, paragraphs and tags,5 so the details inside the JSON matter more than the braces.
02Do JSON prompts work better in Gemini and Nano Banana?
There is no evidence that they do. Google's prompting guides ask for scenes described in sentences and do not mention JSON,7 and a small test on Nano Banana Pro found no advantage for it.9 Use JSON if it helps you write a complete brief.
03Which model does ChatGPT use to create images?
Since September 2026, ChatGPT Images 2.5. OpenAI's system card for it covers two models, GPT Image 2.5 Sunburst and GPT Image 2.5 Flare.1
04How can I tell whether an image was made with ChatGPT or Gemini?
Check its provenance signals. OpenAI's verification tool looks for its C2PA Content Credentials and SynthID watermark,16 and the Gemini app can check images for SynthID and for C2PA credentials.17 A negative result proves nothing, because editing, converting or sharing a file can remove its metadata.16
05Do I have to label AI-generated images on my website?
In the EU, realistic generated images that resemble real people, places or events and would falsely appear authentic count as deepfakes, and the duty to disclose them has applied since 2 August 2026.19 The UK has no blanket rule, but ads must not mislead.12 Product images in Merchant Center must carry IPTC metadata marking them as AI-generated.13
References20 sources

Sources

  • Platform docs11
  • Regulator6
  • Research1
  • Practitioner2
  1. 01ChatGPT Images 2.5 System CardOpenAI (September 2026)Platform docs
  2. 02Image generationOpenAI API documentation (November 2026)Platform docs
  3. 03Nano Banana image generationGoogle AI Studio, Gemini API documentation (November 2026)Platform docs
  4. 04Generate & edit images with Gemini AppsGemini Apps Help (November 2026)Platform docs
  5. 05Image promptingOpenAI API documentation (November 2026)Platform docs
  6. 06How to prompt Gemini 2.5 Flash Image Generation for the best resultsGoogle Developers Blog (August 2025)Platform docs
  7. 07Ultimate prompting guide for Nano BananaGoogle Cloud Blog (March 2026)Platform docs
  8. 08Generating an Image From 1,000 Words: Enhancing Text-to-Image With Structured CaptionsarXiv (Gutflaish et al., Bria AI, November 2025)Research
  9. 09Does JSON Prompting Actually Work? Tested with Nano BananaChase Jarvis (Finn McKenty, December 2025)Practitioner
  10. 10JSON Prompting for Image GenerationDiffusion Doodles (Chris Green, April 2026)Practitioner
  11. 11Image SEO Best PracticesGoogle Search CentralPlatform docs
  12. 12Disclosure of AI in Advertising: Striking the Balance Between Creativity and ResponsibilityASA and CAP (May 2025)Regulator
  13. 13Google Search's guidance on using generative AI content on your websiteGoogle Search CentralPlatform docs
  14. 14An alt Decision TreeW3C Web Accessibility InitiativeRegulator
  15. 15Content Credentials: C2PA Technical Specification 2.3Coalition for Content Provenance and Authenticity (December 2025)Regulator
  16. 16Content provenanceOpenAI API documentation (November 2026)Platform docs
  17. 17Making it easier to understand how content was created and editedGoogle (May 2026)Platform docs
  18. 18Digital Source TypeIPTC NewsCodesRegulator
  19. 19Code of Practice on Transparency of AI-generated ContentEuropean Commission (updated October 2026)Regulator
  20. 20Article 3: DefinitionsEU AI Act, Regulation (EU) 2024/1689 (AI Act Explorer)Regulator

Written by Mani Bharij, SEO & AI Search Consultant in London. More on this subject in the Image and video SEO guide.

Keep reading

Questions about any of this?

LinkedIn is the easiest place to reach me. Send a message or connect, and I will reply there.