Cursor with nRouter
Connect supported Cursor chat models to nRouter using provider credentials, then validate model coverage, billing, and feature limits before rollout.
Connect supported Cursor editor chat models to nRouter to govern team API keys, apply hard budget caps, and track token spend centrally. Route editor chat traffic through an nRouter virtual key (sk-nrouter-...) to inspect real-time costs while Cursor-managed proprietary models remain isolated.
Key capabilities:
- Bring-Your-Own-Key governance: Route Cursor chat traffic through an nRouter virtual key without distributing primary cloud provider keys.
- Per-seat spend ceilings: Enforce hard USD limits per developer key to prevent runaway spend during active editing sessions.
- Request-level cost auditing: Track individual chat completions, model deployments, and exact list-price costs in nRouter logs.
- Clear boundary isolation: Interoperates with standard provider endpoints while Cursor-managed proprietary models remain independent.
Configuration
Check Cursor's official BYOK documentation for feature coverage.
- Mint an nRouter virtual key with a spend limit in the dashboard.
- In Cursor, navigate to Settings → Models and select the matching provider.
- Enter your
sk-nrouter-...virtual key in the provider API key field. - Select a model from the model catalog and run a test chat prompt.
Review Cursor's security notes before transmitting proprietary code.
Verification & Troubleshooting
Every routed chat request appears in nRouter request logs with the serving model and exact USD cost. If requests fail (see Errors & Rate Limits):
- 401
invalid_api_key: The key entered in Cursor is invalid or revoked. - 402
insufficient_credits: The virtual key budget ceiling has been reached. - 404
model_not_found: The model name does not match the active model catalog or the selected provider wire shape.
For repeatable testing, see Node.js SDK examples and budget controls. For other coding agents, see Claude Code with nRouter and OpenClaw with nRouter.
Frequently asked questions
Does every Cursor feature route through nRouter?
No. Per Cursor's documentation, custom API keys apply to supported chat models; other features continue using Cursor-managed models.
Which models can I select?
Select any model from the model catalog whose API wire matches the provider selected in Cursor Settings.
How do I prove the gateway is actually being used?
Send a chat prompt in Cursor and verify the request ID, model, and cost in nRouter request logs.
How do I cap what Cursor can spend through my key?
Configure a hard USD limit on the virtual key in budget controls. Requests return 402 once the limit is reached.