Gemini 3.1 Flash Image Preview API

Google's image generation model. Call it on 666 AI with the same API key as every other model. Pay as you go; prices follow the upstream in real time and this page updates hourly.

VendorGoogle
Typeimage generation
Price$0.6075 per 1M input tokens · $72.9 per 1M output tokens
Context window1M tokens
Model ID (use this in your request)gemini-3.1-flash-image-preview
Sign up free & get an API keySee all model prices

How to call Gemini 3.1 Flash Image Preview

The API is OpenAI-compatible. Replace YOUR-ENDPOINT with the endpoint shown on your API Key page after you sign up, and YOUR-KEY with your key.

curl https://YOUR-ENDPOINT/v1/images/generations \
  -H "Authorization: Bearer YOUR-KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gemini-3.1-flash-image-preview", "prompt": "a red panda reading a book", "size": "1024x1024"}'
from openai import OpenAI
client = OpenAI(base_url="https://YOUR-ENDPOINT/v1", api_key="YOUR-KEY")
r = client.images.generate(model="gemini-3.1-flash-image-preview", prompt="a red panda reading a book", size="1024x1024")
print(r.data[0].url or r.data[0].b64_json[:60])

Similar models — price comparison

ModelPrice
Gemini 3 Pro Image Preview$2.43 per 1M input tokens · $146 per 1M output tokens

More models from Google

ModelPrice
Gemini 3 Flash Preview$0.6075 per 1M input tokens · $3.65 per 1M output tokens
Gemini 3.1 Pro Preview$2.43 per 1M input tokens · $14.58 per 1M output tokens
Gemini 3.5 Flash$1.82 per 1M input tokens · $10.94 per 1M output tokens
Gemini 3.6 Flash$0.9113 per 1M input tokens · $4.56 per 1M output tokens
Gemini 3.7 Flash$0.9113 per 1M input tokens · $4.56 per 1M output tokens
Gemini 3.8 Flash$0.9113 per 1M input tokens · $4.56 per 1M output tokens
Gemini 4 Argon$2.43 per 1M input tokens · $12.15 per 1M output tokens
Flash Image 2.5$0.0527 per image

FAQ

How much does the Gemini 3.1 Flash Image Preview API cost?

On 666 AI, Gemini 3.1 Flash Image Preview costs $0.6075 per 1M input tokens · $72.9 per 1M output tokens. You pay only for what you use — no monthly fee. Prices follow the upstream in real time; this page updates every hour.

Can I use the official OpenAI SDK?

Yes. The API is OpenAI-compatible: in the OpenAI Python or Node.js SDK just change base_url and api_key, and set model to gemini-3.1-flash-image-preview.

How do I pay?

Bank card (including Google Pay / Apple Pay), USDT / ETH, or bank wire. Top up once and usage is deducted as you go.