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:

  1. Visit Google Cloud Console

  2. Create an account or sign in if you already have one

  3. Go to the (API Keys page)(https://aistudio.google.com/apikey)

  4. Click “Create API Key” and select a project to enable it for

  5. Copy the API key - make sure to save it somewhere secure

  6. 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.

Usage & Billing

  • Google Cloud bills based on the number of tokens used
  • You can monitor your usage in the Google Cloud Console
  • Set up billing alerts to avoid unexpected charges
  • New accounts typically come with some free credits to get started

For more information about Gemini’s pricing and usage, visit Google Cloud’s pricing page.

Enabling Gemini does not give you access to all of Alex’s features. To enable codebase indexing, follow the VoyageAI API Key Instructions, and to enable Thinking mode, follow the FireworksAI API Key Instructions.

For other models like GPT 4o and the o-series (o1, o3, o3-mini), follow the OpenAI API Key Instructions. For Anthropic’s models (Claude 3.5 Sonnet, Claude 3.7 Sonnet) follow the Anthropic API Key Instructions.