Adding your API Key for OpenAI
Learn how to get your API Key
To use OpenAI’s models (such as GPT-4o and the o-series models) in Xcode with Alex Sidebar without paying a subscription for Alex, you’ll need an OpenAI API key.
Here’s how to get one:
-
Visit OpenAI’s Platform
-
Create an account or sign in if you already have one
-
Once logged in, navigate to the API Keys section in your account settings
-
Click “Create New API Key”
-
Give your key a name (e.g., “Alex Sidebar”), select a project (or default project) and create it
-
Copy the API key - make sure to save it somewhere secure as you won’t be able to see it again
-
In Alex Sidebar:
- Open Settings (⚙️)
- Select “Models” at the bottom of the page
- Paste your OpenAI API key in the OpenAI 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 OpenAI Platform.
Usage & Billing
- OpenAI bills based on the number of tokens used
- You can monitor your usage in the OpenAI Platform
- Set up billing alerts to avoid unexpected charges
- New accounts typically come with some free credits to get started
For more information about OpenAI’s pricing and usage, visit OpenAI’s pricing page.
Enabling OpenAI 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 Claude models like Claude 3.5 Sonnet and Claude 3.7 Sonnet, follow the Anthropic API Key Instructions.
Was this page helpful?