Introduction
OpenAI-compatible chat for Gemini 3.7 Flash. A 1,048,576-token read window, three reasoning-effort levels, 128 tool schemas and JSON output on one synchronous call, with SSE streaming when you ask for it.
Gemini 3.7 Flash is Google's high-speed Flash model, built for everyday coding, agentic tool use and reliable multi-step execution, and published here as a single OpenAI-compatible chat endpoint. One request reads up to 1,048,576 tokens and answers in up to 65,536, reasoning effort moves between low, medium and high turn by turn, and tool calling and JSON output are written the OpenAI way.
Key features & highlights
Fast enough to sit inside a loop
An agent that plans, calls a tool, reads the result and decides again spends most of its wall clock waiting on the model. This is the shape of work the model was built for - everyday coding, tool use and multi-step execution - so the loop closes quickly instead of stalling on every hop.
Three levels, decided per turn
low, medium and high, with medium as the default. It is one string on the same request body, so a routine step can run on low while the step that has to be right goes to high. There is no minimal setting on this model: Google's own API rejects it, and so does this endpoint rather than quietly rewriting it.
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 | Ordered turns, oldest first. Content is a string, or an array of text, |
max_tokens | No | Caps the reply at 65,536; the default is 16,384. |
reasoning_effort | No | minimal, low, medium or high; medium is the default. Routine steps run fine on low, and the step that has to be right can be raised to high on its own. |
stop | No | Up to 4 sequences, as a string or an array. The reply ends as soon as the model writes one of them, and the matched text itself is left out. at least 1 characters · at least 1 items · at most 4 items |
seed | No | Any integer. |
temperature | No | 0 to 2, default 1. |
top_p | No | 0.01 to 1. Adjust this or temperature, never both in the same comparison. |
tools | No | Up to 128 function definitions per request. at most 128 items |
tool_choice | No | auto, none, required, or an object naming one function. |
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_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.
Limits to plan around
reasoning_effort accepts low, medium and high only. Google's API rejects minimal on this model, so this endpoint rejects it too rather than quietly rewriting it to something else. The reply ceiling is 65,536 tokens and a max_tokens above it fails validation outright. Message content is text, images and video; audio parts are rejected. Video is sent as an uploaded file, and the video in one request can total 14 MB.
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.












