Core developer capabilities
Function CallingDeclare function schemas and let Gemini generate structured calls to connect with any external API or tool.
Google Search GroundingGround responses in real time search results with source citations for factual, up to date answers.
Code ExecutionGemini writes and runs Python in a sandbox for math, data processing, and logic verification.
Structured OutputsForce JSON responses matching your schema. Eliminates parsing issues in automated pipelines.
Context CachingCache large prompts and reuse them across requests at 90% reduced input cost.
Batch APISubmit bulk requests at 50% off. Ideal for offline processing and data pipelines.
1
Define function schemas
Declare your tools as JSON schemas describing parameters, types, and descriptions
2
Send prompt with tools
Include the function declarations alongside your user prompt in the API call
3
Gemini generates a call
The model decides which function to call and returns structured parameters
4
Execute and return
Your code runs the function, returns the result, and Gemini incorporates it into the final response
Combine caching with batch for maximum savings
Context caching (90% off input tokens) and the Batch API (50% off all tokens) can be combined. For repetitive long context workloads, this can reduce effective costs by up to 95% compared to standard pricing.