tbuy
gemini-3.1-flash-image-preview API pricing & access
gemini-3.1-flash-image-preview API pricing: $0.5 per 1M tokens. gemini-3.1-flash-image-preview. Detailed model specifications await confirmation from the …
gemini-3.1-flash-image-preview API access
gemini-3.1-flash-image-preview. Detailed model specifications await confirmation from the service provider. Unverified parameters are not guaranteed.
Compare supported API endpoints and capabilities, then access gemini-3.1-flash-image-preview through the unified API gateway.
- Category
- image
- Supported APIs
- Image Generation API, Gemini API, OpenAI Chat Completions API
- API endpoints
- POST /v1/images/generations, POST /v1beta/models/gemini-3.1-flash-image-preview:generateContent, POST /v1/chat/completions
gemini-3.1-flash-image-preview API pricing
- Base input price
- $0.5 per 1M tokens
- Base output price
- $60 per 1M tokens
Base prices are shown in USD before group-specific adjustments. Open the live pricing page for current access-group prices.
About gemini-3.1-flash-image-preview
gemini-3.1-flash-image-preview is a historical Nano Banana 2 preview ID. Google's current lifecycle table lists its shutdown on 2026-06-25; this page identifies old configurations and supports migration rather than establishing current preview availability.
If a platform route still accepts the old string, confirm whether it is a compatibility name or maps to another version. Revalidate text, subject consistency and output formatting on the replacement instead of retaining preview-era assumptions.
Official reference, checked 2026-10-14.
Use cases and prompting
- Locate the preview string and retain original assets and outputs as migration cases.
- Check the route's served model and error details to establish old-name compatibility.
- Retest references, sizes and multi-turn edits on the replacement and inspect each final image.
- Compare the same test cases with gemini-nano-banana-2.1; check request and response formats in the API documentation.
How to call gemini-3.1-flash-image-preview
gemini-3.1-flash-image-preview is served through tbuy's unified gateway. Existing OpenAI or Anthropic SDK code keeps working: point base_url at https://modelsok.com and use your tbuy API key.
curl (OpenAI-compatible)
curl https://modelsok.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gemini-3.1-flash-image-preview", "messages": [{"role": "user", "content": "Hello"}]}'Python (openai SDK)
from openai import OpenAI
client = OpenAI(base_url="https://modelsok.com/v1", api_key="YOUR_API_KEY")
response = client.chat.completions.create(
model="gemini-3.1-flash-image-preview",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Related pages
Frequently asked questions about gemini-3.1-flash-image-preview
What is gemini-3.1-flash-image-preview?
gemini-3.1-flash-image-preview. Detailed model specifications await confirmation from the service provider. Unverified parameters are not guaranteed.
How do I call gemini-3.1-flash-image-preview?
Create an API key with access to gemini-3.1-flash-image-preview, then use the exact model ID and a supported endpoint from the API access section. Request fields depend on the selected endpoint.
How is gemini-3.1-flash-image-preview priced?
Pricing depends on the selected provider group and the model billing unit. Refer to the current input, output, request, or media prices in the pricing section.
How should I evaluate gemini-3.1-flash-image-preview for my project?
Start with the use cases and prompting guidance on this page, then evaluate the model with representative inputs from your project.