Nano Banana 2 Lite
Nano Banana 2 Lite costs $0.0336 per image on LLM API. It generates images from text.
Pricing
Served by Google Vertex AI, the only provider.
| Image | $0.0336/ image | per image |
|---|---|---|
| Input | $0.25 | per 1M tokens |
| Output | $30 | per 1M tokens |
| Cache read | $0.025 | per 1M tokens |
| Web search | $0.014 | per search |
Specifications
- ModesGenerate
Call Nano Banana 2 Lite
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-3.1-flash-lite-image",
prompt="A lighthouse at dawn, watercolor",
)
with open(f"image.{result.output_format}", "wb") as f:
f.write(base64.b64decode(result.data[0].b64_json))import fs from "node:fs";
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.llmapi.ai/v1",
apiKey: process.env.LLMAPI_KEY,
});
const result = await client.images.generate({
model: "gemini-3.1-flash-lite-image",
prompt: "A lighthouse at dawn, watercolor",
});
fs.writeFileSync(`image.${result.output_format}`, Buffer.from(result.data![0].b64_json!, "base64"));curl https://api.llmapi.ai/v1/images/generations \
-H "Authorization: Bearer $LLMAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-flash-lite-image",
"prompt": "A lighthouse at dawn, watercolor"
}'More from Google
All Google image models
Nano Banana 2.1gemini-nano-banana-2.1$0.0336per image
Gemini 3.1 Flash Image (Preview)gemini-3.1-flash-image-preview$0.5 / $60per 1M input / output
Gemini 3 Pro Image (Preview)gemini-3-pro-image-preview$2 / $120per 1M input / output
Prices synced .