Gemini Native Format
Crazyrouter supports Google Gemini’s native API format, including thegenerateContent and streamGenerateContent endpoints.
Endpoints
Authentication
Pass the API Key via URL parameter:Text Generation
Response Format
Streaming Generation
Multi-Turn Conversation
cURL
Thinking Mode
Gemini thinking models support reasoning before answering:cURL
generationConfig Parameters
| Parameter | Type | Description |
|---|---|---|
temperature | number | Sampling temperature, 0-2 |
maxOutputTokens | integer | Maximum output tokens |
topP | number | Nucleus sampling parameter |
topK | integer | Top-K sampling |
stopSequences | array | Stop sequences |
responseMimeType | string | Response MIME type, e.g. application/json |
responseSchema | object | JSON Schema to constrain output format |
thinkingConfig | object | Thinking mode configuration |
Gemini native format uses
contents arrays and parts structures, which differ from OpenAI’s messages format. If you prefer the OpenAI format, you can use the Gemini OpenAI-compatible format.