1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const axios = require('axios');
const fs = require('fs');
const path = require('path');
// helper function to help you convert your local images into base64 format
async function toB64(imgPath) {
const data = fs.readFileSync(path.resolve(imgPath));
return Buffer.from(data).toString('base64');
}
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/gemini-3-flash";
const data = {
"messages": [
{
"role": "user",
"content" : "tell me a joke on cats"
},
{
"role": "assistant",
"content" : "here is a joke about cats..."
},
{
"role": "user",
"content" : "now a joke on dogs"
},
]
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();An array of objects containing the role and content
Could be "user", "assistant" or "system".
A string containing the user's query or the assistant's response.
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Gemini 3 Flash is Google DeepMind's flagship balanced model — delivering frontier-level reasoning and multimodal capability at a fraction of the cost of Gemini 3.1 Pro. It is designed for developers who need serious AI power without the price tag of the top-tier model. Scoring 90.4% on GPQA Diamond (PhD-level reasoning) and 33.7% on Humanity's Last Exam without tools, Gemini 3 Flash sits at the intersection of speed, quality, and cost-efficiency. With native support for text and image inputs and a large context window, it handles a wide range of production workloads out of the box.
Gemini 3 Flash is the workhorse model for teams that need reliable intelligence at scale. It excels in agentic pipelines and multi-step reasoning workflows where Pro-level accuracy is needed but cost efficiency matters. Developers use it for code generation and review, complex Q&A over long documents, and summarization of large datasets. It handles multimodal tasks like image analysis, chart interpretation, and document parsing with strong accuracy. Customer-facing applications — chatbots, copilots, and smart search — benefit from its speed and quality balance. It is also well suited for research, data extraction, and structured output generation tasks.
Gemini 3 Flash responds well to structured prompts. For reasoning tasks, use chain-of-thought framing: "Think step by step, then give your final answer." For structured outputs, specify the exact format in the prompt — JSON schema, markdown table, or bullet list — to maximize consistency. When passing image inputs, describe the specific aspect you want analyzed rather than asking open-ended questions. The model handles long system prompts reliably, so include examples, output templates, and constraints directly in the prompt for best results.
How does Gemini 3 Flash compare to Gemini 3.1 Pro? Flash is significantly faster and more cost-efficient, while Pro delivers deeper reasoning on the most complex tasks. Flash achieves 90.4% on GPQA Diamond vs. Pro's edge on ARC-AGI-2 (77.1%). For most production use cases, Flash provides an excellent quality-to-cost ratio.
Does it support image inputs? Yes. Send an image URL alongside your text prompt. The model handles visual analysis, OCR, chart reading, and document parsing natively.
What is the pricing? $0.625 per million input tokens and $3.75 per million output tokens via Segmind — significantly cheaper than Pro-tier models.
Is it suitable for agentic workflows? Yes. Gemini 3 Flash handles multi-step reasoning, tool use, and planning effectively, making it a strong choice for agentic pipelines where cost matters.
What thinking levels does it support? The model supports minimal, low, medium, and high thinking levels, letting you tune reasoning depth and cost per request based on task complexity.
When should I use Flash vs. Flash Lite? Flash for complex reasoning, generation, and multimodal tasks where quality matters. Flash Lite for ultra-high-volume, latency-critical pipelines where cost-per-call is the top priority.