Cursor2api — Development skill for Claude Code
Use your Cursor subscription as an OpenAI-compatible API.
How to install Cursor2api
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open AstroQore/cursor2api and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Cursor2api does
Use your Cursor subscription as an OpenAI-compatible API. Direct agent.v1 protocol — real tool_calls, streaming, multi-account. No cursor-agent CLI subprocess.
Alternatives in Development
- Dario — A local OpenAI- and Anthropic-compatible proxy that brings your Claude Pro/Max subscription to Cursor, Cline 485 ★
- Notebook Intelligence — A JupyterLab extension supporting Claude Code, Copilot, Ollama, and OpenAI-compatible LLMs, with MCP, skills 331 ★
- Claude Code API — OpenAI-compatible API gateway for Claude Code CLI 300 ★
README
cursor2api
**Use your Cursor subscription as an OpenAI-compatible API.**
[](LICENSE) [](https://github.com/AstroQore/cursor2api/pkgs/container/cursor2api)
[中文文档](README.zh-CN.md)
**Two other projects share this name.** Both wrap the *free* chatbot on Cursor's website — [7836246/cursor2api](https://github.com/7836246/cursor2api) and [gopkg-dev/cursor2api](https://github.com/gopkg-dev/cursor2api). This one is different: it uses **your own paid subscription** through Cursor's agent backend. See [comparison](#how-this-differs-from-the-free-chatbot-wrappers).
It talks to Cursor's own `agent.v1.AgentService` backend directly — Connect-RPC over HTTP/2 with protobuf — and exposes it as `/v1/chat/completions`. No `cursor-agent` CLI subprocess, no headless browser, no scraping.
your app ──► /v1/chat/completions ──► cursor2api ──► api2.cursor.sh
(OpenAI shape) (protocol bridge) (your subscription)
| Streaming (SSE) | ✅ |
Real tool_calls with decoded arguments |
✅ |
| Multi-turn agent loops (tool results replayed) | ✅ |
| Caller controls the tool set — Cursor's native tools hidden | ✅ |
| 200+ models, fetched live from your account | ✅ |
| Multi-account pool, round-robin | ✅ |
| Automatic token refresh | ✅ |
Client-supplied system prompt |
⚠️ best effort — see below |
Quick start
Docker Compose (recommended)
git clone https://github.com/AstroQore/cursor2api.git
cd cursor2api
mkdir -p data
# 1. sign in — prints a URL, open it in any browser and approve
docker compose run --rm cursor2api node scripts/login.mjs --out /data/accounts.json
# 2. start
docker compose up -d
# 3. use it
curl http://127.0.0.1:8790/v1/chat/completions \
-H 'content-type: application/json' \
-d '{"model":"cursor-claude-sonnet-5-thinking-high","messages":[
Related Skills
Nanopi
Tiny Rust port of Pi — a ~4 MB statically-linked coding agent CLI for old/low-resource Linux boxes. OpenAI + A
Deepseek Web Bridge
Local OpenAI-compatible API bridge for an authenticated DeepSeek web session, with a native macOS manager and
Claude Codex Nebius Proxy
A Claude Code + Codex CLI → Nebius bridge. Accepts Claude /v1/messages and Codex /v1/responses requests, conve
Commandcode Go Opencode
Unofficial bridge that lets a Command Code Go subscription talk to any OpenAI- or Anthropic-compatible client
Cc Copilot Bridge
Multi-provider routing for Claude Code CLI. Use your Copilot subscription, Ollama offline, or Anthropic Direct
Codex Headless
Programmatically drive the real OpenAI Codex CLI in a PTY — structured events, live rollout-stream token strea
Related Agents
Openrouter Agent
Runs a model from any of ~60 vendors through OpenRouter's OpenAI-compatible endpoint, billed per token against
Model Runner
Deterministic wrapper that runs a prompt on a non-Claude model (OpenAI via Codex, Cursor's composer/grok/glm,
Fable5 Apfel Engineer
Heavy-lifting Fable-5 engineer for the apfel project (Apple on-device FoundationModels CLI + OpenAI-compatible