cursor-api docs
Run a local Windows daemon that exposes Cursor Composer through OpenAI-compatible and Anthropic-compatible API shapes for agent clients.
The daemon binds to loopback, keeps your Cursor key encrypted under AppData, and translates common agent client requests through the bundled Cursor SDK bridge.
Quick reference
Availablehttp://127.0.0.1:6903/v1cursor-localcomposer-2.5composer-2.5-fastClient settings
Use these values in agent clients that support a custom local API endpoint.
http://127.0.0.1:6903/v1cursor-localcomposer-2.5composer-2.5-fast127.0.0.16903Quick start
Install the release bundle, store your Cursor key, then start the local daemon.
irm https://cursor-api-windows.mynameistito.com/install.ps1 | iexcursor-api key setcursor-api startcursor-api healthcursor-api urlAgent setup
Each setup below includes the fields to save, the order to configure them, and the checks to run when a client hides connection errors.
cursor-local as the API key and choose either Composer model in the client settings.OpenCode
Use the bundled configurator. It writes the local OpenAI-compatible provider into OpenCode so future sessions can select the Composer model directly.
Required settings
OpenAI-compatible local providerhttp://127.0.0.1:6903/v1cursor-localcomposer-2.5, composer-2.5-fastSetup steps
- 1Start the daemon
cursor-api start - 2Write OpenCode config
cursor-api configure agent opencode - 3Check the endpoint
cursor-api health - 4Use the model
Select composer-2.5-fast for quick edits or composer-2.5 for deeper runs.
Codex
Configure Codex as a custom OpenAI-compatible provider when your Codex client exposes provider, base URL, API key, and model fields.
Required settings
OpenAI compatiblehttp://127.0.0.1:6903/v1cursor-localcomposer-2.5-fastSetup steps
- 1Open provider settings
Create or edit a custom OpenAI-compatible provider.
- 2Set the base URL
http://127.0.0.1:6903/v1 - 3Set the key
cursor-local
- 4Set the model
composer-2.5-fast
- 5Validate
Send a short prompt after cursor-api health returns healthy.
Pi
Point Pi at the localhost OpenAI-compatible endpoint and keep the fast Composer model as the default for interactive coding sessions.
Required settings
Custom OpenAI-compatiblehttp://127.0.0.1:6903/v1cursor-localcomposer-2.5-fastSetup steps
- 1Open model settings
Choose the custom provider or OpenAI-compatible option.
- 2Paste endpoint
http://127.0.0.1:6903/v1 - 3Paste key
cursor-local
- 4Choose model
composer-2.5-fast
- 5Troubleshoot
Run cursor-api logs -f while sending a Pi request.
Kilo Code
Create a Kilo Code provider profile that routes OpenAI-compatible chat requests through the local daemon.
Required settings
OpenAI compatiblehttp://127.0.0.1:6903/v1cursor-localcomposer-2.5-fastcomposer-2.5Setup steps
- 1Create provider
Add a custom OpenAI-compatible provider in Kilo Code.
- 2Configure endpoint
http://127.0.0.1:6903/v1 - 3Configure key
cursor-local
- 4Add models
composer-2.5-fast and composer-2.5
- 5Confirm
Run cursor-api status before starting an agent task.
Aider
Save Aider defaults so each run uses the local daemon without repeating base URL and model flags.
Required settings
http://127.0.0.1:6903/v1cursor-localcomposer-2.5-fastcomposer-2.5Setup steps
- 1Start daemon
cursor-api start - 2Set base URL
http://127.0.0.1:6903/v1 - 3Set API key
cursor-local
- 4Set default model
composer-2.5-fast
- 5Verify
Ask Aider for a small repository summary.
VS Code
Use these values in any VS Code extension that lets you define a custom OpenAI-compatible endpoint.
Required settings
OpenAI compatiblehttp://127.0.0.1:6903/v1cursor-localcomposer-2.5-fastSetup steps
- 1Open extension settings
Find provider, model, or API settings.
- 2Choose custom provider
Select OpenAI-compatible if available.
- 3Save endpoint
http://127.0.0.1:6903/v1 - 4Save key
cursor-local
- 5Test request
Use the extension while cursor-api logs -f is running.
Request examples
The server accepts common agent request shapes and translates them through the same Composer path.
OpenAI-compatible
Use the same shape most OpenAI-compatible agents already emit. Set stream when your client expects server-sent events.
POST http://127.0.0.1:6903/v1/chat/completions
Authorization: Bearer cursor-local
Content-Type: application/json
{
"model": "composer-2.5-fast",
"messages": [
{ "role": "user", "content": "Inspect this repo and suggest a fix." }
],
"stream": true
}Anthropic-compatible
The local server also accepts the Anthropic Messages shape for Claude Code-style clients and translates it through the same Composer path.
POST http://127.0.0.1:6903/v1/messages
x-api-key: cursor-local
anthropic-version: 2023-06-01
Content-Type: application/json
{
"model": "composer-2.5",
"max_tokens": 1200,
"messages": [
{ "role": "user", "content": "Plan the next edit." }
]
}API surface
The daemon binds to loopback and exposes only the local /v1 surface.
/v1/modelsList composer-2.5 and composer-2.5-fast./v1/chat/completionsOpenAI chat completions./v1/responsesOpenAI Responses API shape./v1/messagesAnthropic Messages shape for Claude Code-style clients./v1/messages/count_tokensAnthropic token counting shape.Model choice
Use composer-2.5 when an agent needs a more thorough planning or editing pass.
Use composer-2.5-fast when you want quicker turn-taking for iterative agent work.
Runtime lifecycle
The release bundle keeps the Bun-compiled CLI and Node bridge separate.
%LOCALAPPDATA%\Programs\cursor-api\cursor-api.exe plus a bundled bridge directoryBackground daemon with PID state under AppDataNode runtime for local @cursor/sdk callsStop daemon, replace release files, preserve AppData configTroubleshooting
Use these checks before changing client configuration or reinstalling.
Run cursor-api key status, then cursor-api key set if needed.Run cursor-api status and confirm the client uses /v1 in the base URL.Use cursor-api port set <port>, then restart the daemon.Run cursor-api logs -f while reproducing the client request.Re-run cursor-api configure agent opencode after changing the port.Command reference
The CLI command surface is grouped by daemon control, configuration, and operations.
cursor-api startcursor-api stopcursor-api restartcursor-api statuscursor-api logs -fWhere data lives
User configuration lives under AppData and is preserved across release updates.
%LOCALAPPDATA%\Programs\cursor-api\%APPDATA%\cursor-api\settings.json%APPDATA%\cursor-api\api-key.enc%APPDATA%\cursor-api\run\%APPDATA%\cursor-api\logs\Credits and scope
cursor-api-windows is independent and builds on prior MIT work.
standardagents/composer-api
OpenAI-compatible translation, Cursor API adapters, the local bridge, and the sidecar server design.
API for Cursor Windows port
Two-process architecture, bridge runtime constraints, agent config shapes, and local defaults.
@cursor/sdk
Official Cursor SDK used by the bundled Node bridge to drive Composer agents.
Cursor Composer models
Model names and capabilities are provided by Cursor. This project is independent.