How to Use the NEW Nano Banana 2 in n8n (cheaper & no watermark)
Scores
All right, so we got the workflow ready. I'm going to open up this form and I'm going to drop in an image of myself. And for the image prompt, I'm saying a hyperrealistic image of this man shaking hands with Adam Sandler. It's close up enough to see extreme detail, but we can still see both people in frame. So, I'm going to go ahead and shoot this off, and I'll check in with you guys when we get that image. I don't even know what to say. This is ridiculously good. I really don't love the idea of zooming in closeup on my face in front of the entire internet, but this is incredible. Look at the amount of detail that they put into this image. Anyways, let me show you guys how we do this with Nitn and Nano Banana Pro. It's been a crazy week in the AI space and now we've got Nano Banana Pro to play with. Nano Banana by itself was already amazing, but the Pro version comes with so many upgrades. Here's an example of an input image being turned into an infographic. Here's another infographic, and you can also see that all of the words and letters are correct, which sometimes was an issue with Nano Banana. Here's a cool and really creative example of the word Berlin spelled out across multiple buildings. I also thought this one was pretty cool where it was able to just translate the English words into Korean. And one of my favorite parts about Nano Banana is the ability to combine tons of different images together. In this example, you can see 14 different images of these little monsters were fed in and then the image produced all of them sitting together in one environment. You can also do this with different people with different types of clothing with furniture. So all of these six images were fed in and this is what we got in the end. Here's another quick example with these different elements. And then one final one. That one's pretty cool, too. But anyways, what I'm going to be showing you guys today is how we can use Nano Banana Pro in NADN so we can power our automations with better images. I'm going to be going over three different examples here. First, we've got text to image. Then, we're going to be doing image to image. And then finally, we'll do multiple images to an image. And the way that we're going to be accessing Nano Banana Pro is through key, which is kind of like an AI image and video generation model marketplace. As you can see, we've got Sora 2 VO3.1, and right here we have Nano Banana Pro. It's also crazy because Nano Banana Pro through KAI does two really cool things. It gives us no watermark, so we don't get the little Gemini logo in the bottom right of our images. And we can get our images in 4K for just 12, which is about 20% cheaper than the official price. But you should note that pricing may change in the future. So right now, if you can get it for 12 cents a key, then get here and take advantage of it. Anyways, the reason why we're here in Keyai is so that we can access Nano Banana Pro through our API calls in NIN. And so that's why we can look right here at the API documentation and create our tasks and basically make requests for images. Now, if you just want to get a feel for it and play around with it a little bit, you can test out prompts and images in the playground environment right here. You can see here's a funny example where I dropped in an image of me, an image of Scotty getting his green jacket, and I said basically to put me in that environment. And this is what we got. And I mean, once again, a really good picture, really good detail. The hands even look decent. The background looks good. This is just really impressive. That's enough wasting time. Let's get into this first demo with a text to image flow. So, if you guys want to download this workflow so that you can just plug in your API key and just get going, then I will leave that for free in my free school community. The link for that will be down in the description. So, when you guys get this workflow, all you'll have to do is change a few of the prompts in these nodes, which I will show you guys right now. So, for our first example, the image prompt is in here, and I said a hyperrealistic image of the Chicago skyline at sunset. So, I'm going to go ahead and run this first row. And while this is running, I'll explain real quick how this all works. So you can see that we're making two different API calls. The first one that we're making is to actually create the image. So if I click into here, you'll see that we're hitting the endpoint to create a task. Then we're putting in our API key. So when you get this workflow, all you'll have to do is replace this string with your own API key. And the way that you can get your API key is you go to key.ai, you make an account, put in some billing information, and then on this lefth hand side, go to API key, and then all you have to do is create a new one, and then copy that value. like I said, right into here instead of where mine is. And then you can see we have an actual body request, which is our image that we want. And so we want to use the model Nano Banana Pro. We put in our image prompts right here, as you can see, which comes through as a hyperrealistic image of the Chicago skyline at sunset. We have our aspect ratio, we have our resolution, and we have our output format. And so in case you're wondering where I got all of this information from, I got it from the API documentation of Nano Banana Pro right here, where you can see it gives us the endpoint. It gives us what we need to include. So, we need to include the model, which is Nano Banana Pro. We need to include the input prompt, which is how we turn that text into an image. And then we have some other optional things like the image input, which I'll show you guys later when we do an image to image example. We have the aspect ratio. So, right now in this example, we're doing 1:1, but you could also do 2 3, 32, 16:9, 916. And then we have our input resolution, which we can do 1K, 2K, or 4K. And then, of course, finally, we have the output format. So, that's the first API call that we make. And what happens after we do that first one is it comes back to us and it says, "Okay, cool. We got your request and here is your task ID." So the way that I like to think about this is when you go and you order food at some sort of restaurant and they give you a number. This is basically the number that they give you and they're telling you, "Okay, we're going to work on your food." And so while they're working on our food or our image, what we have to do is wait. So I've got a wait note here which is going to wait for about 5 seconds. And then after it finishes waiting, we're going to make another API call. And this one is to get the image. It's going to check the status of our request or our food order. And so the way that I filled out all this information was I came into the API documentation for Nano Banana Pro. And then I went to query task instead of create task. And so I'm not diving super deep into the API stuff right now. If you want to see a full breakdown, I've got a really good video on that. I'll tag that right up here if you want to check it out. And the query task one is much simpler because all we have to do is we have the endpoints and then we have to give it that task ID or the order number and then we give it our API key once again. So in any what that looks like is the task ID I was able to drag in from this lefth hand node and this is what the create image API call gave us and then of course I'm giving it my API key down here. And so when we do this you can see we have kind of this loop. This is called polling which means every 5 seconds we're basically going to keep checking in to see if it's done. And you can see here it took 13 tries. And so what happens is we do this switch node because when we check in on our order they can basically tell us it worked. it's still generating or it failed. And so we have three different paths for those three different scenarios. And what you can see is if it's still generating, it loops back. It waits five more seconds. It checks again. If it fails, the process just ends. And if it's successful, it moves on to the next step. So that guarantees that we just only move on if we were successful and if the image is done. And then when it's done, we move over here to the result and we get this final URL, which I will go ahead and download real quick. And we have our beautiful image of the Chicago skyline at sunset. And this is actually crazy. I mean, look at the water, look at the cars, look at the lights, the sky. Like, this is actually really, really good. All right, so the good news is now that we understand this flow, the two flows beneath are pretty much the exact same thing. The only difference is instead of just sending over text in the body to make the request for the image, we're also sending over either one image or multiple images. So that's really the only difference here. Okay, so let's move on to the second example where we're getting an image and we're turning it into a different image. So I'm going to open up the form and what I'm going to do is type in an image prompt and drop in an image file. Okay, so I dropped in an image of me holding my laptop and I said make this man sitting on a beach using the laptop. The image should be hyperrealistic. We should see all detail. And keep in mind these prompts are not optimized or very good at all. But with this little of a prompt, you'll see how good the results are. So I'm going to shoot this off. We turn that image into a public URL because Nano Banana needs a URL to be public in order to use it and view it and change it. And then we're going to do the exact same thing where we're waiting. And actually, what you can see happened here is this failed. And so that's why we have this as a switch with different paths. And actually, I'm kind of glad that that happened so I can show you guys how we can check our logs. So if you go back into key and then you go over here to the logs, you can see your different runs and if they were successful or if they failed. And what I've noticed is that right now because Nano Banana is super new and probably tons of people are using it. Sometimes I get failures when I just kind of like shouldn't. And you can see the message here is just a 422 and it says unexpected error handling prediction. So I'm just going to run that exact same example with the same picture, the same prompt and run it again and I'll show you guys that it goes through. All right, so that just finished up and you can see it's literally the exact same image. It's the one of me on the laptop and what I dropped in as the prompt was the exact same prompt. So sometimes it's just going to fail and it's not even your fault. So just wanted to let you guys know that. But let's go ahead and take a look at this results and hopefully it's pretty good. All right, there we go. I would say that this is pretty solid. It even got my haircut in there. It's got the shirt and we can see that I've even got some sand on my hand. We've got a nice little reflection in the Apple logo, too, which is a nice touch. But I mean, this stuff is pretty solid. And so really the only difference here, of course, is that we're sending over an image with the text prompt. So we get our image in the form as binary. We use this HTTP request to turn that binary into a publicly facing URL. As you can see right here, if I open this up, we get the laptop image. And then we pass this URL into key for Nanoban to use. And we do that in the body request of this down here. And as you can see, we just have one extra little object in this JSON body. And that is called image_input. And then this is where we put the variable for our picture URL. And that obviously comes across over here. So now Nana Banana has a picture and it has our prompt and then it goes ahead and combines those to make the new image. All right. So you guys remember how right here I told you we had to upload that binary picture to imageB in order to turn it into a publicly facing URL. Well, I'm going to show you guys a different way that you could do it down here where you don't have to do that, but you do have to make sure the image URLs are public. So you can come into this node and you can set a image prompt and then three different images. And all of these are public facing URL images of an Amazon product. So the first one we have is a Santa shirt. The second one we have is this Whoop. And then the third one we have is this Oala water bottle. And what we have as a prompt is a hyperrealistic image of a man wearing the shirt provided in the image. He's hiking on a mountain and is holding the water bottle provided in the image. He's also wearing the watch provided in the image. So we're going to go ahead and run this one. And once again, it's the exact same flow where we send off the request, we wait, we pull, and then we constantly pull until we have our success message. And by the way, while this is running, if you guys noticed how dark this is, and it's recent update has like a new dark mode, and it's darker than the original dark mode. And I made a post in my community about it, and I started to get a little bit roasted for not liking the new dark mode. So, just kind of thought that was funny. All right, so this one just finished up. And what you'll notice is because we did three images, it did take longer. So, this one pulled 35 times rather than some of these were more like 13 or 15. But let's take a look at this final image. That's awesome. You can see we've got the Oala text is almost perfect. We've got the Santa shirt. We've got some sweat on the arm and the whoop down there. And this is pretty much exactly what we were hoping to get. The whole background looks super awesome as well. But in this one, as far as the differences in this node to this node, there's only one. And that is in the body request in our array of images that we're sending over. We're just sending over three rather than one. So anyways, I know that some of these were fun examples, but I hope you guys can see how fast this stuff is improving. And I'll be honest, it is a little bit scary. There are certain concerns when you don't have watermarks and when things look so real, you can't tell if they're fake or not. And I get that. But it's very exciting to also think about what opportunities this stuff actually brings. How much more can small businesses now do with content and ads if they don't have budgets to go rent out a whole studio and pay actors and things like that? And you can now literally place your products almost anywhere and you can go get a professional headshot without going to a professional headshot studio. So, I'm not trying to be oblivious to some of the risks and some of the fears, but I'm just trying to spread some excitement. So, once again, download these workflows for free. Just play around with the stuff and see how you can work it into your LinkedIn posts, your copy, your content, whatever it is. use this stuff to save you time. If you want to dive deeper into some of these use cases, then definitely check out my plus community. We've got a great community of over 200 members who are building with nodn every day and building businesses with Naden every day. We've also got full courses in here. We've got agent zero for the beginners, foundations of AI automation. We've got 10 hours to 10 seconds where you learn how to identify, design, and build time-saving automations. For our premium members, we've got one person AI agency and subs to sales. And then for everyone in the community, we've got tons of projects in here which are kind of like live step-by-step projects and builds that you can follow along to. We also run one live call per week in the community. So, I'd love to have you guys in those calls in the communities. But that's going to do it for today. So, if you enjoyed the video or you learned something new, please give it a like. It definitely helps me out a ton. And as always, I appreciate you guys making it to the end of the video. I'll see you on the next one.
Summary
This video demonstrates how to use Nano Banana Pro in n8n workflows for generating high-quality images through text-to-image, image-to-image, and multiple-image-to-image transformations, leveraging KeyAI's API for cost-effective, watermark-free 4K outputs.
Key Points
- The video introduces Nano Banana Pro as an advanced AI image generation model with improvements over the original Nano Banana.
- It showcases three use cases: text-to-image, image-to-image, and multiple images to one image, all integrated into n8n workflows.
- Nano Banana Pro is accessed via KeyAI's API, offering 4K images for 12 cents (20% cheaper) without watermarks.
- The workflow uses API calls to create tasks, poll for completion, and retrieve generated images, with error handling for failed requests.
- Users can input images via public URLs or binary files, with the system converting them into accessible formats for processing.
- The example workflows include generating a Chicago skyline, transforming a person into a beach setting, and combining multiple products into a single scene.
- The presenter emphasizes the speed, quality, and practical applications of AI-generated images for content creation and small businesses.
- The video includes a free workflow download and promotes a community for deeper learning and automation projects.
Key Takeaways
- Use KeyAI's API to access Nano Banana Pro in n8n for high-quality, watermark-free image generation at a low cost.
- Implement polling loops in n8n to reliably check the status of image generation tasks until completion.
- Input images can be converted to public URLs or directly fed as binary data to support image-to-image transformations.
- Leverage text prompts with multiple image inputs to create complex, realistic composite images in a single workflow.
- Download the provided workflow to quickly start generating images without needing to build the automation from scratch.