cursor-api-key-management
БесплатноБез исполняемых скриптовНе проверенConfigure BYOK API keys for OpenAI, Anthropic, Google, Azure, and custom models in Cursor. Triggers on "cursor api key", "cursor openai key", "cursor…
от jeremylongshore★ 2 961 звезда на GitHubОб этом скилле
Cursor API Key Management
Overview
Manage any Cursor BYOK/provider credentials as individual, least-privilege secrets with approved routing, ownership, rotation, spending limits, and exposure response.
Prerequisites
- An approved provider/model route, named key owner, secrets-manager integration, and budget policy.
- Confirmation that BYOK is permitted for the intended data classification and tenant configuration.
Instructions
- Issue one scoped key per owner or approved service through the provider/secrets manager.
- Configure it through the approved UI/injection path; never commit it, paste it into rules, or share it between users.
- Set provider spending/rate controls, review usage, and rotate on schedule or suspected exposure.
- Revoke first, then investigate, when a key is lost, leaked, or no longer required.
Output
- An attributable, scoped credential with rotation, budget, and revocation evidence.
Examples
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.
Supported Providers
| 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. |
Configuration Steps
OpenAI
- Go to platform.openai.com/api-keys
- Create a new API key (project-scoped recommended)
- In Cursor:
Cursor Settings>Models> checkUse own API key - Paste key in the OpenAI API Key field
- Select model from dropdown (e.g.,
gpt-4o)
Anthropic
- Go to console.anthropic.com/settings/keys
- Create a new API key
- In Cursor:
Cursor Settings>Models> checkUse own API key - Paste key in the Anthropic API Key field
- Select Claude model from dropdown
Google (Gemini)
- Go to aistudio.google.com/apikey
- Create API key
- In Cursor:
Cursor Settings>Models> checkUse own API key - Paste key in the Google API Key field
Azure OpenAI
Azure requires additional configuration beyond a simple API key:
- In Azure Portal: create an Azure OpenAI resource
- Deploy your desired model (e.g.,
gpt-4o) - Note the Endpoint URL and API Key from the resource
- In Cursor:
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
Custom OpenAI-Compatible Endpoints
For self-hosted models (Ollama, vLLM) or third-party providers:
Cursor Settings>Models>Add Model- Model name: e.g.,
llama-3.1-70b - Check
Override OpenAI Base URL - Enter base URL:
Ollama: http://localhost:11434/v1
LM Studio: http://localhost:1234/v1
Together AI: https://api.together.xyz/v1
- Enter API key if required by the provider
- The model appears in the Chat/Composer model dropdown
What BYOK Covers (and What It Does Not)
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.
Cost Management
Monitoring Usage
With BYOK, you pay the provider directly. Monitor costs at:
- OpenAI: platform.openai.com/usage
- Anthropic: console.anthropic.com/settings/billing
- Azure: Azure Cost Management portal
Setting Spending Limits
Set monthly spending limits at the provider level:
- OpenAI: Settings > Limits > Set monthly budget
- Anthropic: Settings > Limits > Set spending limit
- Azure: Create budget alerts in Azure Cost Management
Cost-Saving Strategies
Установить cursor-api-key-management в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBash(cmd:*)Вложенные файлы
FAQ
Что делает скилл cursor-api-key-management?
Configure BYOK API keys for OpenAI, Anthropic, Google, Azure, and custom models in Cursor. Triggers on "cursor api key", "cursor openai key", "cursor anthropic key", "own api key cursor", "BYOK cursor", "cursor azure key".
Как установить скилл cursor-api-key-management?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cursor-api-key-management запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic