Flat subscriptions are simple, but they tie you to one vendor’s models and limits. Bringing your own API key flips that: you pay the model provider directly, per token, and can switch models whenever you like. Here’s who supports it and how.
Fully bring-your-own-key
Cline is the most flexible. It’s open source (Apache 2.0) and works with Anthropic, OpenAI, Gemini, OpenRouter, Amazon Bedrock, Google Vertex and local models through Ollama or LM Studio. Using it with your own key costs nothing beyond your provider’s bill; ClinePass ($9.99 a month) is an optional bundle of open-weight models if you’d rather not manage keys.
Zed’s Personal plan is free forever with your own keys for Anthropic, OpenAI, Google, Bedrock, Ollama, OpenRouter and more. Zed can also host external agents such as Claude Agent and Codex CLI inside the editor.
Use subscriptions you already pay for
Amp lets you use tokens from your existing ChatGPT, Claude and other subscriptions, so you aren’t paying twice. Its Hobby plan is free; you pay only for Amp-hosted sandbox minutes if you use them.
Devin’s pricing page lists “use your ChatGPT plan” on its Pro and Max tiers.
Official agents with an API-key mode
Codex supports signing in with an OpenAI API key, billed at API rates. That works in the CLI, SDK and IDE extension, but cloud features such as GitHub code review and Slack need a ChatGPT plan. Plus and Pro users who hit their limits can also keep working locally with an API key.
Claude Code can switch to pay-as-you-go API credits through an Anthropic Console account instead of drawing from a Claude plan, which suits heavy sessions that would otherwise hit plan limits.
Gemini CLI now mainly serves paid Gemini API and Vertex AI key holders (plus Gemini Code Assist licences), since consumer sign-in moved to Antigravity CLI in June 2026.
When your own key makes sense
- Light or irregular use: paying per token beats a $20+ subscription you barely touch.
- Model freedom: try Claude, GPT, Gemini or open-weight models in one tool without new subscriptions.
- Local or private models: Cline with Ollama or LM Studio keeps everything on your machine.
When a flat plan wins
- Heavy daily use: plans like Claude Max, Claude Ultra and ChatGPT Pro bundle far more usage than the same money buys at API rates.
- Cloud features: Codex cloud tasks, GitHub review and Slack integrations need a ChatGPT plan, not just a key.
Frequently asked questions
Which AI coding tools are free with your own API key?
Cline is open source and free to use with your own key from almost any provider, including local models through Ollama or LM Studio. Zed's Personal plan is free with your own keys. Amp's Hobby plan lets you use tokens from subscriptions you already pay for.
Can I use Codex with an API key instead of ChatGPT?
Yes. Codex supports API-key sign-in billed at OpenAI API rates, but only in the CLI, SDK and IDE extension; cloud features such as GitHub code review and Slack need a ChatGPT plan.
Can I use Claude Code without a subscription?
Anthropic's pricing page says you can switch Claude Code to pay-as-you-go API credits through a Console account, which bills at API rates instead of drawing from a Claude plan.
Is bringing your own key cheaper than a subscription?
For light or bursty use, often yes, because you only pay for tokens you use. For heavy daily use, flat plans such as Claude Max or ChatGPT Pro usually work out cheaper than paying API rates for the same work.