Prototype an image app with Nano Banana in Google AI Studio
Start from a Google AI Studio sample app and adapt it to test image generation or editing with Nano Banana.
Objective
Build a prototype for uploading a photo, describing an edit, and displaying the result. The learning goal is to distinguish requirements requested from Build from behavior that has actually been checked.
Exercise: use your own photo of an ordinary mug on a table. Request only a plain blue background, leaving the mug unchanged.
Requirements
Use your existing authorized AI Studio access. Agree on a budget before any prompt or image call: paid models can incur costs. Prepare your own object photo, containing no people or private data.
Build generates full-stack web apps; it can install packages and automatically configure Gemini server-side credentials. It is not a passive static mockup. Do not change credentials, view or copy secrets, or put secrets in prompts.
Steps
Proceed only if a usable image example is available. Availability of an older example or a particular model is not guaranteed.
- Confirm authorized access and the budget before making any Build request. If acceptable spending has not been established, stop the exercise before prompts or image calls.
- In App Gallery, choose an available image example and copy it with Copy App. If no suitable example is available, stop rather than improvise a different procedure.
- In Build chat, request photo upload, an instruction field, a generate button, result display, and empty, loading, error, and success states. Describe these as features to implement, not controls that are already present.
- Explicitly request: “If the photo or instruction is missing, display a message and make no generation call.” Make this rule a prerequisite for any real image trial.
- In Code, first check that a missing photo, an empty instruction, and both inputs missing block the generation call before it starts. If that protection is missing or unclear, request a correction in Build. Then test those cases in the preview without viewing secrets.
- Examine the requested states: understandable incomplete-input feedback, identifiable loading, an explicit error, and a visible result on success. For any state that cannot be observed without another call, inspect its logic and record that it still needs confirmation.
- Once these checks are satisfactory and the budget is confirmed, upload your photo and request one simple background edit. Compare the output with the original for object identity, visible text, and image dimensions.
Expected result
The target is a private prototype with a clear upload, instruction, generation, and result flow. Incomplete input should display a message without making a generation call.
The image trial aims to change the background while retaining the object; fidelity, text preservation, and dimensions are not guaranteed.
Checks
For each check, record the expected behavior, the finding in Preview or Code, any required correction, and the recheck. Distinguish observed behavior from logic that has only been inspected.
For the image, note distortions, text differences, and dimension changes. If the original contains no visible text, mark that criterion as not applicable.
Pitfalls to avoid
A visible button does not prove that validation prevents calls. If this protection fails, correct it and recheck before real generation. If a call fails, examine the error rather than repeatedly making potentially billable attempts.
Apps are private by default; sharing and deployment are separate. Do not share, publish, or deploy anything; perform no GitHub, Firebase, Workspace, or CloudRun operations, and do not modify security settings.
Next steps
Keep the prototype private and list the remaining gaps. Prioritize input validation, then clear states, before visual refinements. Any further request or generation must stay within the agreed budget; otherwise, stop.



