Core developer capabilities
Function Calling
Declare function schemas and let Gemini generate structured calls to connect with any external API or tool.
Google Search Grounding
Ground responses in real time search results with source citations for factual, up to date answers.
Code Execution
Gemini writes and runs Python in a sandbox for math, data processing, and logic verification.
Structured Outputs
Force JSON responses matching your schema. Eliminates parsing issues in automated pipelines.
Context Caching
Cache large prompts and reuse them across requests at 90% reduced input cost.
Batch API
Submit bulk requests at 50% off. Ideal for offline processing and data pipelines.
Step 1: Define function schemas
Declare your tools as JSON schemas describing parameters, types, and descriptions
Step 2: Send prompt with tools
Include the function declarations alongside your user prompt in the API call
Step 3: Gemini generates a call
The model decides which function to call and returns structured parameters
Step 4: Execute and return
Your code runs the function, returns the result, and Gemini incorporates it into the final response