OptionalrequestOptions: RequestOptionsCounts the tokens in the provided request.
OptionalsingleRequestOptions: SingleRequestOptionsMakes a single non-streaming call to the model and returns an object containing a single GenerateContentResponse.
OptionalsingleRequestOptions: SingleRequestOptionsMakes a single streaming call to the model and returns an object containing an iterable stream that iterates over all chunks in the streaming response as well as a promise that returns the final aggregated response.
OptionalsingleRequestOptions: SingleRequestOptionsGets a new ChatSession instance which can be used for multi-turn chats.
OptionalstartChatParams: StartChatParamsStaticnormalizeInternalNormalizes the given model name to a fully qualified model resource name.
The model name to normalize.
The fully qualified model resource name.
Protected Internal_ReadonlymodelThe fully qualified model resource name (for example, gemini-3.1-flash-lite for text or
publishers/google/models/gemini-3.1-flash-lite-image for image models).
OptionalrequestOptionalsystemOptionaltoolOptionaltools
Class for generative model APIs.