Connect Cursor to an OpenAI-compatible endpoint
Use a separate relay.fast key for development, keep it out of source control, and point Cursor at the documented OpenAI-compatible base URL. Settings names can change across Cursor releases, so verify them in the current client UI.
Connection checklist
- Create a relay.fast account and an API key with only the access your project needs.
- In Cursor's model or provider settings, choose a custom OpenAI-compatible provider.
- Set the base URL to
https://relay.fast/v1, paste the key, and select a model returned by/v1/models. - Send a short test prompt, then verify usage and latency in the dashboard.
Keep editor traffic safe
Use environment-level or app-level secrets, rotate keys when a machine is shared, and avoid sending private repositories to a model until your data-handling requirements are satisfied. See security overview.
Where the settings are
In current Cursor releases the fields are in the models section of the settings: paste the key into OpenAI API Key, turn on Override OpenAI Base URL, enter https://relay.fast/v1, and add model names exactly as the catalog lists them, such as gpt-6.1-sol or claude-sonnet-5-5.
One-command setup
The script configures Cursor for relay.fast. It asks for the API key inside the script, so the key never appears in the command or shell history. Every downloaded file is checked against a published SHA-256 checksum, and running it again can restore the previous settings.
Windows (PowerShell):
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://relay.fast/downloads/setup/install-cursor-en.ps1 | iex"macOS and Linux:
curl -fsSL https://relay.fast/downloads/setup/install-cursor-en.sh | bashYou can read the script before running it by opening the same URL in a browser.
Current prices of models for coding agents
Prices checked from the live catalog. "From" is the lowest price among the relay.fast sources that currently serve the model. The price you pay depends on the source your request uses and can change on any day. The pricing page always shows current values.
| Model | Model ID | Official input / output per 1M tokens | relay.fast from, input / output | Cache read from | Context |
|---|---|---|---|---|---|
| Claude Sonnet 5.5 | claude-sonnet-5-5 | $2 / $10 | $0.238 / $1.19 (−88%) | $0.0238 | 1M |
| Claude Opus 5.5 | claude-opus-5-5 | $4 / $20 | $0.111 / $0.556 (−97%) | $0.00556 | 1M |
| GPT-6.1 Sol requests above 272K input tokens cost more | gpt-6.1-sol | $2 / $10 | $0.03 / $0.15 (−98%) | $0.0015 | 1.05M |
| GLM-5.3 | glm-5.3 | $1.4 / $4.4 | $0.035 / $0.11 (−97%) | $0.0065 | 1M |
| Kimi K3 | kimi-k3 | $3 / $15 | $0.15 / $0.75 (−95%) | $0.015 | 1.05M |
| DeepSeek V4.1 Flash price depends on the time of day; the peak-hours price is shown | deepseek-v4.1-flash | $0.3 / $1.2 | $0.03 / $0.12 (−90%) | $0.0006 | 1M |
Frequently asked questions
Can Cursor use Claude models too?
It depends on the provider mode and model exposed to your account. Use the appropriate compatible endpoint and verify the model in the live catalog.
Why does a model not appear?
The model may not be enabled for your account, the identifier may have changed, or Cursor may cache provider settings. Recheck /v1/models and the current docs.
Should I use my OpenAI key?
No. Use a relay.fast key for the relay.fast base URL and keep provider credentials separate.