Can I use my own API key with Cursor?
How to use your own API key
Cursor supports bringing your own API key for some AI providers, such as OpenAI. You can add your key in the settings under the 'Models' or 'API Keys' section. This lets you use your own quota and potentially save on costs if you already have an API subscription.
However, not all models or features support custom API keys. For example, Cursor's proprietary models like those used for 'Tab' completion or 'Composer' may require a Cursor Pro subscription and cannot be accessed with your own key. Also, some advanced features like 'Chat' with certain models might be restricted to Cursor's own backend.
- Open Cursor settings (Cmd/Ctrl + ,) and navigate to 'Models' or 'API Keys'.
- Enter your API key for supported providers like OpenAI.
- Note that using your own key may disable some Cursor-specific features or models.
- You are responsible for any costs incurred with your own key.
Limitations and considerations
When you use your own API key, you might lose access to Cursor's optimized prompts or fine-tuned models. Cursor's built-in models are often tuned for code editing tasks, so responses may differ when using a raw API key.
Also, Cursor's free plan includes a limited number of AI requests. Using your own key can bypass those limits, but you'll need to manage your own usage and billing. Some users report that certain features like 'Chat with Codebase' may not work with custom keys.
- Custom keys may not work with all Cursor features (e.g., Composer, Tab).
- You won't get Cursor's included quota; you'll pay your API provider directly.
- Performance and response quality can vary compared to Cursor's default models.
Common mistakes
- Assuming all Cursor features work with your own API key; many require a Cursor subscription.
- Thinking you can use your own key to avoid all costs; you still pay your API provider.
- Believing that custom keys give the same experience as Cursor's built-in models; they often don't.
