# Edit ANY AI Image With This JSON Trick | Gemini Nano Banana 2

## Метаданные

- **Канал:** Teacher's Tech
- **YouTube:** https://www.youtube.com/watch?v=i_v5x8IsTC8
- **Дата:** 08.03.2026
- **Длительность:** 9:26
- **Просмотры:** 1,034
- **Источник:** https://ekstraktznaniy.ru/video/10966

## Описание

The Nano Banana JSON Trick for Perfect AI Images — Edit Text, Swap Objects & Clone Photography Styles in Gemini (FREE)

Stop regenerating your AI images over and over. In this video, I'll show you the one JSON trick in Google Gemini that gives you surgical control over any AI-generated image. Whether you need to fix text on an infographic, swap an object in a scene, or clone a real photography style — this method keeps everything else perfectly intact.

This works on the FREE version of Gemini using the Nano Banana image model. No paid plan required.

🔹 What you'll learn:
— How to extract structured JSON data from any AI image
— Edit text on infographics without changing the design
— Swap objects in a scene while keeping the art style consistent
— Clone real photography styles (lens, lighting, color grading) onto any subject
— Let Gemini rewrite the JSON for you using plain English
— Translate infographic text into any language instantly

⏱️ Timestamps:
0:00 — The Hook
0:40 — What is J

## Транскрипт

### The Hook []

Hi, I'm Jamie and welcome back to Teachers Tech. If you've used AI to generate images, you know it can create amazing visuals. But the second you want to change something, the whole image falls apart. You want to fix typo, swap one object, or match a specific style, and the AI gives you something completely different. Today, I'm going to show you a single trick using JSON and Gemini that solves all of these problems. We're going to start by editing text on an infographic that I made in Notebook LM. then swap objects in a scene without breaking the style. And finally, clone a real photography look onto a subject. And every single one of these works in the free version of Gemini. Let's get into it.

### What is JSON and Why It Matters [0:40]

Okay, let's start with how I can edit text with Gemini from a different image. So, I'm just going to go over to my notebook and I'm going to open up this infographic. And I know right here I have the word missing. the eye, the injection part is missing out of this one I created. It only has this one bracket on this side. I'm going to go ahead and download this here and I'm going to go back over to Gemini now. And I'm just going to drag this down into Gemini. So the prompt I'm going to give it is this. Extract all the visual from this image including all text content and format as it's structured in JSON file. So this down below you can copy paste it. This is going to be in the description. And I'm just going to go and submit. So this is the JSON file and you can see here's the title right through here. Uh we can see the

### Edit Text on Any Infographic [1:30]

different points. Here's the issue that was having and I think it has something to do maybe with these brackets. I'm going to try to that's what fix first, but we'll make a few other changes as well. I'm just going to go and write this down here. I'm going to say apply the following uh JSON code to the image. So, I am going to put the image down here again, just like this. And so, this I'm going to take this code and I'm going to just paste it right here. And I'm also going to drag this image down again into it. So, I'm going to update the code though. So, and it's very easy to do. Let's go ahead and make this full screen. And what do we want to do here? So, if I look at this, everything looks right here with the brackets, but it just doesn't seem to be pulling it out right. So, I'm going to make a change here. And I think it might be these. Maybe it's this type of brackets that's doing something here. And I'm going to go and I'm going to keep this in here. I'm just going to cut this out and put this in the end like this in brackets. So, I'll just put this after like this. So, I think I got the spaces out now. We'll put it like there. Okay. So, there's a change, one change that we've made. And let's see how this goes and looks. I do find I am going to turn it to pro. Sometimes when I have it on fast before it's rewritten things, but I want everything else to kind of stay the same. So, I'm going to go and submit. All right, it's all done. Let's take a look here. And we have our trans lunar injection. So, this came out uh the way we want. I'm not sure what was causing the issue before, but notice everything stayed the same. All the text is the same in here. All the setup. But if we want to keep making changes, we can go back to this. And I'm just going to go back to the edit prompt. And maybe you decide, you know, I want to change the title of this. And here's the title. So, I'm just going to go and just paste in a new cop uh title. So, it's just going to be Artemis, the Moon, and Beyond. I'm going to click update. All right, let's check this out. Now, I have a new title here. Everything else stayed the same here. I'm just going to bring over the original just so you can see that the structure didn't change. The one thing I would say if you go ahead and try to add, let's say you're trying to add more text, the structure isn't going to change. We're just making a few changes to the text, the way we're doing it, changing it with a JSON file, won't change. If I needed this to be bigger in

### Swap Objects Without Breaking the Style [4:00]

the background, it's not going to make those changes. So, if I try to add a lot more text, then it's going to go over top and out of this of the background. Just a tip there. But you can see how if you need to make some quick changes to some text using this JSON file way, this can uh keep the structure of your file and be able to make those quick changes. Tip number two, we're going to stick with JSON. And you know, just instead of asking Gemini to change the picture, we need to understand how it understands the picture. So this time I'm going to go and upload a file and it's just going to be of this one right here. I'll just open this up so you can see what it is right here. Okay. So, I'm going to go and do this again. Extract all the visual information from this image. Same as before, and it's going to be output in a structured uh JSON file. All right. So, here's the breakdown of that classroom. We can see everything from the color palette to the lighting to the objects and details. And what I'm going to do is just put this into the prompt down below. I'm going to say generate a new image using the JSON data but change the subject object from laptop to globe. So I'm going to go and copy this here and I'll paste it down. And I am going to put the uh upload files. I'm going to grab that one more time. And I'm just going to leave it on fast this time and submit. So here we go. Here is the new one. Here's the globe. And I'll just click on the other one. And it was a laptop here. uh before. So it did change everything but just the laptop. Everything else stayed identical between the two different ones. I would say a couple of weeks ago uh this was different because Nano 2 is a lot better at keeping consistent when you do prompt it if I would have just said change it from a laptop uh to a globe. It's getting a lot better at keeping everything else the same. That being said, I just like it when it can break down and you can kind of see what the entire picture uh is of how it's

### Clone Any Photography Style [6:00]

being created with its DNA. And let me give you one more example here. Now, okay, now here's where we take that JSON trick a little further. What we did works great for illustrations and AI generated art, but what if you want to make uh match a real photography style? So maybe we found a professional photo with beautiful lighting and you want to make all your images look like that. So if I go ahead, I'm going to go and upload a file and let's say this is the head shot and you want to have a headsh shot that looks just like this. And I'm going to go ahead and say describe the photography techniques in this image in JSON format. And I'm going to hit submit. Now, with the JSON, you can see how everything's broken down from the photography analysis, lighting, optics, and settings, color, and uh tonality, post-processing, all that information is there. So, I want to be taking this JSON information and apply it to one of my own photos. And how do we do that? Well, I'm going to go first of all, and I'll grab a photo uh that I have just in my gallery here. And I'll take this one. This is just me on a green screen. Nope. Not doing anything. slight smile. And I'm going to go ahead and just put this at the beginning. Generate a photo of this of the subject based on the following JSON file. So, I'm going to go up top and copy the code and place it in right here. So, I'm going to hit submit. Okay. So, here is the photo that came out. I can see the lighting has me wearing the exact same thing that she was in the first photo. And I'll want to change that. Now, I do want to point out every time I would rerun this, so if I put my picture in again and ran the exact same thing, a different picture would come out. I'll give you an example. So, I put the picture in and I'm just going to put the exact same code that I just did. And I'll hit submit. Okay, let's say maybe I like this one better, but you can see it's slightly different. I'm looking at the camera from a different angle. I'm still wearing not what I want to be wearing.

### Recap and Outro [8:00]

And if I like this picture better, I need to download this as the frame of reference here. So, I'm going to go download this. And once this download, I need to place this one back into uh my prompt area. And because what I'm going to say is this, add a blue buttonup shirt to the person in the JSON prompt. Now, I'm going to go and grab the same prompt that I had up here and place it in here. So now it should keep everything the same. I'll go ahead and I'll hit submit. Now you can see the consistency here. So from the facial expression here to the same thing here and all that changed was it was uh add it to the shirt and I just told Gemini to add that to the JSON code and it updated for me. So let's recap. The JSON trick gives you surgical control over AI images. We used it to edit text on Inval graphics without changing the design. We swapped objects in a scene while keeping the style perfectly consistent. And we cloned real photography styles onto a subject. The key prompt to remember is extract all visual information from this image and format it as a structured JSON file. That's your starting point for everything. Once you have the JSON, you can change anything while keeping everything else locked in. Thanks for watching this week on Teachers Tech. We'll see you next time with more tech tips and tutorials.
