Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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

  1. Issue one scoped key per owner or approved service through the provider/secrets manager.
  2. Configure it through the approved UI/injection path; never commit it, paste it into rules, or share it between users.
  3. Set provider spending/rate controls, review usage, and rotate on schedule or suspected exposure.
  4. 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
Google 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

  1. Go to platform.openai.com/api-keys
  2. Create a new API key (project-scoped recommended)
  3. In Cursor: Cursor Settings > Models > check Use own API key
  4. Paste key in the OpenAI API Key field
  5. Select model from dropdown (e.g., gpt-4o)

Anthropic

  1. Go to console.anthropic.com/settings/keys
  2. Create a new API key
  3. In Cursor: Cursor Settings > Models > check Use own API key
  4. Paste key in the Anthropic API Key field
  5. Select Claude model from dropdown

Google (Gemini)

  1. Go to aistudio.google.com/apikey
  2. Create API key
  3. In Cursor: Cursor Settings > Models > check Use own API key
  4. Paste key in the Google API Key field

Azure OpenAI

Azure requires additional configuration beyond a simple API key:

  1. In Azure Portal: create an Azure OpenAI resource
  2. Deploy your desired model (e.g., gpt-4o)
  3. Note the Endpoint URL and API Key from the resource
  4. 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:

  1. Cursor Settings > Models > Add Model
  2. Model name: e.g., llama-3.1-70b
  3. Check Override OpenAI Base URL
  4. Enter base URL:
Ollama:        http://localhost:11434/v1
LM Studio:    http://localhost:1234/v1
Together AI:  https://api.together.xyz/v1
  1. Enter API key if required by the provider
  2. 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:

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

Полный SKILL.md на GitHub

Установить cursor-api-key-management в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Edit
Bash(cmd:*)

Вложенные файлы

references/configuration-methods.mdreferences/cost-management.mdreferences/errors.mdreferences/examples.mdreferences/implementation.mdreferences/security-best-practices.mdreferences/supported-providers.mdreferences/team-key-management.mdreferences/troubleshooting.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить cursor-api-key-management с