To use Gemini’s models (Gemini 2.5 Pro, Gemini 2.0 Flash) in Xcode with Alex Sidebar without paying a subscription for Alex, you’ll need a Google AI Studio API key.Here’s how to get one:
Click “Create API Key” and select a project to enable it for
Copy the API key - make sure to save it somewhere secure
In Alex Sidebar:
Open Settings (⚙️)
Select “Models” at the bottom of the page
Paste your AI Studio API key in the Gemini text field
Keep your API key secure and never share it publicly. If you suspect your key has been compromised, you should immediately rotate it in the Google Cloud Console.