AI coding tools that support BYOK (bring your own key)

Updated · 8 min read

Most AI coding tools now accept your own API key, but how much of the tool runs on it differs. Cline, Kilo Code, Zed, OpenCode and Aider (all open source), Factory Droid on its Free plan and Junie CLI run every AI request on your key, with no paid plan. Claude Code (Anthropic key), OpenAI Codex (OpenAI key), GitHub Copilot (VS Code, Copilot CLI, the Copilot app), Warp, JetBrains AI Assistant and Raycast (Pro only) take a key instead of, or next to, a subscription. Cursor uses your key for chat models only. Google Antigravity says on its plans page that it has no BYOK, Kiro's docs list only its built-in models, and Windsurf, renamed Devin Desktop in June 2026, no longer documents it. We checked each tool's own docs on 2026-11-24.

BYOK support at a glance

Tool Own key Providers Plan needed On BYOKList
Claude Code Yes, Claude models only Anthropic API key, Amazon Bedrock, Google Cloud Agent Platform, Microsoft Foundry, LLM gateways No: a Console API key replaces the subscription Guide
OpenAI Codex (CLI, IDE extension, app) Yes OpenAI API key; in the CLI, other Responses API providers such as OpenRouter, Azure, Ollama, LM Studio, Bedrock No; cloud features need ChatGPT sign-in Guide
GitHub Copilot Yes, chat and agents VS Code: Anthropic, Azure, Gemini, OpenAI and others, custom endpoints; CLI: OpenAI-compatible, Azure, Anthropic, Ollama No Copilot plan; org-wide keys need Business or Enterprise Listing, guide
Cursor Partial: chat models, not Tab OpenAI, Anthropic, Google, Azure OpenAI, AWS Bedrock Not stated; Teams and Enterprise pay a $0.25 per million token rate Listing, guide
Warp Yes, for local agent runs Anthropic, OpenAI, Google; OpenAI-compatible endpoints (OpenRouter, LiteLLM) Free plan, for individuals and companies with 10 or fewer employees Not listed
JetBrains AI Assistant Yes, not code completion Anthropic, Google (Gemini API, Vertex AI), OpenAI, OpenAI-compatible, Ollama, LM Studio No; a JetBrains AI subscription fills in features your models don't cover Listing
Junie CLI (JetBrains) Yes OpenAI, Anthropic, Google, xAI, OpenRouter, GitHub Copilot, custom providers No JetBrains AI subscription Not listed
Factory Droid Yes, in the CLI and desktop app Anthropic, OpenAI, Chat Completions providers (OpenRouter, Fireworks, Groq, DeepInfra, Gemini and others), Bedrock, Ollama, LM Studio No: the Free plan is bring-your-own-inference Not listed
Raycast Yes Anthropic, Google, OpenAI, OpenRouter Raycast Pro Listing
Cline Yes Anthropic, OpenAI, Gemini, Bedrock, OpenRouter, DeepSeek, OpenAI-compatible, Ollama, LM Studio and 30+ more No, open source Listing
Kilo Code Yes Through Kilo Gateway: Anthropic, Bedrock, Google AI Studio, OpenAI, Mistral, DeepSeek and others; or a provider connected in the extension No paid plan in its BYOK docs; open source Listing
Zed Yes Anthropic, OpenAI, Google AI, Mistral, DeepSeek, xAI, OpenRouter, Bedrock, Ollama, LM Studio, compatible endpoints No, open source Listing
OpenCode Yes Providers from the models.dev catalog, Azure, Bedrock, Vertex, Ollama, gateways No, open source Listing
Aider Yes OpenAI, Anthropic, Gemini, Groq, xAI, Azure, DeepSeek, OpenRouter, Ollama, LM Studio, OpenAI-compatible No, open source Listing
Google Antigravity No (app, IDE, CLI) Google's models under your Google AI plan; the SDK takes a Gemini API key n/a Not listed
Kiro Not documented Kiro's built-in models only n/a Not listed
Windsurf (Devin Desktop) Not documented now Anthropic key for Claude 4 models in a May 2025 release n/a Not listed

Claude Code BYOK

Claude Code runs on a Claude subscription or on a Claude Console account billed per token. To use your own key, set ANTHROPIC_API_KEY and approve it when Claude Code asks, or run /login and choose the Console account. It can also run on Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry, billed by the cloud provider, or behind an LLM gateway. Anthropic doesn't support routing Claude Code to non-Claude models through any gateway. Setup, prices and the credential order are in our Claude Code API key guide.

Codex BYOK

OpenAI's Codex CLI, IDE extension and Codex in the ChatGPT desktop app accept an OpenAI API key: printenv OPENAI_API_KEY | codex login --with-api-key. OpenAI then bills at standard API rates instead of your ChatGPT plan's credits, and Codex cloud features need ChatGPT sign-in. The CLI also takes other providers in ~/.codex/config.toml if they speak the Responses API, and codex --oss runs Ollama or LM Studio. See the Codex API key guide.

GitHub Copilot and VS Code BYOK

In VS Code, open the chat model picker, select Manage Language Models, then Add Models, and enter a provider's key or a custom endpoint. In Copilot CLI, add providers to ~/.copilot/providers.json; the GitHub Copilot app has Settings → Model providers. None of these need a Copilot plan, and GitHub says BYOK requests carry no Copilot usage charges. Inline suggestions still come from GitHub. Details, including organization-wide keys, are in GitHub Copilot BYOK.

Cursor BYOK

Add OpenAI, Anthropic, Google, Azure OpenAI or AWS Bedrock keys in Cursor Settings → Models. Your key covers chat models; Tab completion keeps using Cursor's models, and every request still passes through Cursor's servers. On individual plans, own-key requests don't draw on included usage; Teams and Enterprise plans pay the Cursor Token Rate of $0.25 per million tokens on eligible models. See Cursor BYOK.

Warp BYOK

Open Settings, search for API keys, and add Anthropic, OpenAI or Google keys. Models that will use your key get a key icon in the model picker; pick one of those, because Warp's Auto models always use Warp's own inference. A custom inference endpoint connects any OpenAI-compatible service, such as OpenRouter or LiteLLM. Keys stay in your device's secure storage, but prompts and the key pass through Warp's servers. Personal keys work for local agent runs, not cloud agents, and codebase context still uses Warp's inference. If your key fails, Warp stops the request; Warp credit fallback, off by default, retries it on Warp's credits. Personal BYOK is on the Free plan for individuals and companies with 10 or fewer employees; larger companies need Business or Enterprise.

JetBrains AI Assistant and Junie BYOK

In JetBrains IDEs, go to Settings → Tools → AI Assistant → Providers & API keys, pick Anthropic, Google, OpenAI or an OpenAI-compatible endpoint, paste the key and click Test Connection. Ollama and LM Studio connect the same way with a local URL. Anthropic, Google and OpenAI models are assigned to features automatically; endpoint and local models work only in AI Chat until you assign them. Code completion and next edit suggestions keep using JetBrains models unless you set a separate completion provider. Agents can't use local models.

Junie CLI, JetBrains' terminal agent, needs no JetBrains AI subscription with your own key. Run /account in a session, or choose Use your own API key on the welcome screen, then pick OpenAI, Anthropic, Google, xAI, OpenRouter or GitHub Copilot and paste the key. If a model is available both on your key and on a JetBrains subscription, Junie uses your key.

Factory Droid BYOK

In the Droid CLI, run /settings and open Custom models, or run /model and choose Manage custom models; the desktop app has Settings → Custom Models. Both write to customModels in ~/.factory/settings.json, where "apiKey": "${PROVIDER_API_KEY}" reads the key from an environment variable. Provider types are anthropic, openai (Responses API), generic-chat-completion-api for OpenRouter, Fireworks, Groq, Ollama and most others, and bedrock-converse. Keys stay on your machine, and custom models don't appear in Factory's web or mobile apps. On Factory's Free plan you bring your own keys or sign in with ChatGPT, GitHub Copilot or OpenRouter.

Google Antigravity BYOK

Google Antigravity doesn't support BYOK. Its plans page lists "bring-your-own-key (BYOK) or bring-your-own-endpoint" among the options it doesn't offer, and your quota comes from your Google AI plan (Free, Plus, Pro or Ultra). The separate Antigravity SDK for Python reads GEMINI_API_KEY, can run on Gemini Enterprise on Google Cloud, or can run agents on local models through Ollama, LM Studio or vLLM.

Raycast BYOK

Raycast Pro subscribers add one key each for Anthropic, Google, OpenAI and OpenRouter under Settings → AI → Models & Providers. Conversations then run on your provider credits instead of Raycast AI limits. Anthropic, Google and OpenAI requests go through Raycast's servers; OpenRouter requests go straight to OpenRouter, and an OpenRouter key opens its full model list. A few server-side tools, such as image generation, still use Raycast AI credits.

Kiro BYOK

Kiro's docs don't describe a way to use your own model provider. Its models page lists the models Kiro offers, from Anthropic, OpenAI and others, and the "API keys" in its docs are Kiro's own keys for running the Kiro CLI in scripts and CI, not provider keys. If you want an agent on your own AWS account, Claude Code, Cline and Factory Droid all run on Amazon Bedrock.

Windsurf BYOK

Windsurf became Devin Desktop on June 2, 2026, with the same plans and pricing. Windsurf 1.9.2 (May 2025) let Free and Pro users bring an Anthropic key for the Claude 4 Sonnet and Opus models in Cascade, entered on windsurf.com. The current Devin Desktop model pages don't mention BYOK.

What your key usually doesn't cover

  • Cursor Tab, Copilot's inline suggestions and JetBrains' code completion keep using the vendor's models.
  • Warp's Auto models and codebase context use Warp's inference.
  • Warp's cloud agents and Codex cloud don't take personal keys.
  • Cursor, Warp and Raycast (for Anthropic, Google and OpenAI) send your requests through their servers, so their privacy terms apply alongside your provider's.

If you want one key for many models, most of these tools accept an OpenRouter key or an OpenRouter base URL; see OpenRouter BYOK for adding your own provider keys behind it. To skip providers altogether, Cline, Zed, OpenCode, Aider, Droid and JetBrains AI Assistant also run local models.

Coding tools with BYOK in our directory

  • GitHub Copilot

    Free + from $10/month · VS Code, JetBrains, CLI

    Visit

    GitHub's AI coding assistant; users can add their own model provider keys in Copilot CLI, the Copilot app and VS Code, and enterprises can add Anthropic, OpenAI, xAI, Gemini or Bedrock keys for their teams.

    Works with:AnthropicOpenAIxAIGoogle Gemini+1 more

  • Cursor

    Free plan + paid plans · macOS, Windows, Linux

    Visit

    AI code editor built on VS Code. Add your own OpenAI, Anthropic, Google, Azure or Bedrock key for chat and agent models.

    Works with:OpenAIAnthropicGoogle GeminiAzure OpenAI+1 more

  • JetBrains AI Assistant

    Works with your own key; JetBrains AI plans optional · JetBrains

    Visit

    AI chat, code generation and completion inside JetBrains IDEs. Connect your own Anthropic, OpenAI or Gemini key, or local models.

    Works with:AnthropicOpenAIGoogle GeminiGoogle Vertex AI+2 more

  • Raycast

    BYOK requires Raycast Pro · macOS, iOS

    Visit

    Mac launcher with built-in AI. Pro users can bring their own Anthropic, Google, OpenAI or OpenRouter key.

    Works with:AnthropicGoogle GeminiOpenAIOpenRouter

  • Cline

    Free, open source · VS Code, JetBrains, CLI · Open source

    Visit

    Open-source AI coding agent for VS Code, JetBrains and the terminal. Bring your own key, endpoint or local model.

    Works with:AnthropicOpenAIGoogle GeminiOllama+1 more

  • Kilo Code

    Free to start, no markup on model usage · VS Code, JetBrains, CLI · Open source

    Visit

    Open-source AI coding agent for VS Code, JetBrains and the CLI. Use 500+ models at zero markup or bring your own keys.

    Works with:AnthropicOpenAIGoogle GeminiOpenRouter+8 more

  • Zed

    Free editor; paid plans for Zed-hosted AI · macOS, Windows, Linux · Open source

    Visit

    Fast open-source code editor with an AI agent that works with your own Anthropic, OpenAI, Gemini, OpenRouter or local model keys.

    Works with:AnthropicOpenAIGoogle GeminiMistral+5 more

  • OpenCode

    Free, open source · CLI, Web · Open source

    Visit

    Open-source AI coding agent for the terminal, desktop and web that works with any model provider or local models.

    Works with:OpenAIAnthropicxAI

Questions

Which AI coding tools support bring your own key?

On 2026-11-24: Claude Code, OpenAI Codex, GitHub Copilot, Cursor (chat only), Warp, JetBrains AI Assistant, Junie CLI, Factory Droid, Raycast, Cline, Kilo Code, Zed, OpenCode and Aider. Google Antigravity says it doesn't support BYOK, Kiro's docs list only its built-in models, and Windsurf's current docs (now Devin Desktop) don't mention it.

Which coding tools are free with my own key?

Cline, Kilo Code, Zed, OpenCode and Aider are free and open source. Factory Droid's Free plan and Warp's Free plan accept your own keys, Junie CLI needs no JetBrains AI subscription, and GitHub Copilot's BYOK works without a Copilot plan. Raycast needs Pro.

Does Claude Code support BYOK?

Yes, with Anthropic's models. Set ANTHROPIC_API_KEY or sign in with a Claude Console account instead of a Pro or Max plan, or run it on Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry. Anthropic doesn't support routing Claude Code to non-Claude models.

Does Windsurf support BYOK?

Not in its current docs. Windsurf's May 2025 release (1.9.2) let Free and Pro users add an Anthropic key for Claude 4 models. Windsurf became Devin Desktop on June 2, 2026, and its current model pages don't mention BYOK.

Does Google Antigravity support BYOK?

No. Its plans page says there is no support for bring-your-own-key or bring-your-own-endpoint. The separate Antigravity SDK for Python runs on a Gemini API key, Gemini Enterprise on Google Cloud, or local models through Ollama, LM Studio or vLLM.

Does BYOK cover code completion?

Usually not. Cursor's Tab completion, Copilot's inline suggestions and JetBrains AI Assistant's code completion keep using the vendor's own models. Open-source agents and Zed use your key for their AI features.

Sources

Checked against the providers' own documentation on 2026-11-24. Prices and limits change; the links below have the current figures.

Related guides