/Docs
Back to dashboard

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

  1. Open Cursor → Settings → Models
  2. Click Add Provider
  3. Set Base URL to https://api.llmsrelay.com/v1
  4. Enter your LLMsRelay API Key
  5. Add the model IDs you want to use (e.g., claude-sonnet-4.6)
  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 tasks
  • claude-opus-4.8 / claude-opus-4.7 — long coding and reasoning sessions
  • claude-sonnet-5 / claude-sonnet-4.6 — balanced coding defaults
  • claude-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, not claude-3-sonnet)

Windows setup

  1. Install Cursor for Windows from cursor.sh (the installer adds cursor to your PATH automatically).
  2. Open Settings with Ctrl+, → Models.
  3. Toggle OpenAI API Key, paste your sk-cs4-... key.
  4. Toggle Override OpenAI Base URL, set https://api.llmsrelay.com/v1.
  5. 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.

Ready to start?

Create a key and configure a compatible API route in under 2 minutes.

View Plans