/install cursor2api
cursor2api
cursor2api bridges Cursor IDE's AI models with OpenClaw/Claude Code by converting Cursor's internal API into standard Anthropic/OpenAI formats.
Architecture:
OpenClaw / Claude Code
↓ (ANTHROPIC_BASE_URL)
cursor2api Docker/Node (:3010)
↓ (Session Token)
Cursor Official API
Prerequisites
- Docker (for containerized deployment) or Node.js 18+ (for local)
- A Cursor account with active AI subscription
WorkosCursorSessionTokenfrom Cursor
Quick Start
# 1. Get your WorkosCursorSessionToken (see references/token.md)
# 2. Start the service
docker run -d \
--name cursor-api \
-p 3010:3000 \
-e WORKOS_CURSOR_SESSION_TOKEN=your_token \
waitkafuka/cursor-api:latest
# 3. Configure OpenClaw
export ANTHROPIC_BASE_URL="http://localhost:3010/v1"
export ANTHROPIC_API_KEY="your_token"
export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-4-6"
# 4. Restart OpenClaw
openclaw gateway restart
Core Operations
| Operation | Command |
|---|---|
| Install | docker run -d --name cursor-api -p 3010:3000 -e WORKOS_CURSOR_SESSION_TOKEN=token waitkafuka/cursor-api:latest |
| Status | docker ps | grep cursor-api |
| Refresh Token | See references/token.md |
| Uninstall | docker stop cursor-api && docker rm cursor-api |
API Endpoints
| Endpoint | Format | Compatible With |
|---|---|---|
http://localhost:3010/v1/messages |
Anthropic Messages API | OpenClaw, Claude Code |
http://localhost:3010/v1/chat/completions |
OpenAI Chat Completions | CC Switch, Universal |
Documentation
| Document | Description |
|---|---|
| Installation Guide | Docker deployment, verification, troubleshooting |
| Token Management | Obtaining and refreshing WorkosCursorSessionToken |
| Configuration | OpenClaw, Claude Code, CC Switch setup |
| Quick Reference | One-page cheat sheet |
⚠️ Important Notes
- ToS Risk: Using third-party proxies may violate Cursor's Terms of Service
- Token Expiry: Session tokens expire periodically; monitor and refresh as needed
- API Stability: Cursor's internal API may change without notice
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install cursor2api - After installation, invoke the skill by name or use
/cursor2api - Provide required inputs per the skill's parameter spec and get structured output
What is Cursor2api Skill Clawhub?
Manage and deploy cursor2api to convert Cursor IDE AI conversations into Anthropic/OpenAI API formats, including token refresh and uninstallation. It is an AI Agent Skill for Claude Code / OpenClaw, with 133 downloads so far.
How do I install Cursor2api Skill Clawhub?
Run "/install cursor2api" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Cursor2api Skill Clawhub free?
Yes, Cursor2api Skill Clawhub is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Cursor2api Skill Clawhub support?
Cursor2api Skill Clawhub is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Cursor2api Skill Clawhub?
It is built and maintained by Jialin (@0xcjl); the current version is v1.0.2.