Introduction
OpenAI-compatible chat for Gemini 2.5 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. Message content is text, images, video and audio.
Gemini 2.5 Flash is Google's hybrid reasoning Flash model, published here as a single OpenAI-compatible chat endpoint. It reads up to 1,048,576 tokens in one request, answers in up to 65,535, and moves between three reasoning-effort levels, with tool calling and JSON output written the OpenAI way. Google publishes a knowledge cutoff of January 2025 for it, so anything later has to arrive in the prompt.
Key features & highlights
Long read, short answer
A contract, a log dump, a quarter of support tickets - the whole thing goes out in one message and comes back as three lines. That shape is what the 1,048,576-token window buys you, and it is why this id ended up in so many pipelines: the answer is short, so the expensive half of the bill stays small.
Three levels, one string
low, medium and high, with medium as the default. Keep routine work on low and raise the one request that has to land. It is a string on the same request body, so switching costs nothing in integration. We publish the levels and not a token budget, because Google publishes no per-level figure to pass on.
It does not know what came after
Google states a knowledge cutoff of January 2025 for this model, and it does not browse here. For anything newer - a library version, a price, a person's current job - put the facts in the prompt and ask it to work from those. A model that is asked about later events will still answer, and it will sound exactly as sure as when it is right.
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,535; the default is 16,384. Lower it when you want a short answer out of a long read - the ceiling is a limit, not a target. |
reasoning_effort | No | low, medium or high; medium is the default. Routine work runs fine on low, and the one request that has to land 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. Push it towards 0 when the reply is parsed by code, raise it when the writing needs a looser voice. |
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 - that is how a reply comes back parseable. |
Pricing
Input $0.285 / Output $2.375 per 1 million tokens
Use cases
One long document, one short answer
Contracts, logs, transcripts, a diff between two revisions. Hand the whole thing over in a single message and ask for three bullets; the window is large enough that you rarely have to split the input, and the short answer keeps the output side of the bill small.
Bulk labelling and cleanup
Tagging tickets, rewriting summaries, folding free text into fixed fields. These are jobs where the price per call decides whether they are worth running at all, and where a familiar id makes it easy to hand the pipeline to someone else.
Structured extraction
Ask for a JSON object with response_format, name every key in the system message and hold temperature low so the shape stays stable. Your application still validates what comes back.
A drop-in for an existing OpenAI client
If something already calls gemini-2.5-flash through an OpenAI-shaped client, pointing it here is a change of base URL, key and model string. That makes it a low-cost way to compare this endpoint against what you run today.
Prompt guide & pro tips
Send the document, keep the answer short
Put the material in one user message and say how long the answer may be. max_tokens between 300 and 1,000 is usually right for a summary or a diff; the 65,535 ceiling is for the times you really do want a long passage.
Switch effort per request, not per integration
Run the bulk of the traffic on low, then send the request that has to be right at high. Same endpoint, same body, one string different.
Limits to plan around
The reply ceiling is 65,535 tokens and a max_tokens above it fails validation outright. Message content is text, images, video and audio. Uploaded video and audio can total 14 MB per request. A JSON response_format shapes the reply but your application still parses and validates it.
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-2.5-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.












