Cursor IDE
Set up Claude API in Cursor IDE — step-by-step configuration for Claude Sonnet, Opus, and Haiku models in Cursor.
LLMsRelay is an independently operated API gateway. It is not affiliated with or endorsed by Anthropic, PBC. Product and model names are used only to describe compatibility.
Setup
- Open Cursor → Settings → Models
- Click Add Provider
- Set Base URL to
https://api.llmsrelay.com/v1 - Enter your LLMsRelay API Key
- Add the model IDs you want to use (e.g.,
claude-sonnet-4.6) - Select the model from the model picker in the chat panel
Cursor uses the OpenAI-compatible endpoint. The base URL must include
/v1.Recommended Models
claude-opus-5/claude-fable-5— highest-capability options for complex tasksclaude-opus-4.8/claude-opus-4.7— long coding and reasoning sessionsclaude-sonnet-5/claude-sonnet-4.6— balanced coding defaultsclaude-haiku-4.5— Fastest, ideal for autocomplete
Troubleshooting
- Ensure the base URL ends with
/v1 - Verify your API key is correct and has sufficient credits
- Check that the model ID matches exactly (e.g.,
claude-sonnet-4.6, notclaude-3-sonnet)
Windows setup
- Install Cursor for Windows from cursor.sh (the installer adds
cursorto your PATH automatically). - Open Settings with Ctrl+, → Models.
- Toggle OpenAI API Key, paste your
sk-cs4-...key. - Toggle Override OpenAI Base URL, set
https://api.llmsrelay.com/v1. - Click Verify, then add model IDs returned by
GET /v1/models.
Cursor stores its config under
%APPDATA%\Cursor. After changing keys, fully quit Cursor (Task Manager → end Cursor.exe) before reopening — the settings cache is aggressive.Behind a corporate proxy? Set Windows-wide proxy via setx HTTPS_PROXY "http://proxy.company:8080" in PowerShell, then restart Cursor.
Tab completion uses Cursor's own model and is not affected by these settings — only Chat / Composer / Agent route through LLMsRelay.