Case study · August 14, 2026

How to connect Reality Router to Cursor

One `reality-router expose` command opens a public tunnel; Cursor points at it via Override OpenAI Base URL. On a real 528-request stretch, RR cut the bill from $47.20 to $5.40 (89% off). Chat, Composer, and Agent all route through RR.

Actual bill via RR
$5.40
Same run, no routing
$47.20
Saved automatically
89%

One command to open the router, one paste into Settings. Every Chat, Composer, and Agent call then routes through RR — smart per-call model choice, full cost dashboard, no more staring at your fast-requests-remaining counter.

If you're on Cursor, you already know the drill: the $20/mo Pro plan is fine until you actually use it, then you're rationing fast requests by mid-week. Cursor's own Settings has a way out — it's called Override OpenAI Base URL — and pointing it at Reality Router turned a $47.20 bill into $5.40 on a real 528-request stretch (89% off, dashboard shown below), without changing how anyone actually uses Cursor. Four things happen at once:

  • Per-call model selection — RealitySignal calibrated probabilities pick the right model for each step, so cheap models handle boilerplate and expensive ones only fire when they'll actually help.
  • No fast-request meter — pay per token instead of per bucket. Kick off a long Composer session without watching a counter.
  • Live cost visibility — every request, every dollar, every model choice lands in a dashboard you own.
  • Same Cursor — same Chat panel, same Cmd+K, same Composer, same keybindings. Just cheaper and metered.

Here's the whole setup.


Before the setup: Cursor needs a public URL

Cursor sends every request from its own servers, not from your machine. A router listening on localhost:8000 is invisible to it. So the setup has one extra piece that the other IDE posts don't: the router has to be reachable at a public HTTPS address, protected by an API key. Reality Router 0.0.7 ships one command that does both.

You will also need Cursor Pro — the Override OpenAI Base URL setting isn't available on the Free tier, and any attempt to send a chat prompts an upgrade before the request goes out.

cloudflared needs to be installed on the machine where the router runs:

brew install cloudflared        # macOS

1. Open the router to Cursor (60 seconds)

On the machine running Reality Router:

reality-router expose

What that does, in order:

  1. Checks the router is enforcing an API key. If it isn't, generates one and asks you to restart the router so it takes effect.
  2. Opens a temporary Cloudflare tunnel to the router.
  3. Prints the public base URL (something like https://ala-kept-made-tigers.trycloudflare.com/v1) and the API key.

Keep the terminal open — the tunnel closes when you stop the command.

[!IMPORTANT] Never expose the router without a key. Without one, the tunnel URL is an open proxy that anyone who finds it can spend your provider credits through. expose refuses to run until the key is enforced, which is the whole point of the first step.

2. Paste the address into Cursor (30 seconds)

Open Cursor Settings → Models and scroll to the OpenAI API Key section.

  • OpenAI API Key: the key reality-router expose printed. Not an OpenAI key — a router key.
  • Enable Override OpenAI Base URL and paste the printed URL (it already ends in /v1).
  • Under Add model put auto — RR chooses per call. Add any other id from reality-router models if you want to pin one.
  • Click Verify. Green check = you're live.

Then disable any of Cursor's pre-enabled models that overlap with what the router serves; the docs advise this to avoid routing conflicts.

3. Verify it worked (30 seconds)

In Cursor's chat (Agent mode), with auto selected:

Reply with the single word: ok

Then something that needs a tool call:

Create a file called rr-test.txt containing the words: routed via RR

Open the RR dashboard at http://localhost:8000/metrics/dashboard — Cursor shows up in Agent Activity as Cursor/<version>, and the second request produces several routed calls as Cursor sends the tool definitions, the model calls a tool, and the result goes back.

What routes, what doesn't

Cursor's Override OpenAI Base URL is a mode switch, not a mixer. When you enable it:

  • ✅ Chat, Composer, and Agent route through RR
  • ✅ Cmd+K inline edits route through RR
  • ⏸ Tab autocomplete stays on Cursor's proprietary model (their infrastructure, included in Free)
  • ⏸ Cursor's bundled model catalog (Claude, GPT-4o etc. via Cursor's plan) is disabled while override is on

That's the right split. Tab autocomplete is Cursor's strongest feature and it's included in the Free tier anyway. The expensive stuff — long-running agent sessions, big Composer refactors, deep Chat threads — is exactly what RR is best at routing.

The quick-tunnel address changes every run

reality-router expose uses Cloudflare's quick-tunnel service, and the URL is generated fresh each time. When you restart it — after a reboot, after killing the terminal — the address is different, and Cursor's saved base URL is stale.

For daily use, two better options:

  • A named Cloudflare tunnel. Free, has a stable hostname, survives restarts. Cloudflare's guide walks through it in about ten minutes.
  • ngrok with a reserved domain. Paid, but the setup is a single-file config.

Either way, the router side stays the same — reality-router expose --url <your-domain> (or your own tunnel command) points it at the fixed address instead of a quick-tunnel.

What you'll see

Here's the dashboard mid-session, with Cursor as the top consumer:

Reality Router dashboard mid-session: 528 requests, $5.40 actual spend against $47.20 potential, 89% savings, Cursor as the top consumer in the Agent Activity table.Enlarge

Total Volume: 528 requests. Accrued Expense: $5.40. Potential Cost (if everything had run on the top model in the pool): $47.20. Retained Value: $41.80 — 89% of the bill you'd have paid without routing, saved automatically. The top row of Agent Activity is Cursor itself.

Why bother

Cursor's pricing is a black box on purpose. You buy Pro at $20/mo, get a bucket of "fast requests," burn through it faster than you expected, then either wait for reset day or upgrade. Neither the number of requests you used nor the model each one actually hit is really visible to you. And any long-running Agent job is playing Russian roulette with the meter.

Route Cursor through RR and that changes:

  • No caps to hit. Kick off a full-codebase audit, a batch refactor, a research crawl — RR bills per token, no bucket, no cutoff.
  • You see every call. The dashboard shows model, cost, latency, success — for every request, in real time. If something spikes, you know within seconds.
  • Cost overruns become impossible to hide. A runaway loop that would have silently drained your fast requests is now visible on the same dashboard, one alert away.

Same Cursor. Same keybindings. Same Chat, Composer, Agent. Just metered, cheaper, and safe to let run.

→ realityrouter.dev


Reality Router is open source and self-hosted. Metrics in this post are from a real 528-request run.