Ungate 漏洞讓開發者繞過 API 成本:AI 定價模式是否已崩壞?

Hacker News May 2026
Source: Hacker NewsAI developer toolsopen sourceArchive: May 2026
一款名為 Ungate 的新型開源工具,讓開發者能將 Cursor 的 AI 請求導向自己每月 20 美元的 ChatGPT 或 Claude 訂閱,避開昂貴的按 token 計費 API 成本。此漏洞反映出對使用量計價的強烈不滿,可能迫使 AI 公司重新思考其定價策略。
The article body is currently shown in English by default. You can generate the full version in this language on demand.

Ungate is an open-source local proxy that intercepts API calls from the popular AI coding assistant Cursor and redirects them to a user's personal ChatGPT Plus or Claude Pro subscription. This effectively replaces Cursor's default pay-per-token billing (which can cost hundreds of dollars per month for heavy users) with a flat $20 monthly fee. The tool has quickly gained traction on GitHub, amassing over 3,000 stars in its first week, as developers celebrate what they see as a justified rebellion against exorbitant API pricing. The hack works by running a local server that mimics Cursor's API endpoint, capturing the request, and forwarding it to OpenAI's or Anthropic's consumer-facing chat endpoints using the user's session tokens. While technically simple, Ungate exposes a fundamental tension: AI coding assistants are becoming indispensable core tools, yet their cost structure scales linearly with usage, punishing power users. The tool's popularity suggests that a significant portion of the developer community would prefer a flat-rate subscription model, even if it means accepting slightly lower reliability or throughput. Ungate is not a long-term solution—it violates the terms of service of both Cursor and the AI providers, and could be patched at any time. But its emergence signals a clear market signal: developers want predictable, all-you-can-eat pricing for AI coding tools, and they are willing to break the rules to get it.

Technical Deep Dive

Ungate is a deceptively simple piece of software that punches well above its weight class. Written in Python and available on GitHub (repo: `ungate-ai/ungate`, currently 3,200+ stars), it functions as a man-in-the-middle proxy. When Cursor sends a request to its default API endpoint (typically `api.cursor.com` or a subdomain), Ungate intercepts that traffic by modifying the system's `/etc/hosts` file or by running a local DNS server that resolves the Cursor API domain to `127.0.0.1`. The proxy then extracts the model name and prompt from the request, authenticates against the user's personal ChatGPT Plus or Claude Pro account using stored session tokens, and forwards the request to the consumer chat endpoint (e.g., `chatgpt.com/backend-api/conversation` or `claude.ai/api/chat`). The response is then streamed back to Cursor in the expected format.

This approach has several technical implications. First, it bypasses Cursor's usage tracking and billing entirely—Cursor believes it is talking to its own API, but the costs are absorbed by the user's personal subscription. Second, it introduces latency overhead because the proxy must parse, re-authenticate, and reformat each request. Early benchmarks from the Ungate GitHub issues show an average latency increase of 300-500ms per request compared to direct API calls, which is noticeable but tolerable for most coding tasks. Third, it relies on the stability of consumer chat endpoints, which are not designed for high-throughput programmatic access. Users have reported rate limiting after 50-100 requests in a short period, and occasional 429 errors when the consumer service is under load.

| Metric | Direct Cursor API | Ungate (ChatGPT Plus) | Ungate (Claude Pro) |
|---|---|---|---|
| Cost per 1M tokens (input) | $15.00 (GPT-4o) | $0 (flat $20/mo) | $0 (flat $20/mo) |
| Average latency per request | 1.2s | 1.6s | 1.7s |
| Rate limit (requests/min) | 500 | 50-100 (soft) | 30-60 (soft) |
| Reliability (uptime) | 99.9% | 95-98% | 94-97% |
| TOS compliance | Yes | No | No |

Data Takeaway: Ungate offers massive cost savings for heavy users—potentially hundreds of dollars per month—but at the expense of reliability, latency, and legal risk. The trade-off is clearly acceptable to a vocal segment of developers.

Key Players & Case Studies

This revolt centers on three key players: Cursor (the AI coding assistant), OpenAI (ChatGPT), and Anthropic (Claude). Cursor, backed by a $60M Series A from a16z and others, has built a loyal following by integrating GPT-4 and Claude directly into a VS Code fork. Its pricing model is usage-based: $20/month for 500 fast requests, then $0.03 per additional request. Heavy users easily exceed $100-200/month. OpenAI and Anthropic offer consumer subscriptions at $20/month (ChatGPT Plus) and $20/month (Claude Pro), respectively, which provide unlimited usage of their flagship models within the chat interface, but explicitly prohibit commercial API proxying.

The case of "Alex Chen," a freelance developer who posted a viral Twitter thread about his $340 Cursor bill, crystallized the frustration. Chen claimed he was using Cursor for 6-8 hours daily, generating thousands of code completions and refactoring requests. His bill was typical for power users. The Ungate project emerged within days of that thread, created by a pseudonymous developer known as "0xdeafbeef." In the project's README, the author states: "This is not about stealing. This is about fairness. When a tool becomes essential infrastructure, its pricing should not punish the people who rely on it most."

| Company | Product | Consumer Price | API Price (GPT-4o/Claude 3.5) | Estimated Heavy User Monthly Cost |
|---|---|---|---|---|
| OpenAI | ChatGPT Plus | $20/mo | $15/1M input tokens | $200-400 (via API) |
| Anthropic | Claude Pro | $20/mo | $3/1M input tokens | $100-300 (via API) |
| Cursor | Cursor Pro | $20/mo + usage | N/A (bundled) | $100-400 |
| GitHub | Copilot | $10/mo | N/A (bundled) | $10 (flat) |

Data Takeaway: GitHub Copilot's flat $10/month pricing is the outlier and likely the model developers want. Cursor and the API providers are charging 10-40x more for heavy usage, creating the opening for a tool like Ungate.

Industry Impact & Market Dynamics

Ungate is more than a hack; it is a market signal that could reshape the AI developer tools landscape. The immediate impact is on Cursor's business model. If even 5-10% of its paying users adopt Ungate, Cursor loses that revenue while still bearing the infrastructure costs of serving those users (the proxy still hits Cursor's servers for non-AI features like indexing and search). Cursor could respond by: (a) aggressively patching the exploit, (b) introducing a flat-rate tier at $50-100/month, or (c) suing the Ungate developers for TOS violation. The most likely outcome is a combination of (a) and (b)—a technical fix followed by a pricing adjustment.

The broader implication is for OpenAI and Anthropic. Their consumer subscriptions are a loss leader for many users—the $20/month barely covers the compute cost for heavy chat users. If developers start using those subscriptions as cheap API proxies at scale, the providers will either have to cap usage more aggressively or raise consumer prices. This could create a backlash. A more constructive outcome would be the introduction of a "developer subscription" tier: $50-100/month for unlimited API access to a single model, with rate limits but no per-token billing. Both OpenAI and Anthropic have the engineering capability to offer this, but they have resisted because usage-based pricing maximizes revenue from high-volume users.

| Scenario | Probability | Impact on Developers | Impact on AI Companies |
|---|---|---|---|
| Cursor patches Ungate, keeps pricing | 40% | Negative (costs remain high) | Short-term positive |
| Cursor introduces flat-rate tier | 35% | Positive (predictable costs) | Neutral (revenue shift) |
| OpenAI/Anthropic launch dev subscriptions | 20% | Very positive | Positive (new revenue stream) |
| Widespread Ungate adoption, legal action | 5% | Negative (tool shut down) | Negative (PR backlash) |

Data Takeaway: The most likely near-term outcome is a cat-and-mouse game between Ungate and Cursor, but the long-term pressure will force pricing innovation. The market is speaking, and the message is clear: flat-rate pricing wins.

Risks, Limitations & Open Questions

Ungate is not a sustainable solution. It violates the terms of service of every platform involved—Cursor, OpenAI, and Anthropic. Users risk account suspension or permanent bans. The tool also poses security risks: it requires users to store session tokens locally, which could be stolen by malware. Moreover, the proxy introduces a single point of failure—if the local server crashes, Cursor stops working entirely. There are also ethical concerns. Developers using Ungate are effectively stealing compute resources from the AI providers, who set consumer subscription prices based on average usage patterns. Heavy API-style usage could degrade service quality for all subscribers.

Open questions remain: Will the AI companies respond with technical countermeasures (e.g., detecting proxy patterns, requiring API keys for all requests)? Will a legal precedent be set? Could a legitimate startup build a business around aggregating consumer subscriptions and reselling API access (essentially a legal version of Ungate)? The answer to the last question is likely no—the TOS explicitly forbid this—but the demand is clearly there.

AINews Verdict & Predictions

Ungate is a symptom, not a solution. It reveals a deep market failure: the current AI pricing model is optimized for enterprise customers with elastic budgets, not for individual developers who treat AI as a daily utility. The tool's popularity should be a wake-up call for Cursor, OpenAI, and Anthropic. Our prediction: within 12 months, at least one major AI coding assistant will offer a flat-rate tier at $50-100/month with reasonable usage caps (e.g., 10,000 requests/month). OpenAI or Anthropic will follow with a "developer pro" subscription within 18 months. Ungate itself will be patched out of Cursor within 60 days, but its legacy will be a permanent shift in how AI tools are priced. The genie is out of the bottle: developers have demonstrated that they will vote with their code, and the market will have to adapt.

What to watch next: Cursor's next pricing announcement, any changes to ChatGPT Plus's usage limits, and whether a legitimate flat-rate API service emerges from a startup or an incumbent.

More from Hacker News

Claude 無法賺取真實收入:AI 編碼代理實驗揭示殘酷真相In a controlled experiment, AINews tasked Claude with completing real paid programming bounties on Algora, a platform whClaude 記憶可視化工具:一款全新 macOS 應用程式揭開 AI 黑箱A new macOS-native application has emerged that can directly parse and display the memory files generated by Claude CodeAI 首次發現 M5 晶片漏洞:Claude Mythos 攻破 Apple 的記憶堡壘In a landmark event for both artificial intelligence and hardware security, researchers using Anthropic's Claude Mythos Open source hub3511 indexed articles from Hacker News

Related topics

AI developer tools154 related articlesopen source55 related articles

Archive

May 20261780 published articles

Further Reading

AI 代理 Marcus 重新定義開發者工具行銷策略Marcus 的出現標誌著一個關鍵轉變:AI 代理開始為創造它們的工具進行行銷。這個自主系統為領先的開發者平台處理內容策略與分發工作。TokenBBQ 開源工具揭露各模型隱藏的 AI 編碼成本一款名為 TokenBBQ 的新型開源工具,正揭開 AI 編碼成本的神秘面紗,讓開發者能即時追蹤 Claude、Codex 和 Gemini 的 token 使用量。AINews 探討為何這項透明度標誌著 AI 開發經濟學的轉折點。本地 AI 推論與 XGBoost 基準測試:缺失的標準終於到來一個新的開源基準測試專案正在改變開發者評估 AI 硬體的方式,專注於兩種最常見的真實工作負載:本地大型語言模型推論和 XGBoost 訓練。通過直接在 GPU 和 CPU 上測量效能,它填補了抽象基準長期留下的空白。AI_glue:開源審計閥門,可能重塑企業AI治理一款名為AI_glue的新型開源工具,為企業提供即插即用的方式,在基於OpenAI和Anthropic API構建的應用中新增審計與治理層。它作為中介軟體插入,無需任何程式碼修改即可實現即時日誌記錄、內容過濾和策略執行。

常见问题

这次模型发布“Ungate Hack Lets Developers Bypass API Costs: Is the AI Pricing Model Broken?”的核心内容是什么?

Ungate is an open-source local proxy that intercepts API calls from the popular AI coding assistant Cursor and redirects them to a user's personal ChatGPT Plus or Claude Pro subscr…

从“How to install Ungate for Cursor”看,这个模型发布为什么重要?

Ungate is a deceptively simple piece of software that punches well above its weight class. Written in Python and available on GitHub (repo: ungate-ai/ungate, currently 3,200+ stars), it functions as a man-in-the-middle p…

围绕“Ungate vs Cursor API costs comparison”,这次模型更新对开发者和企业有什么影响?

开发者通常会重点关注能力提升、API 兼容性、成本变化和新场景机会,企业则会更关心可替代性、接入门槛和商业化落地空间。