Generate content using Google Gemini models following the Gemini API format
https://api.wisgate.ai (replace generativelanguage.googleapis.com)$GEMINI_API_KEY with your $WISDOM_GATE_KEYopenapi.json. Scroll down to see the interactive API reference.gemini-3-pro-preview)thinkingLevel parameter to control thinking intensity ("LOW" or "HIGH").
gemini-2.5-pro)thinkingBudget parameter to control the Token budget for thinking.
0: Disable thinking.-1: Dynamic thinking (model decides automatically, default).> 0: Set a specific Token limit (e.g., 1024).streamGenerateContent and it is recommended to add ?alt=sse to use the Server-Sent Events format.
contents array:
finishReason field in the response indicates why the model stopped generating:
| Value | Meaning |
|---|---|
STOP | Natural completion |
MAX_TOKENS | Reached maxOutputTokens limit |
SAFETY | Triggered safety filter |
RECITATION | Detected recitation of training data |
OTHER | Other reason |
maxOutputTokens in generationConfig to limit output lengthgemini-2.5-flash is more economical than gemini-3-pro-preview)usageMetadata field of responsesparts array. You can include both text and images in a single request:
Bearer token authentication. Include your API key in the Authorization header as 'Bearer YOUR_API_KEY'
The model identifier (e.g., 'gemini-pro', 'gemini-pro-vision')
The operation to perform. Use 'generateContent' for standard requests, or 'streamGenerateContent?alt=sse' for streaming responses with Server-Sent Events format.