Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Explore Nano Banana 2 Lite in the Gemini Platform Studio UI
/ 25
Set up the Colab Enterprise notebook environment
/ 25
Query Nano Banana 2 Lite from your notebook
/ 25
Generate images that include text using Nano Banana 2 Lite
/ 25
Explore Nano Banana 2 Lite in the Gemini Platform Studio UI
/ 25
Set up the Colab Enterprise notebook environment
/ 25
Query Nano Banana 2 Lite from your notebook
/ 25
Generate images that include text using Nano Banana 2 Lite
/ 25
In this lab, you will explore the image generation and editing capabilities of
This model produces text and image outputs, and is popular for the degree of control it offers by allowing you to edit images simply by describing the changes you would like to see. Learn more about its capabilities from the Gemini 3.1 Flash-Lite Image model documentation.
In this lab, you use Gemini Platform Studio and the Google Gen AI SDK for Python to interact with Nano Banana 2 Lite to:
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the right is the Lab setup pane with the following:
In the Lab Setup section, right-click Open Google Cloud console and select Open link in new window (or alternatively right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab Setup pane.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab Setup pane.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
In this section, you will use Gemini Platform Studio to explore Nano Banana 2 Lite.
In the Google Cloud console, from the Navigation menu (), select Gemini Platform.
In the left navigation pane under Gemini Platform, click Studio.
If an Enable APIs banner appears at the top of the Studio page, click Enable APIs and confirm by clicking Enable.
In the upper-left corner of Studio, click + New, then click Chat to open the chat prompt.
In the chat input, type /model and press Enter to bring up the model settings.
Select
At the bottom-left of the prompt input box, click the + button and select Import from Cloud Storage.
Select the bucket gs://-bucket/ and select the image cymbal-shops-ui.png.
Click Select.
Click the image thumbnail that appears in the prompt box to preview a higher-resolution version of the image. It is a UI mockup of a new mobile website for Cymbal Shops.
Click Close to exit the image preview.
In the prompt input box, enter the following text to accompany the image, then click the Submit (arrow) button or press Enter.
Example Output (yours may be different):
In the same chat session, enter the following follow-up prompt and click Submit to see how Nano Banana 2 Lite maintains character consistency across turns:
Example Output (yours may be different):
(Optional) Click New chat in the upper-left corner of Studio and try the prompt again to see variations.
Click Check my progress to verify the objectives.
In this section, you will open a Colab Enterprise notebook to send requests to the Nano Banana 2 Lite model using the Python Google Gen AI SDK.
In the Google Cloud console, from the Navigation menu (), select Gemini Platform > Notebooks > Colab Enterprise.
In the left Colab Enterprise navigation pane, click My notebooks.
From the Region dropdown, select
When the notebook opens, use the File > Rename menu item to rename the notebook to:
Click Connect in the upper-right corner of the notebook UI to create and connect to a runtime environment.
If the Open OAuth popup dialog appears, click Open. In the Choose an account window, select your Qwiklabs student account (
Creating the runtime takes a few minutes. When connected, you will see the runtime RAM and disk status indicator in the upper right:
You can dismiss any pop-up guides or notifications that appear.
Once the runtime is active, paste the following into the first code cell and run it by pressing Shift + Enter or clicking the Play button to the left of the cell:
When the cell finishes running (indicated by [1] appearing to the left of the cell), restart the kernel from the top menu by selecting Runtime > Restart session and clicking Yes.
In the next code cell, paste and run the following code to import packages and initialize the genai.Client:
In the next code cell, paste and run the following helper functions to display images in your notebook:
Click Check my progress to verify the objectives.
In a new code cell, paste and run the following to preview the jacket product image stored in Cloud Storage:
In a new code cell, paste and run the following to view the dress product image:
Paste and run the following to create a genai.types.Part for each image and text prompt, and combine them into a genai.types.Content object:
Configure a genai.types.GenerateContentConfig with response_modalities set to ["TEXT", "IMAGE"] and retry options to handle transient quota limits. Paste and run this code:
Paste and run the following code to call generate_content and display the generated image:
Example Output (yours may be different):
Click Check my progress to verify the objectives.
At the bottom of the notebook, hover over the space below the last cell and click + Text to add a Markdown text cell.
Paste the following Markdown text and run the cell to render the heading:
In the new code cell below the Markdown heading, paste and run the following code to display another image to edit—the Lyria music generation UI from Gemini Platform Studio:
In a new code cell, paste and run the following code to generate a Podcast Studio UI design in the same style:
In a new code cell, paste and run the following code to upload and edit the previous image, replacing the "Advanced Options" section with a Podcast Language dropdown:
Example Output (yours may be different):
Click Check my progress to verify the objectives.
You have now used Nano Banana 2 Lite from both Gemini Platform Studio and the Python SDK. This section is not graded, so feel free to explore:
In your Colab Enterprise notebook:
In Gemini Platform Studio:
product_jacket_932.png or lyria_ui.png) from Cloud Storage and test new scenes or multi-turn edits.In this lab, you successfully explored Nano Banana 2 Lite by generating and editing images in Gemini Platform Studio, generating photorealistic images from code using multiple input images, and creating and editing UI mockups that include text.
Manual Last Updated November 26, 2026
Lab Last Tested November 26, 2026
Copyright 2026 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
This content is not currently available
We can notify you via email when it becomes available
Great!
We can contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one