Skip to main content
To use the Gemini model, set the GOOGLE_API_KEY environment variable. You can obtain the Google/Gemini API key from Google AI Studio.
Note: As of the latest release, Mem0 uses the new google.genai SDK instead of the deprecated google.generativeai. All message formatting and model interaction now use the updated types module from google.genai.
Note: Some Gemini models are being deprecated and will retire soon. It is recommended to migrate to the latest stable models like "gemini-2.0-flash-001" or "gemini-2.0-flash-lite-001" to ensure ongoing support and improvements.

Usage

Config

All available parameters for the Gemini config are present in Master List of All Params in Config.