Quickstart
- Create a key in Cursor Dashboard > API Keys.
- Choose a client below.
- Set its base URL to
https://cursorbridge.devand use your Cursor key for authentication.
- OpenAI base URL
- https://cursorbridge.dev/v1
- Anthropic base URL
- https://cursorbridge.dev
- Authentication
- Authorization: Bearer <key> or x-api-key: <key>
Cursor Bridge is unofficial community software. Use your own account and respect its plan limits.
Claude Code
Set the Anthropic base URL and authentication token for one command:
ANTHROPIC_BASE_URL=https://cursorbridge.dev \ ANTHROPIC_AUTH_TOKEN=<your Cursor API key> \ claude
Use ANTHROPIC_MODEL when you want a specific model; omit it to use Cursor's default selection.
opencode
Add an OpenAI-compatible provider to opencode.json:
{
"provider": {
"cursor-bridge": {
"npm": "@ai-sdk/openai-compatible",
"name": "Cursor Bridge",
"options": {
"baseURL": "https://cursorbridge.dev/v1",
"apiKey": "<your Cursor API key>"
},
"models": { "default": { "name": "Cursor Default" } }
}
}
}Codex CLI
OPENAI_BASE_URL=https://cursorbridge.dev/v1 \ OPENAI_API_KEY=<your Cursor API key> \ codex
The same OpenAI-compatible settings work with Cline and Kilo Code.
SDK configuration
OpenAI
client = OpenAI(
base_url="https://cursorbridge.dev/v1",
api_key="<your Cursor API key>",
)Anthropic
client = Anthropic(
base_url="https://cursorbridge.dev",
api_key="<your Cursor API key>",
)Endpoints
Every endpoint authenticates with your Cursor API key.
| Method | Path | Format |
|---|---|---|
| POST | /v1/responses | OpenAI Responses |
| POST | /v1/chat/completions | OpenAI Chat Completions |
| POST | /v1/messages | Anthropic Messages |
| POST | /v1/messages/count_tokens | Anthropic token counting |
| GET | /v1/models | Model list with metadata |
| GET | /v1/models/{model} | One model with metadata |
Model metadata
Authenticated model responses include context_window, max_output_tokens, reasoning, and model-specific reasoning_options. Effort values are derived from Cursor's usable model variants for the authenticated account; unsupported values are rejected rather than silently substituted.
curl -H "Authorization: Bearer <your Cursor API key>" \ https://cursorbridge.dev/v1/models/claude-fable-5
For Cursor-owned virtual models, release_date is the first date the model ID was observed in Cursor Bridge's live catalog. Limits are the values enforced and advertised by Cursor Bridge, not a promise that every Cursor plan exposes every model.
Web chat
Open /chat and sign in with a Cursor API key to chat with your Cursor models in the browser.
- After sign-in the browser keeps only an HttpOnly session cookie. The key is stored encrypted on the server for that session.
- Chats are saved on this server and continue across devices for the same Cursor account.
- Generation runs on the server. If you close the tab it keeps running and the reply is saved; reopen the chat to see it.
- Sessions last 30 days and are extended while you use them. Sign out to end a session.
The server operator can review stored chats. Do not paste anything you would not share with the operator.
Compatibility
- Streaming and non-streaming responses
- Client tool calls and tool-result continuation
- Text and image inputs
- Reasoning and cache-aware token usage
- Structured JSON output and output limits
- OpenAI Responses, Chat Completions, and Anthropic Messages formats
Troubleshooting
Authentication errors
Confirm that the client sends your Cursor API key as a bearer token or supported API-key header.
Model unavailable
Use default to let Cursor select an eligible model, or query /v1/models with your key.
Tool continuation
Return tool results with the exact call identifier supplied by the assistant response.