Skip to content

Function Calling

POST
/v1beta/models/gemini-2.5-pro:generateContent
  • Declare tools.functionDeclarations for 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
object
object[]
Required

Tool declarations

object

Generation config

Responses

Success

application/json

Playground

Authorization
Body

Samples