Cursor Configuration
Cursor is the most popular AI code editor, deeply integrating AI capabilities based on VS Code, with support for custom OpenAI API endpoints.Method 1: Settings UI Recommended
- Open Cursor → go to
Settings→Models - Find the OpenAI API Key field and enter:
- Click Override OpenAI Base URL and enter:
- Check the models you want to use (e.g.
gpt-4o,claude-sonnet-4-20250514) - Click the Verify button to test the connection
Method 2: Environment Variables
Add environment variables to your shell config file:Verify Configuration
After configuring, open a file in Cursor and pressCmd + L (macOS) or Ctrl + L (Windows/Linux) to open the Chat panel and send a message to test.