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.
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
/v1/responses/v1/chat/completions/v1/messages/v1/messages/count_tokens/v1/models/v1/models/{model}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.
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.