Gemini API Key
To use AI features in MChat (Translation; AI Summarize), you need to obtain a Gemini API key from Google Cloud Platform and enable the Gemini API Key in MChat settings.

How to obtain Gemini API Key
Follow these steps to obtain your Gemini API Key:
Step 1: Go to https://aistudio.google.com/api-keys and sign in with your Google account.
Step 2: Click on Create API Key button on the top right corner.

Step 3: A "Create a new key" popup will appear.

Fill in the required information:
- Name: Enter a name for your API key (e.g., MChat Key).
- Choose an imported project (Optional): You can select "Default Gemini Project" or you can create your new project
Step 4: Click on Create key button to create the API key.

Step 5: Your API key will be generated and displayed. Click on the Copy API key button to copy the key to your clipboard.

Now you have successfully obtained your Gemini API Key.
Enable Gemini API Key in MChat
To enable the Gemini API Key in MChat, follow these steps:
Step 1: In MChat dashboard, go to Settings → MChat Settings → Gemini API Key.
Step 2: Turn on the Using Gemini API Key toggle.

Step 3: Paste the copied Gemini API Key into the API Key input field.

Step 4: Click on the Save Edit button to save the settings.
You have successfully enabled the Gemini API Key in MChat. You can now use AI features such as Translation and AI Summarize in your chat widget.
Optional: When turned on the Using Gemini API Key toggle and filled in the API Key field, you can select the Gemini model you want to use for AI features from the Gemini Model dropdown menu, the default model is Gemini 3 Pro Preview.
Disable Gemini API Key
When you disable the Using Gemini API Key toggle, all AI features that require the Gemini API Key will be disabled in MChat.
For chats that have already used Translation, it will stop translating new messages even you turn on the Gemini API Key again, but the previous translated messages will still be available.
Gemini API Key Error Handling
If there is an issue with the Gemini API Key (e.g., invalid key, exceeded quota, etc.), an error message will be displayed in the AI features that require the Gemini API Key (Translation; AI Summarize). And the detail error message will be displayed under the API Key input field in the Gemini API Key settings page.
