Gemini All-Model API - Native API Format
Select the Gemini text model to call via {model} in the path (see the reference table for the model parameter for all available values).
- Uses the Google native API format and returns conversation content synchronously
- Plain text / multimodal input: mixed text + image / audio / video input
- Streaming: replace
generateContentin the path withstreamGenerateContent(append?alt=sseto receive SSE)
Model specs and differences
- Sampling parameters
temperature/topP/topK: consistent across the entire Gemini 3.x series, custom values do not affect the output;topKis dropped outright by the gateway (not forwarded upstream), and atemperature/topPvalue outside the valid range returns a 400. - Thinking control: the Gemini 3.x series uses
thinkingConfig.thinkingLevel(see thethinkingLevelparameter for the levels supported and the default of each model); the Gemini 2.5 series usesthinkingConfig.thinkingBudget(an integer,0=off). The two are mutually exclusive. - Function calling: for Gemini 3.x, the
FunctionResponsemust echo back theidandnamematching the correspondingFunctionCall, otherwise the request errors. - Last-turn role: the
roleof the last message must not bemodel(Gemini 3.5+ will error). - Token limits:
gemini-3.6-flash/gemini-3.5-flash-litehave a context window of 1,048,576 and a maximum output of 65,536; other models follow their respective specs.
https://direct.evolink.ai, which has better support for text models and long-lived connections. https://api.evolink.ai is the primary endpoint for multimodal services and serves as a fallback address for text models.Authorizations
##All APIs require Bearer Token authentication##
Get API Key:
Visit API Key Management Page to get your API Key
Add to request header:
Path Parameters
Select the Gemini text model to call:
gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-3.1-pro-preview, gemini-3.1-pro-preview-customtools, gemini-3.1-flash-lite-preview, gemini-3-pro-preview, gemini-3-flash-preview, gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite "gemini-3.6-flash"
Body
List of conversation contents, supports multi-turn dialogue and multimodal input
1Generation configuration parameters (optional)
System instruction (optional), mainly text content
List of tools the model can call, such as function calling or code execution
Tool calling configuration (optional)
Safety settings list (optional)
Cached content name, in the form cachedContents/{cachedContent}
Response
Content generated successfully
Response format description:
- When using the
generateContentendpoint, returnsGenerateContentResponse(returns complete response at once) - When using the
streamGenerateContentendpoint, returnsStreamGenerateContentResponse(streaming response, returns content in chunks)