# Gemini 2.5 Flash Image

Gemini 2.5 Flash Image costs $0.039 per image on LLM API. It generates and edits images.

Model ID: `gemini-2.5-flash-image` · Google · Image generation · Released October 1, 2025
Updated: 2026-10-13
Canonical: https://llmapi.ai/models/google-gemini-2-5-flash-image/

- Per image: $0.039
- Modes: Generate, Edit
- Input images: Up to 3

## Pricing

Lowest price among 3 providers, after discounts.

| Price | Amount | Per |
| --- | --- | --- |
| Image | $0.039 | per image |
| Input | $0.3 | per 1M tokens |
| Output | $30 | per 1M tokens |
| Cache read | $0.03 | per 1M tokens |

**Volume pricing.** At higher monthly volume, Gemini 2.5 Flash Image may cost less. Book a call and sales will quote a price for your usage. [Book a call with sales](https://meetings.hubspot.com/julia-andriienko/llmapi) or [Create an account first](https://app.llmapi.ai/signup).

## Providers

Prices after each provider’s discount; the lowest in bold.

| Provider | Per image | Input / 1M | Output / 1M | Cache read / 1M |
| --- | --- | --- | --- | --- |
| [Google AI Studio](https://llmapi.ai/providers/google-ai-studio/) | — | $0.3 | $30 | $0.03 |
| [Google Vertex AI](https://llmapi.ai/providers/google-vertex/) | — | $0.3 | $30 | $0.03 |
| [Together AI](https://llmapi.ai/providers/together-ai/) | $0.039 | — | — | $0.03 |

## Specifications

- Modes: Generate, Edit
- Output formats: PNG
- Input images: Up to 3, 20 MB each
- Sizes: 10 sizes: 1024×1024, 832×1248, 1248×832, 864×1184, 1184×864, 896×1152, 1152×896, 768×1344, 1344×768, 1536×672

## Call Gemini 2.5 Flash Image

### Generate (`POST /v1/images/generations`)

Set LLMAPI_KEY to your LLM API key.

```python
import base64
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.llmapi.ai/v1",
    api_key=os.environ["LLMAPI_KEY"],
)

result = client.images.generate(
    model="gemini-2.5-flash-image",
    prompt="A lighthouse at dawn, watercolor",
    response_format="b64_json",
)
with open(f"image.{result.output_format}", "wb") as f:
    f.write(base64.b64decode(result.data[0].b64_json))
```

Docs: [Generate docs](https://docs.llmapi.ai/api/v1/images)

### Edit (`POST /v1/images/edits`)

Set LLMAPI_KEY to your LLM API key.

```python
import base64
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.llmapi.ai/v1",
    api_key=os.environ["LLMAPI_KEY"],
)

result = client.images.edit(
    model="gemini-2.5-flash-image",
    image=open("photo.png", "rb"),
    prompt="Replace the sky with a sunset",
    response_format="b64_json",
)
with open(f"edited.{result.output_format}", "wb") as f:
    f.write(base64.b64decode(result.data[0].b64_json))
```

Docs: [Edit docs](https://docs.llmapi.ai/api/v1/images)

## More from Google

- [Nano Banana 2.1](https://llmapi.ai/models/gemini-nano-banana-2-1/): $0.0336 per image
- [Nano Banana 2 Lite](https://llmapi.ai/models/gemini-3-1-flash-lite-image/): $0.0336 per image
- [Gemini 3.1 Flash Image (Preview)](https://llmapi.ai/models/google-gemini-3-1-flash-image-preview/): $0.5 / $60 per 1M input / output

Prices synced 2026-11-03.

Next step: [Get API key](https://app.llmapi.ai/signup)
