Cursor Bridge
Use a Cursor API key with OpenAI-compatible or Anthropic-compatible clients. Cursor Bridge exchanges it with Cursor and streams Agent output back.
Create a Cursor API key
Start in the Cursor dashboard. Create a user API key, then paste that same key into whichever client setup you use.
1. Open https://cursor.com/dashboard 2. Sign in to your Cursor account 3. Go to Settings / API Keys 4. Create a new API key 5. Use it as OPENAI_API_KEY or ANTHROPIC_API_KEY
OpenAI-compatible setup
OpenAI clients send the Cursor API key as Authorization: Bearer.
export OPENAI_BASE_URL=https://cursorbridge.dev/v1 export OPENAI_API_KEY=<cursor api key>
Anthropic-compatible setup
Anthropic API-key clients send the Cursor API key as x-api-key. Bearer is also accepted.
export ANTHROPIC_BASE_URL=https://cursorbridge.dev export ANTHROPIC_API_KEY=<cursor api key>
opencode provider
Use Cursor Bridge as an OpenAI-compatible provider. Keep model IDs as Cursor families; opencode reasoning selection maps to Cursor variants internally.
{
"provider": {
"cursor-bridge": {
"npm": "@ai-sdk/openai-compatible",
"name": "Cursor Bridge",
"options": {
"baseURL": "https://cursorbridge.dev/v1",
"apiKey": "<cursor api key>"
},
"models": {
"claude-opus-4-8": {}
}
}
}
}Claude Code
Point Claude Code at the Anthropic-compatible route.
ANTHROPIC_BASE_URL=https://cursorbridge.dev ANTHROPIC_API_KEY=<cursor api key> claude
Models endpoints
/v1/models is the standard model endpoint. Bearer/OpenAI clients receive OpenAI schema; x-api-key or Anthropic headers receive Anthropic schema. /models is only a debug catalog.
curl -H "Authorization: Bearer <cursor api key>" https://cursorbridge.dev/v1/models curl -H "x-api-key: <cursor api key>" -H "anthropic-version: 2023-06-01" https://cursorbridge.dev/v1/models curl -H "Authorization: Bearer <cursor api key>" https://cursorbridge.dev/v1/models/claude-opus-4-8
/v1/chat/completions, /v1/responses, /v1/messages, /models