rules

A shared tag with AI prompts and code snippets

From workspace: Google Gemini

Team: Nano Banana

Total snippets: 20

Google Gemini

rules

20 snippets

Limitations

As we continue to develop and improve our models, we believe in being transparent about areas for improvement. While Gemini 2.5 Flash Image is a powerful and versatile tool, achieving perfection on the first attempt with highly nuanced requests...

Best practices

As you build, here are a more tips for working with image generation:

Be hyper-specific: The more detail you provide, the more control you have. Instead of "fantasy armor," describe it: "ornate elven plate armor, etched with silver leaf patterns, with a high collar and pauldrons shaped like falcon wings." Fix...

Advanced composition: Combining multiple images

Provide multiple images as context to create a brand new, composite scene. This is perfect for product mockups or creative collages.

#Template: Create a new image by combining the elements from the provided images. Take the [element from image 1] and place it with/on the [element from image 2]. The final image should be a [description of the final scene]. #Example...

Style transfer

Provide a photo and ask the model to recreate its content in the specific style or art movement.

#Template: Transform the provided photograph of [subject] into the artistic style of [artist/art style]. Preserve the original composition but render it with [description of stylistic elements]. #Example prompt: Transform the provided...

Inpainting: editing a specific area

You can conversationally tell Gemini 2.5 Flash Image to edit only one part of an image while leaving the rest completely untouched.

#Template: Using the provided image, change only the [specific element] to [new element/description]. Keep everything else in the image exactly the same, preserving the original style, lighting, and composition. #Example prompt: Using the...

Editing images with text

This is where Gemini 2.5 Flash Image multimodality truly shines. You can provide one or more images alongside your text prompts for editing, composition, and style transfer. 1. Image editing: Adding & removing elements Provide an image and simply describe the change you want. The model will analyze the original image's style, lighting, and perspective to make the edit look natural and maintain character consistency across a series of images.

#Template: Using the provided image of [subject], please [add/remove/modify] [element] to/from the scene. Ensure the change is [description of how the change should integrate]. #Example prompt: Using the provided image of my cat, please add a...

Sequential art (comic panel / storyboard)

Create compelling visual narratives, panel by panel, ideal for developing storyboards, comic strips, or any form of sequential art by focusing on clear scene descriptions.

#Template: A single comic book panel in a [art style] style. In the foreground, [character description and action]. In the background, [setting details]. The panel has a [dialogue/caption box] with the text "[Text]". The lighting creates a [mood]...

Minimalist & negative space design

Create backgrounds for websites, presentations, or marketing materials where you plan to overlay text.

#Template: A minimalist composition featuring a single [subject] positioned in the [bottom-right/top-left/etc.] of the frame. The background is a vast, empty [color] canvas, creating significant negative space. Soft, subtle lighting. [Aspect...

Product mockups & commercial photography

Create clean, professional product shots for e-commerce, advertising, or branding.

#Template: A high-resolution, studio-lit product photograph of a [product description] on a [background surface/description]. The lighting is a [lighting setup, e.g., three-point softbox setup] to [lighting purpose]. The camera angle is a [angle...

Accurate text in images

Gemini 2.5 Flash Image can render text within images. Be clear about the exact text you want, describe the font style, and set the overall design.

#Template: Create a [image type] for [brand/concept] with the text "[text to render]" in a [font style]. The design should be [style description], with a [color scheme]. #Example prompt: Create a modern, minimalist logo for a coffee shop called...

Stylized illustrations & stickers

To create stickers, icons, or assets for your projects, be explicit about the style and remember to request a white background if you need one.

#Template: A [style] sticker of a [subject], featuring [key characteristics] and a [color palette]. The design should have [line style] and [shading style]. The background must be white. #Example prompt: A kawaii-style sticker of a happy red...

Photorealistic scenes

For realistic images, think like a photographer. Mentioning camera angles, lens types, lighting, and fine details will guide the model toward a photorealistic result.

#Template: A photorealistic [shot type] of [subject], [action or expression], set in [environment]. The scene is illuminated by [lighting description], creating a [mood] atmosphere. Captured with a [camera/lens details], emphasizing [key textures...

Image editing (text-and-image-to-image) Go

package main import ( "context" "fmt" "os" "google.golang.org/genai" ) func main() { ctx := context.Background() client, err := genai.NewClient(ctx, nil) if err != nil { log.Fatal(err) } imagePath := "/path/to/cat_image.png" ...

Image editing (text-and-image-to-image) JavaScript

import { GoogleGenAI, Modality } from "@google/genai"; import * as fs from "node:fs"; async function main() { const ai = new GoogleGenAI({}); const imagePath = "path/to/cat_image.png"; const imageData = fs.readFileSync(imagePath); const...

Image editing (text-and-image-to-image) python

The following example demonstrates uploading base64 encoded images. For multiple images, larger payloads, and supported MIME types, check the Image understanding page.

from google import genai from google.genai import types from PIL import Image from io import BytesIO client = genai.Client() prompt = ( "Create a picture of my cat eating a nano-banana in a " "fancy restaurant under the Gemini...

Image generation (text-to-image) REST

curl -s -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image-preview:generateContent" \ -H "x-goog-api-key: $GEMINI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "contents": [{ "parts":...

Image generation (text-to-image) Go

package main import ( "context" "fmt" "os" "google.golang.org/genai" ) func main() { ctx := context.Background() client, err := genai.NewClient(ctx, nil) if err != nil { log.Fatal(err) } result, _ :=...

Image generation (text-to-image) Javascript

import { GoogleGenAI, Modality } from "@google/genai"; import * as fs from "node:fs"; async function main() { const ai = new GoogleGenAI({}); const prompt = "Create a picture of a nano banana dish in a fancy restaurant with a Gemini...

Image generation (text-to-image) Python

The following code demonstrates how to generate an image based on a descriptive prompt.

from google import genai from google.genai import types from PIL import Image from io import BytesIO client = genai.Client() prompt = ( "Create a picture of a nano banana dish in a fancy restaurant with a Gemini theme" ) response =...

About

Gemini can generate and process images conversationally. You can prompt Gemini with text, images, or a combination of both allowing you to create, edit, and iterate on visuals with unprecedented control:

Text-to-Image: Generate high-quality images from simple or complex text descriptions. Image + Text-to-Image (Editing): Provide an image and use text prompts to add, remove, or modify elements, change the style, or adjust the color...

Google Gemini - rules - AI Prompts & Code Snippets | Snippets AI