Google Native API Format
Gemini 3.1 Flash Lite - Native API - Full Reference
- Call Gemini-3.1-flash-lite-preview model using Google Native API format
- Can use synchronous processing mode, returns conversation content in real-time
- Plain text conversation: Single-turn or multi-turn contextual dialogue, see simple_text and multi_turn examples in code samples
- Multimodal input: Supports text + image/audio/video mixed input, see audio_analysis, image_understanding, and multi_file examples in code samples
- Parameter tuning: Control generation quality via generationConfig
- Streaming: Replace
generateContentwithstreamGenerateContentin the URL
POST
BaseURL: The default BaseURL is
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:
Authorization: Bearer YOUR_API_KEYBody
application/json
List of conversation contents, supports multi-turn dialogue and multimodal input
Minimum array length:
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)