Gemini-compatible generateContent
When to use this page
Use this page when your client expects the Gemini generateContent API shape.
Base URL
https://api.quotaflow.ai
Endpoint
POST https://api.quotaflow.ai/v1beta/models/{model}:generateContent
Supported models
The current text catalog includes the following identities; some have unknown availability. Use authenticated discovery for your key and the Gemini text quickstart for complete OpenAI/native examples.
gemini-2.5-flashgemini-2.5-flash-litegemini-2.5-progemini-3.1-flash-litegemini-3.1-pro-previewgemini-3.5-flashgemini-3.5-flash-litegemini-3.6-flashgemini-3.7-flashgemini-3.8-flashgemini-4-argon
Reasoning-capable models support Gemini-style thinking controls where the model family exposes them. Use generationConfig.maxOutputTokens when you need a hard output cap. When it is omitted, Quotaflow sends a normal 1024-token default so the request has a bounded execution and billing contract.
Use Gemini-native generationConfig.thinkingConfig for Gemini thinking controls. Do not send a top-level thinking field to Gemini-compatible endpoints; Quotaflow returns a clear 400 invalid_request_error for unsupported parameter shapes instead of retrying the request on another execution path.
Protocol surfaces
Quotaflow supports Gemini text models on three customer-facing surfaces when your key/package enables the model:
- Gemini-compatible:
:generateContent,:streamGenerateContent?alt=sse, and:countTokens. Use this surface for Gemini SDKs, cached-content workflows, and token counting. - OpenAI-compatible chat:
/openai/v1/chat/completionswith the same Gemini model ids andstream: truefor SSE. Use this surface when your app already speaks Chat Completions. Quotaflow preserves the Chat Completions request and response shape on this path instead of requiring Gemini-native fields. - OpenAI-compatible responses:
/openai/v1/responseswith the same Gemini model ids andstream: truefor SSE. Use this surface when your app already speaks the Responses API. Quotaflow serves it by projecting the request onto the same Chat Completions cells (no upstream speaks the Responses protocol for Gemini), and rewrites the answer back into the Responses shape; see the Responses page for the field mapping. This surface is stateless:storemust befalseif you send it at all, andprevious_response_id,conversation,promptandbackgroundare refused with a400, because Quotaflow keeps no response store to read them back from. Send the whole turn ininputeach time.
Cached-content and countTokens requests require a Gemini-compatible route. The two OpenAI-compatible Gemini surfaces are for generation, not Gemini native cache management.
Capability availability and retries
Gemini availability is evaluated per model, protocol surface, and capability. Seeing a model in authenticated /models confirms key access, not that every combination of plain generation, streaming, function tools, hosted tools, image, document, audio, and video input is currently enabled.
Unknown or unavailable model/endpoint configurations can return 404; invalid request fields return 400. Retry only temporary capacity/network errors such as 429 or 503, with bounded backoff. Do not silently substitute a different model.
Protocol support is not a live-capacity report. The three public generation interfaces above have implemented handlers. Optional tools, media inputs and streaming require matching model/request capabilities and available capacity. Check discovery and inspect the response rather than relying on historical supply dates.
The google/ prefix is accepted for compatible Gemini model ids when your key/package enables that alias. Call your model discovery endpoint to confirm what your key can use.
Gemini image models have their own image contract: model-specific sizes, multi-turn reference edits, native thinking/sampling controls and Google Search grounding when priced for the selected model. Native :streamGenerateContent?alt=sse can return the completed image as one chunk, and Interactions provides JSON or steps-based SSE. These are not OpenAI Images streaming chunks.
Curl
curl "https://api.quotaflow.ai/v1beta/models/gemini-3.8-flash:generateContent" \
-H "x-goog-api-key: $QUOTAFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{ "text": "Summarize the benefits of an API gateway in three bullet points." }
]
}
]
}'
Quotaflow returns a Gemini-compatible response for Gemini-style clients.