> ## Documentation Index
> Fetch the complete documentation index at: https://docs.geekai.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini 2.5 Flash Image

Gemini 2.5 Flash Image combines Gemini 2.5 Flash’s reasoning with Nano Banana’s image generation so you can create and modify images over several turns.

### Model parameters

* Model ID: `gemini-2.5-flash-image`
* Pricing: Check the [Model Hub](https://geekai.co/models?platform=google\&type=chat) for current prices.
* Endpoint: `https://geekai.co/api/v1/chat/completions`
* Parameters: See the [Chat API reference](https://docs.geekai.co/en/api/chat/completions.md).
* Authentication: [Get an API key](https://docs.geekai.co/en/docs/quick_start.md).

> [!NOTE]
>
> For compatibility, `gemini-2.5-flash-image-preview` calls the same model. For long-term maintenance and stability, use the stable ID `gemini-2.5-flash-image`.

As a chat model, Gemini 2.5 Flash Image does not use parameters to control image output. Instead, refine `prompt` to generate or edit an image and specify its properties. The following strategies help you describe the image you want:

### Image generation

The most important principle when generating images with Gemini 2.5 Flash Image is:

> **Describe the scene rather than listing keywords.** The model excels at understanding language. A descriptive paragraph that tells a story usually produces a more coherent image than a list of unrelated words.

**1. Photorealistic scenes**

Use photography terms: specify the camera angle, lens, lighting, and details to guide the model toward a photorealistic result.

```markdown Template theme={null}
A photorealistic [shot type] of [subject] with [action or expression], set in [environment].
The scene is lit by [lighting description], creating a [mood] atmosphere. Shot with [camera/lens details], emphasizing [key textures and details].
Use a [aspect ratio] format.
```

```markdown Prompt theme={null}
A photorealistic close-up portrait of an elderly Chinese ceramicist with deep, sun-etched wrinkles and a warm, wise smile.
He carefully inspects a freshly glazed tea bowl in his rustic, sunlit studio.
Soft golden-hour light streams through the window, highlighting the fine texture of the clay. Use an 85mm portrait lens for a softly blurred background (bokeh).
Convey tranquility and mastery. Use a vertical portrait orientation.
```

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gemini-2.5-flash-image",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "A photorealistic close-up portrait of an elderly Chinese ceramicist with deep, sun-etched wrinkles and a warm, wise smile. He carefully inspects a freshly glazed tea bowl in his rustic, sunlit studio. Soft golden-hour light streams through the window, highlighting the fine texture of the clay. Use an 85mm portrait lens for a softly blurred background (bokeh). Convey tranquility and mastery. Use a vertical portrait orientation."
          }
        ]
      }
    ]
}'
```

**2. Stylized illustrations and stickers**

For stickers, icons, and other assets, specify the style and request a transparent background.

```markdown Template theme={null}
A [style] sticker of [subject], featuring [key characteristics] and [color palette].
Use [line style] and [shading style]. The background must be transparent.
```

```markdown Prompt theme={null}
A cute sticker of a cheerful red panda wearing a tiny bamboo hat and munching on a green bamboo leaf.
Use bold, clean outlines, simple cel shading, and vibrant colors. The background must be transparent.
```

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gemini-2.5-flash-image",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "A cute sticker of a cheerful red panda wearing a tiny bamboo hat and munching on a green bamboo leaf. Use bold, clean outlines, simple cel shading, and vibrant colors. The background must be transparent."
          }
        ]
      }
    ]
}'
```

**3. Accurate text in images**

Gemini excels at rendering text. Specify the exact wording, describe the font style in detail, and explain the overall design.

```markdown Template theme={null}
Create a [type of image] for [brand/concept] featuring the text "[text to render]" in [font style].
Use [style description] and a [color palette] color scheme.
```

```markdown Prompt theme={null}
Create a modern, minimalist logo for a coffee shop called The Daily Grind.
Use clean, bold, sans-serif lettering. Integrate a simple, stylized coffee bean icon seamlessly into the text. Use a black-and-white color scheme.
```

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gemini-2.5-flash-image",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "Create a modern, minimalist logo for a coffee shop called The Daily Grind. Use clean, bold, sans-serif lettering. Integrate a simple, stylized coffee bean icon seamlessly into the text. Use a black-and-white color scheme."
          }
        ]
      }
    ]
}'
```

**4. Product mockups and commercial photography**

Use this approach for clean, professional product images for e-commerce, advertising, or branding.

```markdown Template theme={null}
A high-resolution, studio-lit product photograph of [product description] on [background surface/description].
Use [lighting setup, e.g., three-point softbox lighting] to [lighting objective]. Use a [camera angle] to showcase [specific feature].
Hyperrealistic, with sharp focus on [key detail]. [Aspect ratio].
```

```markdown Prompt theme={null}
A high-resolution, studio-lit product photograph of a minimalist matte-black ceramic coffee mug on polished concrete.
Use three-point softbox lighting for soft, diffuse highlights without harsh shadows. Shoot at a 45-degree angle from slightly below to show its clean lines.
Hyperrealistic, with sharp focus on the steam rising from the coffee. Square image.
```

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gemini-2.5-flash-image",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "A high-resolution, studio-lit product photograph of a minimalist matte-black ceramic coffee mug on polished concrete. Use three-point softbox lighting for soft, diffuse highlights without harsh shadows. Shoot at a 45-degree angle from slightly below to show its clean lines. Hyperrealistic, with sharp focus on the steam rising from the coffee. Square image."
          }
        ]
      }
    ]
}'
```

**5. Minimalism and negative space**

Use this for website, presentation, or marketing backgrounds that need room for text.

```markdown Template theme={null}
A minimalist composition with a single [subject] in the [bottom right/top left/other position] of the frame.
The background is a large, empty [color] canvas with generous negative space. Soft, subtle lighting. [Aspect ratio].
```

```markdown Prompt theme={null}
A minimalist composition with a single delicate red maple leaf in the bottom right corner.
Use a large, empty off-white canvas as the background, leaving ample space for text. Soft, diffuse light from the upper left. Square image.
```

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gemini-2.5-flash-image",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "A minimalist composition with a single delicate red maple leaf in the bottom right corner. Use a large, empty off-white canvas as the background, leaving ample space for text. Soft, diffuse light from the upper left. Square image."
          }
        ]
      }
    ]
}'
```

**6. Comic panels and storyboards**

Describe the characters consistently and specify the scene to create panels for a visual story.

```markdown Template theme={null}
A single comic panel in [art style]. In the foreground, [character description and action]. In the background, [scene details].
Include a [speech bubble/caption box] with the text "[text]". The lighting creates a [mood] atmosphere. [Aspect ratio].
```

```markdown Prompt theme={null}
A single comic panel in a gritty film noir style with high-contrast black-and-white ink.
In the foreground, a detective in a trench coat stands under a flickering streetlight, rain soaking his shoulders.
In the background, the neon sign of a desolate bar reflects in a puddle.
A caption box at the top reads, "This city is a hard place to keep a secret."
Harsh lighting creates a dramatic, brooding mood. Landscape composition.
```

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gemini-2.5-flash-image",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "A single comic panel in a gritty film noir style with high-contrast black-and-white ink. In the foreground, a detective in a trench coat stands under a flickering streetlight, rain soaking his shoulders. In the background, the neon sign of a desolate bar reflects in a puddle. A caption box at the top reads, \"This city is a hard place to keep a secret.\" Harsh lighting creates a dramatic, brooding mood. Landscape composition."
          }
        ]
      }
    ]
}'
```

### Image editing

Combine an image with a text prompt to edit it, change the composition, or transform its style.

**1. Add or remove elements**

Supply an image and describe the change. The model preserves the original style, lighting, and perspective.

```markdown Template theme={null}
Using the supplied image of [subject], [add/remove/modify] [element] in the scene. Make the change blend in by [description].
```

```markdown Prompt theme={null}
Using the supplied image of my cat, add a small knitted wizard hat to its head. Make the hat sit comfortably and match the soft lighting of the photo.
```

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gemini-2.5-flash-image",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "Using the supplied image of my cat, add a small knitted wizard hat to its head. Make the hat sit comfortably and match the soft lighting of the photo."
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://ai.google.dev/static/gemini-api/docs/images/cat.png"
            }
          }
        ]
      }
    ]
}'
```

**2. Inpainting**

Define a “mask” in conversation to edit one part of the image without changing the rest.

```markdown Template theme={null}
Using the supplied image, change only [specific element] to [new element/description]. Keep everything else identical, including the original style, lighting, and composition.
```

```markdown Prompt theme={null}
In the supplied living room image, replace only the blue sofa with a vintage brown leather Chesterfield. Keep the rest of the room unchanged, including the cushions on the sofa and the lighting.
```

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gemini-2.5-flash-image",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "In the supplied living room image, replace only the blue sofa with a vintage brown leather Chesterfield. Keep the rest of the room unchanged, including the cushions on the sofa and the lighting."
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://ai.google.dev/static/gemini-api/docs/images/living_room.png"
            }
          }
        ]
      }
    ]
}'
```

**3. Style transfer**

Supply an image and ask the model to recreate its content in a different artistic style.

```markdown Template theme={null}
Transform the supplied photo of [subject] into the style of [artist/art style]. Keep the original composition but render it using [description of stylistic elements].
```

```markdown Prompt theme={null}
Transform the supplied photo of a modern city street at night into the style of Vincent van Gogh’s The Starry Night.
Keep the original arrangement of buildings and cars, but render everything with swirling impasto brushstrokes and dramatic deep blues and bright yellows.
```

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gemini-2.5-flash-image",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "Transform the supplied photo of a modern city street at night into the style of Vincent van Gogh’s The Starry Night. Keep the original arrangement of buildings and cars, but render everything with swirling impasto brushstrokes and dramatic deep blues and bright yellows."
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://ai.google.dev/static/gemini-api/docs/images/city.png"
            }
          }
        ]
      }
    ]
}'
```

**4. Advanced composition: combine multiple images**

Use several reference images to create a composite scene, such as a product mockup or creative collage.

```markdown Template theme={null}
Combine elements from the supplied images to create a new image. Place [element from image 1] on or alongside [element from image 2]. The final image should show [description of scene].
```

```markdown Prompt theme={null}
Create a professional e-commerce fashion photo. Dress the woman from the second image in the blue floral dress from the first.
Generate a realistic full-length portrait of her wearing the dress. Match the lighting and shadows to the outdoor setting.
```

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gemini-2.5-flash-image",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "Create a professional e-commerce fashion photo. Dress the woman from the second image in the blue floral dress from the first. Generate a realistic full-length portrait of her wearing the dress. Match the lighting and shadows to the outdoor setting."
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://ai.google.dev/static/gemini-api/docs/images/dress.png"
            }
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://ai.google.dev/static/gemini-api/docs/images/model.png"
            }
          }
        ]
      }
    ]
}'
```

**5. Preserve fine details**

Describe important details, such as faces or logos, explicitly in the edit request so the model preserves them.

```markdown Template theme={null}
Using the supplied images, place [element from image 2] on [element from image 1]. Keep the features of [element from image 1] completely unchanged.
The added element should [description of how it should blend in].
```

```markdown Prompt theme={null}
Use the first image of the woman with brown hair, blue eyes, and a neutral expression. Add the logo from the second image to her black T-shirt.
Keep her face and features completely unchanged. Make the logo look naturally printed on the fabric, following the folds of the shirt.
```

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gemini-2.5-flash-image",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "Use the first image of the woman with brown hair, blue eyes, and a neutral expression. Add the logo from the second image to her black T-shirt. Keep her face and features completely unchanged. Make the logo look naturally printed on the fabric, following the folds of the shirt."
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://ai.google.dev/static/gemini-api/docs/images/woman.png"
            }
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://ai.google.dev/static/gemini-api/docs/images/logo.png"
            }
          }
        ]
      }
    ]
}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.