LogoHypereal AI
모델Coding LLMLimitedAgent크레딧 요금문서Enterprise제휴 프로그램
시작하기
Hypereal AI
  • 모델
  • Coding LLM
  • 제품
  • GPU 클라우드
  • GPU 임대
  • 모델 학습
  • API 방식의 ComfyUI
  • 모델 배포
  • Hypereal SDK
  • Agent
  • 크레딧 요금
  • 문서
  • Enterprise
  • 제휴 프로그램
아티클 목록으로
AITutorialDeveloper Tools

How to Add Custom API Keys to Cursor: Complete Guide (2026)

Use your own OpenAI, Anthropic, and Google API keys in Cursor

Hypereal AI TeamHypereal AI Team
9 min read
2026년 2월 6일
100개 이상의 AI 모델, 하나의 API

Hypereal로 구축 시작하기

단일 API를 통해 Kling, Flux, Sora, Veo 등에 액세스하세요. 무료 크레딧으로 시작하고 수백만으로 확장하세요.

무료 API 키 받기문서 보기

신용카드 불필요 • 10만 명 이상의 개발자 • 엔터프라이즈 지원

How to Add Custom API Keys to Cursor: Complete Guide (2026)

⚠️ Note — GPT-5.5 BYOK is currently broken in Cursor. Cursor's BYOK validator is rejecting gpt-5.5 regardless of provider — confirmed in the Cursor forum thread. Until Cursor ships the fix, use gpt-5.4 (works perfectly) or any Claude / Gemini model in Cursor BYOK. gpt-5.5 itself still works fine in Codex CLI, OpenCode, or direct API calls — only Cursor BYOK is affected.

Cursor is one of the most popular AI-powered code editors, but its built-in AI usage comes with monthly limits. By adding your own API keys, you can bypass these limits, choose your preferred models, and control costs directly. This guide walks you through adding API keys from OpenAI, Anthropic, Google, and other providers to Cursor.

Why Add Custom API Keys?

There are several reasons to bring your own API keys to Cursor:

Benefit Default Cursor Custom API Keys
Monthly fast requests 50 (free) / 500 (Pro) Unlimited (pay per token)
Model selection Cursor's available models Any model from your provider
Cost control Fixed subscription Pay only for what you use
Rate limits Shared with all users Your own API rate limits
Privacy Cursor processes requests Direct to provider

If you already have API credits from OpenAI, Anthropic, or Google, using them in Cursor means you do not need a Cursor Pro subscription for AI features.

Step 1: Open Cursor Settings

There are two ways to access the API key settings in Cursor:

Method 1: Settings UI

  1. Open Cursor.
  2. Press Cmd + , (macOS) or Ctrl + , (Windows/Linux) to open Settings.
  3. Click on "Models" in the left sidebar.

Method 2: Command Palette

  1. Press Cmd + Shift + P (macOS) or Ctrl + Shift + P (Windows/Linux).
  2. Type "Cursor Settings" and select "Cursor: Open Cursor Settings."
  3. Navigate to the "Models" section.

You will see a list of AI providers with fields for API keys.

Step 2: Add an OpenAI API Key

Get your OpenAI API key

  1. Go to platform.openai.com/api-keys.
  2. Click "Create new secret key."
  3. Name it something like "Cursor IDE" for easy identification.
  4. Copy the key (it starts with sk-).

Add it to Cursor

  1. In Cursor Settings > Models, find the "OpenAI API Key" field.
  2. Paste your API key.
  3. Click "Verify" to test the connection.

Once added, you can use OpenAI models like GPT-4o, GPT-4o-mini, o4-mini, and o3 in Cursor's chat, inline edits, and agent mode.

Recommended OpenAI models for Cursor

Model Best For Cost (per 1M tokens)
gpt-4o General coding, complex tasks $2.50 in / $10 out
gpt-4o-mini Fast completions, simple tasks $0.15 in / $0.60 out
o4-mini Reasoning, debugging $1.10 in / $4.40 out
o3 Complex architecture decisions $2.00 in / $8.00 out

Step 3: Add an Anthropic API Key

Get your Anthropic API key

  1. Go to console.anthropic.com.
  2. Sign in or create an account.
  3. Navigate to "API Keys" and click "Create Key."
  4. Copy the key (it starts with sk-ant-).

Add it to Cursor

  1. In Cursor Settings > Models, find the "Anthropic API Key" field.
  2. Paste your API key.
  3. Click "Verify."

You now have access to Claude models directly through your own API key.

Recommended Anthropic models for Cursor

Model Best For Cost (per 1M tokens)
claude-sonnet-4-5-20250514 Best all-around coding $3.00 in / $15.00 out
claude-haiku-3-5-20241022 Fast completions, light tasks $0.80 in / $4.00 out
claude-opus-4-20250514 Complex reasoning, architecture $15.00 in / $75.00 out

For most coding tasks, Claude Sonnet 4.5 offers the best balance of quality and cost.

Step 4: Add a Google Gemini API Key

Get your Google AI API key

  1. Go to aistudio.google.com/apikey.
  2. Click "Create API Key."
  3. Select or create a Google Cloud project.
  4. Copy the generated key.

Google offers a generous free tier for Gemini models, making this a cost-effective option.

Add it to Cursor

  1. In Cursor Settings > Models, find the "Google AI API Key" field.
  2. Paste your API key.
  3. Click "Verify."

Recommended Google models for Cursor

Model Best For Cost (per 1M tokens)
gemini-2.0-flash Fast, cost-effective coding Free tier available
gemini-3-pro-preview Complex multi-file tasks $1.25 in / $10.00 out
gemini-2.5-flash Balanced speed and quality $0.15 in / $0.60 out

The Gemini 2.0 Flash free tier is particularly useful -- you get substantial free usage before paying anything.

Step 5: Add a Custom OpenAI-Compatible Endpoint

Cursor supports any API that follows the OpenAI API format. This lets you connect to:

  • Local models via Ollama
  • Together AI
  • Groq
  • Fireworks AI
  • OpenRouter
  • Any OpenAI-compatible server

Connect Ollama (local models)

First, install and run Ollama:

# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh

# Pull a coding model
ollama pull qwen2.5-coder:14b

# Ollama runs on localhost:11434 by default

Then in Cursor:

  1. Go to Settings > Models.
  2. Find "OpenAI API Base URL" or "Override OpenAI Base URL."
  3. Set the base URL to http://localhost:11434/v1.
  4. Set the API key to ollama (any non-empty string works).
  5. Add the model name qwen2.5-coder:14b to your model list.

Connect OpenRouter (access 100+ models)

OpenRouter lets you access hundreds of models through a single API key.

  1. Go to openrouter.ai and create an account.
  2. Generate an API key.
  3. In Cursor, set the OpenAI Base URL to https://openrouter.ai/api/v1.
  4. Paste your OpenRouter API key in the OpenAI API Key field.
  5. Use model identifiers like anthropic/claude-sonnet-4-5, google/gemini-3-pro-preview, etc.

Connect Groq (fast inference)

Groq offers extremely fast inference for open-source models.

  1. Go to console.groq.com and create an account.
  2. Generate an API key.
  3. In Cursor, set the OpenAI Base URL to https://api.groq.com/openai/v1.
  4. Paste your Groq API key.
  5. Use models like llama-3.3-70b-versatile or mixtral-8x7b-32768.

Step 6: Configure Model Preferences

After adding your API keys, you can configure which model Cursor uses for different tasks.

Set default models

In Cursor Settings > Models, you can assign models to specific features:

  • Chat: The model used for Cursor Chat (Cmd+L). Recommended: Claude Sonnet 4.5 or GPT-4o.
  • Inline Edit: The model used for inline code edits (Cmd+K). Recommended: Claude Sonnet 4.5 or GPT-4o.
  • Agent: The model used for agent mode. Recommended: Claude Sonnet 4.5.
  • Tab Completion: The model for autocomplete suggestions. Recommended: A fast model like GPT-4o-mini or Gemini Flash.

Example configuration for cost optimization

Use cheaper models for frequent, simple tasks and premium models for complex work:

Feature Model Why
Tab completion gpt-4o-mini Fast, cheap, high volume
Inline edits claude-sonnet-4-5 Good quality for targeted changes
Chat claude-sonnet-4-5 Best for discussions and planning
Agent mode claude-sonnet-4-5 Strong for multi-step tasks

Step 7: Verify Everything Works

Test each API key by running a simple task:

  1. Chat test: Press Cmd+L, select your custom model, and ask "Write a hello world function in Python."
  2. Inline edit test: Select a block of code, press Cmd+K, and ask "Add error handling to this function."
  3. Agent test: Start agent mode and ask "Create a new file called test.py with a function that calculates factorial."

If any test fails, check:

  • The API key is entered correctly (no extra spaces).
  • Your API account has credits or an active payment method.
  • The base URL is correct (especially for custom endpoints).
  • The model name matches the provider's naming convention.

Troubleshooting Common Issues

Issue Cause Fix
"Invalid API key" Wrong key or expired Regenerate the key from the provider
"Model not found" Wrong model name Check the provider's docs for exact model IDs
"Rate limit exceeded" Too many requests Wait and retry, or upgrade your API tier
"Connection refused" (Ollama) Ollama not running Start Ollama with ollama serve
Slow responses Server location Choose a provider with servers near you
"Insufficient credits" No balance Add funds to your API account

Frequently Asked Questions

Do I still need Cursor Pro if I add my own API keys? No. With your own API keys, you can use AI features without a Cursor Pro subscription. However, some Cursor-specific features like advanced tab completions may still require Pro.

Which API key is the most cost-effective? Google Gemini offers the most generous free tier. For paid usage, GPT-4o-mini and Gemini Flash are the cheapest quality options.

Can I use multiple API keys at the same time? Yes. You can add keys from multiple providers and switch between models as needed. Cursor will use the appropriate key based on which model you select.

Are my API keys stored securely? Cursor stores API keys locally on your machine. They are not uploaded to Cursor's servers when you use your own keys -- requests go directly to the provider.

Does using custom API keys affect Cursor's built-in limits? Yes. When you use your own API key, those requests do not count against Cursor's free or Pro request limits. You are billed directly by the API provider.

Wrapping Up

Adding custom API keys to Cursor gives you full control over your AI coding experience. You can choose models based on task complexity, manage costs precisely, and avoid hitting Cursor's built-in limits. The setup takes less than five minutes per provider.

If you are building applications that need AI-generated media alongside your code, try Hypereal AI free -- 35 credits, no credit card required. The API integrates seamlessly into projects you build in Cursor or any other editor.

관련 아티클

GLM-4.7 API 사용 방법: 개발자 가이드 (2026)

12 min read

2026년 ChatGPT 제한을 우회하는 방법 (정상적인 방법)

9 min read

2026년 Claude Code 사용 한도를 우회하는 방법

8 min read

On this page

  • How to Add Custom API Keys to Cursor: Complete Guide (2026)
  • Why Add Custom API Keys?
  • Step 1: Open Cursor Settings
  • Step 2: Add an OpenAI API Key
  • Get your OpenAI API key
  • Add it to Cursor
  • Recommended OpenAI models for Cursor
  • Step 3: Add an Anthropic API Key
  • Get your Anthropic API key
  • Add it to Cursor
  • Recommended Anthropic models for Cursor
  • Step 4: Add a Google Gemini API Key
  • Get your Google AI API key
  • Add it to Cursor
  • Recommended Google models for Cursor
  • Step 5: Add a Custom OpenAI-Compatible Endpoint
  • Connect Ollama (local models)
  • Connect OpenRouter (access 100+ models)
  • Connect Groq (fast inference)
  • Step 6: Configure Model Preferences
  • Set default models
  • Example configuration for cost optimization
  • Step 7: Verify Everything Works
  • Troubleshooting Common Issues
  • Frequently Asked Questions
  • Wrapping Up
Desktop agent

Download Hypereal Agent

Run a local AI media workspace for image generation, video prompts, model selection, credit tracking, and saved artifacts.

MacWindows
v0.1.1Requires a hypereal.cloud API keyRelease manifest
Hypereal Agent desktop app screenshot

지금 바로 개발을 시작하세요

지금 개발 시작
Logo
Hypereal AI호기심을 탐험하세요
TwitterGitHubLinkedInYouTubeEmail
인프라
  • GPU 임대
  • 모델 학습
  • API 방식의 ComfyUI
  • 모델 배포
  • 공개 카탈로그
  • 인프라 문서
  • GPU 로그
  • 요금
LLM API
  • Hypereal SDK
  • Coding Credits
  • All LLM Models
  • Claude Opus 4.7
  • Claude Sonnet 4.6
  • GPT-5.5
  • Claude Haiku 4.5
  • GPT-5.5 Pro
  • GPT-5.3 Codex
  • Gemini 3.1 Pro Preview
  • Gemini 3.5 Thinking
  • Gemini 3.5 Fast
  • DeepSeek V4 Pro
  • Kimi K2.6
  • GLM-5.1
AI API
  • AI API Overview
  • Seedance 2.0 API
  • Kling 3.0 API
  • Veo 3.1 API
  • FLUX API
  • GPT Image 2 API
  • vs WaveSpeed
  • vs fal.ai
  • vs Replicate
  • vs KIE.ai
비디오 모델
  • Google Veo 3.1 API
  • Kling 3.0 API
  • Kling O3 Pro API
  • Seedance 2.0 API
  • HappyHorse 1.0 API
  • WAN 2.7 API
  • WAN Video API
  • Grok Video API
  • Hunyuan Video API
  • PixVerse V6 API
  • Pika Video API
  • Luma Dream Machine API
  • MiniMax Video API
  • Vidu Video API
이미지 모델
  • NanoBanana 2 API
  • FLUX 2 API
  • GPT Image 1 API
  • Grok Image API
  • SeeDream V5 API
  • Imagen 4 API
  • Ideogram API
  • Recraft API
  • DALL-E 3 API
  • Stable Diffusion API
  • Gemini Image API
도구
  • Face Swap API
  • Video Face Swap API
  • Virtual Try-On API
  • Image Upscaler API
  • Video Upscaler API
  • AI Talking Avatar API
  • Lip Sync API
  • OmniHuman Avatar API
  • Tripo3D H3.1 API
  • ElevenLabs TTS API
  • Fish Audio TTS API
  • Whisper STT API
  • Lyria Music API
생성기
  • Hypereal Agent
  • AI 이미지 생성기
  • AI 비디오 생성기
  • AI 아바타 생성기
  • AI 오디오 생성기
  • AI 3D 생성기
  • AI 도구
  • 이미지 업스케일러
  • 비디오 업스케일러
컬렉션
  • 최고 비디오 모델
  • 최고 이미지 모델
  • Seedance 2.0
  • WAN 2.7
  • Qwen Image 2
  • Grok AI
  • Seedance 1.5
  • 모션 컨트롤
  • 콘텐츠 감지
  • 객체 감지
회사
  • 소개
  • 문서
  • Hypereal SDK
  • Cookbook
  • 블로그
  • 변경 로그
  • 연락처
  • 자주 묻는 질문
  • 팁 & 튜토리얼
  • 로드맵
  • 엔터프라이즈
  • 제휴 프로그램
  • Platform
  • 개발자 프로그램
법률
  • 개인정보처리방침
  • 이용약관
  • 환불 정책
  • 쿠키 정책
  • 가격
  • 모든 모델
  • 사이트맵
  • Status
모든 시스템 정상
•캘리포니아에서 사랑을 담아 ❤️
© 저작권 2026. 모든 권리 보유.