Documentation
How to connect ChatGPT to Cursor
Last updated:
Setting up Cursor to work with ChatGPT takes a couple of minutes: paste your key, turn on Override OpenAI Base URL and enter our address - and the editor starts reaching OpenAI models through ChatGPT API.
What Cursor is
Cursor calls itself the coding agent for building ambitious software: a VS Code-based editor where agents run in parallel and reach beyond the editor window - into the terminal, into Slack and into pull request reviews on GitHub. The model comes either from its built-in list or from your own key, and that second option is what lets requests go through ChatGPT API.
Composer and any model
Their own Composer model for building software, plus OpenAI, Anthropic and Gemini models in the same interface.
Agents run in parallel
Background agents build, test and demo a finished feature on their own machines; you can start several at once and review the results.
More than an editor
The same agent runs in your terminal, answers in Slack and reviews pull requests on GitHub.
Codebase indexing
Cursor indexes the project and searches it semantically, so the agent pulls in the right files by itself.
What you need
- Cursor installed
- A ChatGPT API key from the dashboard - sign-up comes with $0.25 of balance to test with
- A project to work in
Setting up Cursor
1. Install Cursor
Download Cursor from the official site - there are builds for macOS, Windows and Linux. On first launch it offers to bring your VS Code extensions and settings over.
Download Cursor2. Open the model settings
Press Cmd+Shift+J on macOS or Ctrl+Shift+J on Windows and Linux, then go to the Models section.
3. Set the key and base URL
Scroll to the API Keys section. Paste the key from your dashboard into OpenAI API Key, then turn on the Override OpenAI Base URL switch and enter our address. The key is saved immediately - Secret saved appears next to the field.
API Keys
OpenAI API Key
You can put in your OpenAI key to use OpenAI models at cost.
Secret saved
Override OpenAI Base URL
Change the base URL for OpenAI API requests.
4. Pick a model
Cursor has no separate verify button: once the key and the address are saved, requests go through ChatGPT API. All that is left is picking a model in the composer - usage will show up in the dashboard.
No RepoThis Mac
Plan, Build, / for skills, @ for context
FAQ
Do I need a Cursor subscription?
Your own key only covers requests to the model. Which editor features are available on the free plan and which need a Cursor subscription is Cursor's own decision, and nothing on our side changes it.
Requests are not going through ChatGPT API
Check that the Override OpenAI Base URL switch is on, that the address ends in /v1, and that the key was pasted without spaces or line breaks. Cursor saves the key immediately - there is no separate confirmation button.
Which models are available in Cursor through ChatGPT API?
Everything we serve over the API: the GPT-5.6 family (sol, terra, luna) plus GPT-5.5, GPT-5.4 and GPT-5.4-mini. Add the model you need to Cursor's model list.
How is this different from an official OpenAI key?
Same models, same request format - only the base URL and the key change. The difference is price: the same tokens cost 50% less than official list price.
Next steps
Cursor is connected. Now pick the model that fits your work and see what it costs.