Custom API Keys
Cursor lets you input your own API keys for various LLM providers to send as many AI messages as you want at your own cost. When a Customer API key is used, we will use that when calling the LLM providers.
To use your own API key, go to Cursor Settings
> Models
> OpenAI API Key
and enter your API key. Then, click on the “Verify” button. Once your key is validated, your OpenAI API key will be enabled.
Some Cursor features (like Tab Completion, Apply from Chat, and Composer) require specialized models and won’t work with custom API keys. Custom API keys only work for features that use standard models from providers like OpenAI, Anthropic, and Google.
OpenAI API Keys
You can get your own API key from the OpenAI platform.
Anthropic API Keys
Similar to OpenAI, you can also set your own Anthropic API key so that you will be using claude-based models at your own cost.
Google API Keys
For Google API keys, you can set your own API key so that you will be using Google models such as gemini-1.5-flash-500k
at your own cost.
Azure Integration
Finally, you can also set your own Azure API key so that you will be using Azure OpenAI models at your own cost.
Will my API key be stored or leave my device?
Your API key will not be stored, but it will be sent up to our server with every request. All requests are routed through our backend, because that’s where we do the final prompt building.