How do I route Cursor API traffic through Headroom?

AI-written, human-reviewed

Run headroom wrap cursor to start the proxy, then override OpenAI and Anthropic base URLs in Cursor settings so measured token savings feed ConvoMargin's build log.

  • headroom
  • cursor
  • convomargin
  • proxy

Prompt

route all Cursor API traffic through Headroom (headroom wrap cursor)

What does headroom wrap cursor do?

It ensures the Headroom proxy is running and prints the exact base URLs for your current project directory. Cursor does not auto-configure; you paste URLs into model settings.

For daniels_corner the OpenAI base URL is http://127.0.0.1:8787/p/daniels_corner/v1 and Anthropic is http://127.0.0.1:8787/p/daniels_corner. Dashboard savings attribute to project name daniels_corner. Re-run from another folder to change attribution.

TLDR: Proxy up, copy URLs, reload Cursor window.

Why is BYOK required for measured savings?

Cursor subscription models route through Cursor's cloud and bypass a local proxy. Bring-your-own-key models with overridden base URLs send traffic through Headroom where compression and cost stats are recorded.

MCP headroom_compress still helps context size but does not log full API spend until requests hit the proxy. headroom wrap cursor plus BYOK closes the loop for ConvoMargin measured fields: api_requests, tokens_saved, cost_saved_usd.

TLDR: BYOK + base URL override = measured ConvoMargin stats.

Answer

headroom wrap cursor starts the proxy on port 8787 and prints project-scoped base URLs. Paste them into Cursor Settings > Models. MCP alone only logs compress tool calls; routing API traffic through the proxy fills measured stats on ConvoMargin's build log.

TLDR: Run headroom wrap cursor to start the proxy, then override OpenAI and Anthropic base URLs in Cursor settings so measured token savings feed ConvoMargin's build log.

More posts · Home · ConvoMargin trace