Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion genkit-tools/cli/context/GENKIT.go.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Here are suggested models to use for various task types. This is NOT an exhausti
```
| Plugin | Recommended Model | Input Modalities |
|------------------------------------------------------------|------------------------------------|-------------------|
| github.com/firebase/genkit/go/plugins/googlegenai | gemini-2.5-flash-image-preview | Text, Image |
| github.com/firebase/genkit/go/plugins/googlegenai | gemini-2.5-flash-image | Text, Image |
| github.com/firebase/genkit/go/plugins/googlegenai | imagen-4.0-generate-preview-06-06 | Text |
| github.com/firebase/genkit/go/plugins/compat_oai/openai | gpt-image-1 | Text |
```
2 changes: 1 addition & 1 deletion genkit-tools/cli/context/GENKIT.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ exhaustive list.
```
| Plugin | Recommended Model | Input Modalities |
|------------------------------------|------------------------------------|-------------------|
| @genkit-ai/google-genai | gemini-2.5-flash-image-preview | Text, Image |
| @genkit-ai/google-genai | gemini-2.5-flash-image | Text, Image |
| @genkit-ai/google-genai | imagen-4.0-generate-preview-06-06 | Text |
| @genkit-ai/compat-oai/openai | gpt-image-1 | Text |
```
Expand Down
12 changes: 6 additions & 6 deletions js/plugins/google-genai/.guides/docs/editing-images.prompt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Edit images with `gemini-2.5-flash-image-preview` (aka "Nano Banana")
title: Edit images with `gemini-2.5-flash-image` (aka "Nano Banana")
description: read this if you need to perform sophisticated image edits such as background removal, post matching, character replacement, relighting, on an existing image
---

The `gemini-2.5-flash-image-preview` model (also known as "Nano Banana") can perform sophisticated image edits.
The `gemini-2.5-flash-image` model (also known as "Nano Banana") can perform sophisticated image edits.

- You must ALWAYS add `{config: {responseModalities: ['TEXT', 'IMAGE']}}` to your `ai.generate` calls when using this model.

Expand All @@ -15,7 +15,7 @@ import { ai } from "@/ai/genkit"; // or wherever genkit is initialized
import { googleAI } from "@genkit-ai/google-genai";

const {media} = await ai.generate({
model: googleAI.model('gemini-2.5-flash-image-preview'),
model: googleAI.model('gemini-2.5-flash-image'),
config: {responseModalities: ['TEXT', 'IMAGE']}},
prompt: "generate a picture of a unicorn wearing a space suit on the moon",
});
Expand All @@ -32,7 +32,7 @@ import { ai } from "@/ai/genkit"; // or wherever genkit is initialized
import { googleAI } from "@genkit-ai/google-genai";

const {media} = await ai.generate({
model: googleAI.model('gemini-2.5-flash-image-preview'),
model: googleAI.model('gemini-2.5-flash-image'),
config: {responseModalities: ['TEXT', 'IMAGE']}},
prompt: [
{text: "change the person's outfit to a banana costume"},
Expand All @@ -54,7 +54,7 @@ import { googleAI } from "@genkit-ai/google-genai";
const {personImageUri, animalImageUri, sceneryImageUri} = await loadImages(...);

const {media} = await ai.generate({
model: googleAI.model('gemini-2.5-flash-image-preview'),
model: googleAI.model('gemini-2.5-flash-image'),
config: {responseModalities: ['TEXT', 'IMAGE']}},
prompt: [
// the model tends to match aspect ratio of the *last* image provided
Expand Down Expand Up @@ -84,7 +84,7 @@ const originalImageUri = "data:..."; // the original image
const annotatedImageUri = "data:..."; // the image with annotations on top of it

const {media} = await ai.generate({
model: googleAI.model('gemini-2.5-flash-image-preview'),
model: googleAI.model('gemini-2.5-flash-image'),
config: {responseModalities: ['TEXT', 'IMAGE']}},
prompt: [

Expand Down
2 changes: 1 addition & 1 deletion js/testapps/basic-gemini/src/index-vertexai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ ai.defineFlow('gemini-image-editing', async (_) => {
const room = fs.readFileSync('my_room.png', { encoding: 'base64' });

const { media } = await ai.generate({
model: vertexAI.model('gemini-2.5-flash-image-preview'),
model: vertexAI.model('gemini-2.5-flash-image'),
prompt: [
{ text: 'add the plant to my room' },
{ media: { url: `data:image/png;base64,${plant}` } },
Expand Down
2 changes: 1 addition & 1 deletion js/testapps/basic-gemini/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ ai.defineFlow('gemini-image-editing', async (_) => {
const room = fs.readFileSync('my_room.png', { encoding: 'base64' });

const { media } = await ai.generate({
model: googleAI.model('gemini-2.5-flash-image-preview'),
model: googleAI.model('gemini-2.5-flash-image'),
prompt: [
{ text: 'add the plant to my room' },
{ media: { url: `data:image/png;base64,${plant}` } },
Expand Down
2 changes: 1 addition & 1 deletion samples/js-gemini/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ ai.defineFlow('gemini-image-editing', async (_) => {
const room = fs.readFileSync('my_room.png', { encoding: 'base64' });

const { media } = await ai.generate({
model: googleAI.model('gemini-2.5-flash-image-preview'),
model: googleAI.model('gemini-2.5-flash-image'),
prompt: [
{ text: 'add the plant to my room' },
{ media: { url: `data:image/png;base64,${plant}` } },
Expand Down
Loading