Using a Claude Subscription in Cursor without Paying for API Tokens

This article explains how to use a Claude subscription in the Cursor AI assistant without paying for API tokens. It involves setting up a proxy process and a Cloudflare tunnel to convert requests between the OpenAI and Anthropic formats.

💡

Why it matters

This solution allows users to leverage their Claude subscription in the popular Cursor AI assistant without incurring additional API token costs, which can be significant.

Key Points

  • 1Cursor supports connecting to any LLM via API that is compatible with the OpenAI request format, but Claude's subscription can only be used in Claude Code
  • 2The article presents a solution that proxies requests from Cursor to Claude using the subscription, converting the request formats
  • 3The solution involves setting up a Cloudflare tunnel to provide a public URL that routes traffic to the local proxy process

Details

The article describes a process to use a Claude subscription in the Cursor AI assistant without paying for API tokens. Cursor supports connecting to any LLM via API that is compatible with the OpenAI request format, but Claude's subscription can only be used in Claude Code, which uses a different Anthropic request format. The article presents a solution that proxies requests from Cursor to Claude, converting the request formats. This involves starting a proxy process that handles the format conversion, setting up a Cloudflare tunnel to provide a public URL that routes traffic to the local proxy process, and configuring Cursor to use the Cloudflare URL. The entire setup takes around 30 seconds, and users can then use their Claude subscription in Cursor without paying for API tokens. The article also discusses some limitations and requirements of the solution, such as the need to map Cursor tools to Claude Code tools and handle changes to large documents and plans.

Like
Save
Read original
Cached
Comments
?

No comments yet

Be the first to comment

AI Curator - Daily AI News Curation

AI Curator

Your AI news assistant

Ask me anything about AI

I can help you understand AI news, trends, and technologies