Introduction
Gemini 3.7 Flash is deprecated: Google states that requests using its old API name now run on Gemini 3.8 Flash, so the name no longer guarantees the original model.
| Field | Value |
|---|---|
| Input | Text |
| Output | Text |
| Required | messages |
| Optional | Gemini 3.7 Flash: |
| Input context | 1,048,576 tokens |
| Maximum output | 65,536 tokens (default 16,384) |
| Response | Gemini 3.7 Flash returns a chat.completion response, or SSE chunks when streaming is requested. |
| Settlement | Measured input, cached input and output tokens |
Key features & highlights
Fast enough to sit inside a loop
Gemini 3.7 Flash is deprecated: Google states that requests using its old API name now run on Gemini 3.8 Flash, so the name no longer guarantees the original model.
Three levels, decided per turn
For Gemini 3.7 Flash, reasoning_effort accepts low, medium, high and defaults to medium; compare measured token usage when changing how much deliberation a request needs.
1,048,576 tokens in one request
A whole module and its tests, a long agent transcript with every tool result still attached, or a set of documents read in one pass. The ceiling counts the system prompt, the history and the tool output together, so the budget belongs to the thread and not to the last message.
Request parameters
| Parameter | Required | Description |
|---|---|---|
messages | Yes | Build the Gemini 3.7 Flash conversation in chronological messages using text, |
max_tokens | No | Gemini 3.7 Flash reserves |
reasoning_effort | No | For Gemini 3.7 Flash, |
stop | No | In Gemini 3.7 Flash, stop accepts up to four ending sequences; matching text is omitted and billing covers the tokens actually produced before termination. at least 1 characters · at least 1 items · at most 4 items |
seed | No | Use seed to compare one changed input at a time in Gemini 3.7 Flash; identical seeds do not promise identical answers or alter token rates. |
temperature | No | Gemini 3.7 Flash accepts temperature from 0 to 2, default 1; test changes against your own task rather than treating lower values as a correctness guarantee. |
top_p | No | For Gemini 3.7 Flash sampling comparisons, adjust |
tools | No | Up to 128 function definitions per request. at most 128 items |
tool_choice | No | With Gemini 3.7 Flash, |
response_format | No | Ask for a JSON object and name every key in the system message - this is how extraction results come back parseable. |
Pricing
Input $0.675 / Output $3.375 per 1 million tokens
Use cases
Everyday coding work
Reading a diff and saying what it changes, writing the test that was missing, turning a stack trace into a patch. These are short, frequent requests where the time to first token decides whether the tool gets used at all.
Agent tool loops
Up to 128 function definitions per request, with tool_choice to force a specific call or none at all. Tool calls come back in the OpenAI shape, so an existing agent runtime needs a model id and nothing else.
Multi-step execution over a long thread
An agent that has already called six tools carries all six results into its next request. A 1,048,576-token window is what keeps that thread intact instead of forcing a summarisation step halfway through the job.
Structured extraction at volume
Ask for a JSON object with response_format, name every key in the system message. Log lines into fields, tickets into labels, free text into a schema - the price per call is what decides whether the job is worth running.
Prompt guide & pro tips
Leave room for the thinking before you cap the reply
On the default medium effort the model thinks before it writes, and that thinking comes out of the same
max_tokensbudget as the reply. A tight cap spends the budget on deliberation and returns an empty string. Givemax_tokensreal room - a few thousand for a coding answer - or dropreasoning_effortto low when you want a short answer and no deliberation.Switch effort per turn, not per integration
Run the routine steps of a loop on low for a faster first token, then send the step that has to be right at high. Same endpoint, same body, one string different.
Name your tools the way you want them called
The model picks from the descriptions you supply, so a vague one costs a wrong call and another round trip. Keep the list to the tools this step could plausibly need, and use
tool_choicewhen the step has exactly one right answer.Decide how the history gets trimmed
1,048,576 tokens is a large budget, but every turn re-sends the whole thread, so input tokens grow with the loop. Fold finished sub-tasks into a short result line and keep the recent turns verbatim.
Gemini 3.7 Flash is deprecated: Google states that requests using its old API name now run on Gemini 3.8 Flash, so the name no longer guarantees the original model.
Fast enough to sit inside a loop
Gemini 3.7 Flash is deprecated: Google states that requests using its old API name now run on Gemini 3.8 Flash, so the name no longer guarantees the original model.
Three levels, decided per turn
For Gemini 3.7 Flash, reasoning_effort accepts low, medium, high and defaults to medium; compare measured token usage when changing how much deliberation a request needs.
1,048,576 tokens in one request
A whole module and its tests, a long agent transcript with every tool result still attached, or a set of documents read in one pass. The ceiling counts the system prompt, the history and the tool output together, so the budget belongs to the thread and not to the last message.
Everyday coding work
Reading a diff and saying what it changes, writing the test that was missing, turning a stack trace into a patch. These are short, frequent requests where the time to first token decides whether the tool gets used at all.
Agent tool loops
Up to 128 function definitions per request, with tool_choice to force a specific call or none at all. Tool calls come back in the OpenAI shape, so an existing agent runtime needs a model id and nothing else.
Multi-step execution over a long thread
An agent that has already called six tools carries all six results into its next request. A 1,048,576-token window is what keeps that thread intact instead of forcing a summarisation step halfway through the job.
Structured extraction at volume
Ask for a JSON object with response_format, name every key in the system message. Log lines into fields, tickets into labels, free text into a schema - the price per call is what decides whether the job is worth running.
Leave room for the thinking before you cap the reply
On the default medium effort the model thinks before it writes, and that thinking comes out of the same max_tokens budget as the reply. A tight cap spends the budget on deliberation and returns an empty string. Give max_tokens real room - a few thousand for a coding answer - or drop reasoning_effort to low when you want a short answer and no deliberation.
Switch effort per turn, not per integration
Run the routine steps of a loop on low for a faster first token, then send the step that has to be right at high. Same endpoint, same body, one string different.
Name your tools the way you want them called
The model picks from the descriptions you supply, so a vague one costs a wrong call and another round trip. Keep the list to the tools this step could plausibly need, and use tool_choice when the step has exactly one right answer.
Decide how the history gets trimmed
1,048,576 tokens is a large budget, but every turn re-sends the whole thread, so input tokens grow with the loop. Fold finished sub-tasks into a short result line and keep the recent turns verbatim.
On the default medium effort the model thinks before it writes, and that thinking is drawn from the same max_tokens budget as the reply. Set max_tokens too low - 64 is enough to see it - and the budget is spent before a single word of the answer is produced, so the reply comes back as an empty string. An empty reply is treated as a failed generation and refunded in full, but the fix is on your side: give max_tokens real room, or drop reasoning_effort to low for the short turns where you do not want it thinking at all.
For Gemini 3.7 Flash, reasoning_effort accepts low, medium, high and defaults to medium; compare measured token usage when changing how much deliberation a request needs. Gemini 3.7 Flash is deprecated: Google states that requests using its old API name now run on Gemini 3.8 Flash, so the name no longer guarantees the original model.
Gemini 3.7 Flash remains subject to its own content rules even though SpicyAPI adds no filter; use authorized material and respect privacy, consent and applicable terms.
max_tokens
Gemini 3.7 Flash reserves max_tokens for both thinking and the visible answer: default 16,384, ceiling 65,536, with reasoning counted as output usage.
messages
Build the Gemini 3.7 Flash conversation in chronological messages using text, image_url and video_url; all messages share the 1,048,576-token input budget; inline video is limited to 14 MB.
reasoning_effort
For Gemini 3.7 Flash, reasoning_effort accepts low, medium, high and defaults to medium; compare measured token usage when changing how much deliberation a request needs.
response_format
Ask for a JSON object and name every key in the system message - this is how extraction results come back parseable.
seed
Use seed to compare one changed input at a time in Gemini 3.7 Flash; identical seeds do not promise identical answers or alter token rates.
stop
In Gemini 3.7 Flash, stop accepts up to four ending sequences; matching text is omitted and billing covers the tokens actually produced before termination.
temperature
Gemini 3.7 Flash accepts temperature from 0 to 2, default 1; test changes against your own task rather than treating lower values as a correctness guarantee.
tool_choice
With Gemini 3.7 Flash, tool_choice can leave selection automatic, disable tools, require a call or name the function your workflow must invoke.
tools
Up to 128 function definitions per request.
top_p
For Gemini 3.7 Flash sampling comparisons, adjust top_p within 0.01–1 while keeping temperature fixed so the effect of one control remains visible.
Gemini 3.7 Flash remains subject to its own content rules even though SpicyAPI adds no filter; use authorized material and respect privacy, consent and applicable terms. Use Gemini 3.7 Flash only with lawful, consensual adult material; content involving minors is prohibited.
Gemini 3.7 Flash remains subject to its own content rules even though SpicyAPI adds no filter; use authorized material and respect privacy, consent and applicable terms.
Gemini 3.7 Flash remains subject to its own content rules even though SpicyAPI adds no filter; use authorized material and respect privacy, consent and applicable terms. Use Gemini 3.7 Flash only with lawful, consensual adult material; content involving minors is prohibited.
Gemini 3.7 Flash remains subject to its own content rules even though SpicyAPI adds no filter; use authorized material and respect privacy, consent and applicable terms.
API quick start
curl --fail-with-body -sN https://api.spicyapi.ai/v1/chat/completions \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "google/gemini-3.7-flash/chat",
"messages": [
{
"role": "user",
"content": "Summarise the following release notes into three bullet points."
}
],
"stream": true
}' \
| jq --unbuffered -Rrj 'select(startswith("data: ")) | .[6:] | select(. != "[DONE]") | fromjson | if .error then "\n[error] \(.error.message)\n" else (.choices[0].delta.content? // empty) end'
See the API reference for authentication, the complete schema, polling, and error handling.



















