Build next-gen apps with gemini-3.1-flash-image
Pricing
TokenLab Price
Input $0.25 / Output $1.50
Discount: 50%
| Official Price | TokenLab Price | Discount | |
|---|---|---|---|
| Default spec | Input $0.50 / Output $3.00 | Input $0.25 / Output $1.50 | 50% |
| Default spec | Input $0.50 / Output $60.00 | Input $0.25 / Output $30.00 | 50% |
One-click test
Sign in once and Web Agent keeps this model, prompt, and request preset for you.
Test gemini-3.1-flash-image in Web Agent. Run the recommended text-to-image image request at /v1/images/generations, then show the request body, returned image or task status, and model-specific constraints.
API workbench
The default route for production. The code sample below uses this endpoint with the format you pick.
curl "https://api.tokenlab.sh/v1beta/models/gemini-3.1-flash-image:generateContent" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: sk-xxx" \
-d '{
"contents": [
{"role": "user", "parts": [{"text": "Hello!"}]}
]
}'Use cases
Best forText to Image
Producing product imagery, illustrations, and design variations
Vision
Reading images, parsing documents, and answering visual questions
Product visuals
Make campaign images, catalog scenes, and design directions from a few prompts.
Iterative editing
Try edits and variations using the request shape this model already accepts.
Creative QA
Sanity-check prompt behavior, output count, and response mode before you ship.
Side-by-side test
See real response quality, latency, and price before this becomes your production default.
Prompt examples
Generate a clean product shot of matte black headphones on a soft blue gradient.
Edit the source image into a premium ecommerce hero with natural shadows.
Give me three visual directions for a developer-tool launch banner.
Cost Calculator
FAQ
How much does gemini-3.1-flash-image cost?
On TokenLab, gemini-3.1-flash-image costs Input $0.25 / Output $1.50 Per Token. The pricing table above shows the full breakdown.
What is gemini-3.1-flash-image best for?
gemini-3.1-flash-image is a strong fit for Text to Image, Vision, Image Edit. You can call it through TokenLab with one API key.
How do I call the gemini-3.1-flash-image API?
Get a TokenLab API key, then send your request to https://api.tokenlab.sh/v1beta/models/gemini-3.1-flash-image:generateContent. The API workbench above has a recommended endpoint and copy-ready code.
Which endpoint should gemini-3.1-flash-image use?
Use https://api.tokenlab.sh/v1/images/generations as the default for gemini-3.1-flash-image. If a provider-native format is supported, the API workbench shows that endpoint too.
Can I test gemini-3.1-flash-image before integrating it?
Yes. Try in Web Agent opens a ready test for gemini-3.1-flash-image and keeps your prompt after sign-in, so you don’t lose context.
Which operations does gemini-3.1-flash-image support?
gemini-3.1-flash-image supports text-to-image, image-edit. Pick an operation in the API workbench above to see the matching endpoint and code sample.