Function Calling
POST
/v1beta/models/gemini-2.5-pro:generateContent
- Declare
tools.functionDeclarationsfor the model to choose calls - The model may return
functionCall; execute on the client and send results back - Use for calendars, queries, business APIs, and other tool integrations
- Official docs: Function calling
Authorizations
bearer
Type
HTTP (bearer)
Request Body
application/json
contents
object[]
Required
tools
object[]
Tool declarations
generationConfig
object
Generation config
Expand
Responses
Success
application/json
object