Tool Calling
Gemini Format - Tool Calling Generate Content
- Universal generateContent API (with tool calling) for all Gemini-native-format compatible models
- Tool calling: supports function declarations, model can invoke defined functions
- Multimodal input: supports mixed text + image/audio/video input
- Generation config: control temperature, topP, topK, maxOutputTokens via generationConfig
- Safety settings: configurable content safety thresholds
- Supports both streaming and non-streaming responses
POST
Authorizations
All endpoints require Bearer Token authentication
Add the following to your request header:
Authorization: Bearer YOUR_API_KEY
Path Parameters
Model name, e.g. gemini-2.5-flash
Example:
"gemini-2.5-flash"
Body
application/json