Cursor
Cursor is an AI-first code editor. Its "Custom OpenAI" mode talks to PrimeRouter directly.
Cursor is a GUI tool
The installer only edits Cursor's settings.json. You need to launch Cursor at least once so the config directory exists, then run the script.
One-line installer
powershell
irm https://primerouter.ai/install/cursor.ps1 | iexbash
curl -fsSL https://primerouter.ai/install/cursor.sh | bash💡 The script backs up your existing settings.json then injects (via
jqwhen available, or a fresh write):json"cursor.aiProvider": "openai", "openai.apiKey": "<your PrimeRouter key>", "openai.apiBase": "https://primerouter.ai/v1"
Restart Cursor and you'll see PrimeRouter-routed models in the model picker.
Fallback: manual install
Configure inside Cursor's UI
- Open Cursor →
Cmd/Ctrl + , - Search "OpenAI API Key", set Base URL to
https://primerouter.ai/v1 - Paste your PrimeRouter API Key
- Full walkthrough: Coding Tools → Cursor
