/cursor-pack:cursor-api-key-managementfrom cursor-pack
Manages Bring Your Own Key (BYOK) credentials for AI model providers in Cursor, including OpenAI, Anthropic, Google, Azure, and AWS Bedrock. Handles key creation, rotation, budget controls, and exposure response.
Ships in cursor-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Manage any Cursor BYOK/provider credentials as individual, least-privilege secrets with approved routing, ownership, rotation, spending limits, and exposure response.
Create a personal provider key in the approved secret manager, configure it only in the local secure setting, verify a low-cost non-sensitive request, and confirm usage attribution. If it appears in logs, chat, or git, revoke it immediately and replace it; do not attempt to redact history before revocation.
Configure Bring Your Own Key (BYOK) for AI model providers in Cursor. BYOK lets you use your own API keys to bypass Cursor's monthly quota, pay per token directly, and access models not included in Cursor's subscription.
| Provider | Key Format | Models Available |
|---|---|---|
| OpenAI | sk-proj-... or sk-... | GPT-4o, GPT-4o-mini, o1, o3, GPT-5 |
| Anthropic | sk-ant-api03-... | Claude Sonnet, Claude Opus, Claude Haiku |
AIzaSy... | Gemini 2.5 Pro, Gemini Flash | |
| Azure OpenAI | Azure portal key | Any deployed Azure OpenAI model |
| AWS Bedrock | IAM credentials | Claude, Titan, Llama models |
| OpenAI-compatible | Varies | Ollama, LM Studio, Together AI, etc. |
Cursor Settings > Models > check Use own API keygpt-4o)Cursor Settings > Models > check Use own API keyCursor Settings > Models > check Use own API keyAzure requires additional configuration beyond a simple API key:
gpt-4o)Cursor Settings > Models:Azure Configuration:
API Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Endpoint: https://your-instance.openai.azure.com
Deployment: your-gpt4o-deployment-name
API Version: 2024-10-21
For self-hosted models (Ollama, vLLM) or third-party providers:
Cursor Settings > Models > Add Modelllama-3.1-70bOverride OpenAI Base URLOllama: http://localhost:11434/v1
LM Studio: http://localhost:1234/v1
Together AI: https://api.together.xyz/v1
BYOK key used: Cursor model (always):
┌──────────────────────┐ ┌──────────────────────┐
│ Chat (Cmd+L) │ │ Tab Completion │
│ Composer (Cmd+I) │ │ Apply from Chat │
│ Agent Mode │ │ (diff application) │
│ Inline Edit (Cmd+K) │ │ │
└──────────────────────┘ └──────────────────────┘
Tab Completion and Apply always use Cursor's proprietary models. You cannot route these through your own API key.
With BYOK, you pay the provider directly. Monitor costs at:
Set monthly spending limits at the provider level:
@Files not @Codebase when you know the location| Model | Input (per 1M tokens) | Output (per 1M tokens) |
|---|---|---|
| GPT-4o | $2.50 | $10.00 |
| GPT-4o-mini | $0.15 | $0.60 |
| Claude Sonnet | $3.00 | $15.00 |
| Claude Opus | $15.00 | $75.00 |
| o1 | $15.00 | $60.00 |
A typical Composer session generating multi-file code uses 5K-20K tokens.
Cursor stores API keys locally in its settings database:
~/Library/Application Support/Cursor/~/.config/Cursor/%APPDATA%\Cursor\Keys are stored in the local Cursor configuration, not in project files. They do not sync between machines.
Cursor Settings > ModelsFor teams using BYOK:
| Error | Cause | Fix |
|---|---|---|
401 Unauthorized | Invalid or expired API key | Regenerate key at provider |
429 Rate Limited | Too many requests | Wait, or upgrade provider plan |
403 Forbidden | Key lacks model access | Enable model access at provider |
| Model not appearing | Key not saved or wrong provider | Re-enter key in Cursor Settings |
| Azure connection refused | Wrong endpoint or API version | Verify endpoint URL and version |
| Slow responses with BYOK | Provider rate limits apply | Check provider dashboard |
references/configuration-methods.md (opens in a new tab)references/cost-management.md (opens in a new tab)references/errors.md (opens in a new tab)references/examples.md (opens in a new tab)references/implementation.md (opens in a new tab)references/security-best-practices.md (opens in a new tab)references/supported-providers.md (opens in a new tab)references/team-key-management.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin cursor-pack30 skills in this plugin
/cursor-advanced-composerAdvanced Cursor Composer techniques: agent mode, parallel agents, complex refactoring, and multi-step
orchestration. Triggers on "advanced composer", "composer patterns", "multi-file generation",
"composer refactoring", "agent mode", "parallel agents".
/cursor-ai-chatMaster Cursor AI Chat with @-mentions, inline edit, and conversation patterns. Triggers on "cursor chat",
"cursor ai chat", "ask cursor", "cursor conversation", "chat with cursor", "Cmd+L", "inline edit".
/cursor-codebase-indexingSet up and optimize Cursor codebase indexing for semantic code search and @Codebase queries.
Triggers on "cursor index", "codebase indexing", "index codebase", "cursor semantic search",
"@codebase", "cursor embeddings".
Other plugins' skills for the same job