LLM API
GoogleImage generationReleased October 1, 2025

Gemini 2.5 Flash Image

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

Pricing

Lowest price among 3 providers, after discounts.

Gemini 2.5 Flash Image prices on LLM API
Image$0.039/ imageper image
Input$0.3per 1M tokens
Output$30per 1M tokens
Cache read$0.03per 1M tokens

Providers

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

Providers of Gemini 2.5 Flash Image on LLM API
Google AI Studio—$0.3$30$0.03
Google Vertex AI—$0.3$30$0.03
Together AI$0.039——$0.03

Specifications

  • ModesGenerate, Edit
  • Output formatsPNG
  • Input imagesUp to 3, 20 MB each
  • Sizes10 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

POST /v1/images/generationsSet LLMAPI_KEY to your LLM API key.Generate docs

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))

More from Google

All Google image models

Prices synced .

You've been invited to LLM API

Top up $50 or more and the friend who invited you gets $20 in credits. We pay the $20; your credits stay yours. Referral terms

Sign up