Gemini 3 Pro Image (Preview)
Gemini 3 Pro Image (Preview) costs $2 per 1M input tokens and $120 per 1M output tokens on LLM API, with a 66K-token context window.
Pricing
Lowest price among 2 providers, after discounts.
| Input | $2 | per 1M tokens |
|---|---|---|
| Output | $120 | per 1M tokens |
| Cache read | $0.2 | per 1M tokens |
Providers
Prices after each provider’s discount; the lowest in bold.
| $2 | $120 | $0.2 | |
| $2 | $120 | $0.2 |
Specifications
- ModesGenerate, Edit
- Output formatsPNG
- Input imagesUp to 14, 20 MB each
- Sizes10 sizes
- 1024×1024
- 848×1264
- 1264×848
- 896×1200
- 1200×896
- 928×1152
- 1152×928
- 768×1376
- 1376×768
- 1584×672
Call Gemini 3 Pro Image (Preview)
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-pro-image-preview",
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-pro-image-preview",
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-pro-image-preview",
"prompt": "A lighthouse at dawn, watercolor"
}'POST /v1/images/editsSet LLMAPI_KEY to your LLM API key.Edit 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.edit(
model="gemini-3-pro-image-preview",
image=open("photo.png", "rb"),
prompt="Replace the sky with a sunset",
)
with open(f"edited.{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.edit({
model: "gemini-3-pro-image-preview",
image: fs.createReadStream("photo.png"),
prompt: "Replace the sky with a sunset",
});
fs.writeFileSync(`edited.${result.output_format}`, Buffer.from(result.data![0].b64_json!, "base64"));curl https://api.llmapi.ai/v1/images/edits \
-H "Authorization: Bearer $LLMAPI_KEY" \
-F model="gemini-3-pro-image-preview" \
-F image="@photo.png" \
-F prompt="Replace the sky with a sunset"More from Google
All Google image models
Nano Banana 2.1gemini-nano-banana-2.1$0.0336per image
Nano Banana 2 Litegemini-3.1-flash-lite-image$0.0336per image
Gemini 3.1 Flash Image (Preview)gemini-3.1-flash-image-preview$0.5 / $60per 1M input / output
Prices synced .