How to Use Your Own OpenAI or Anthropic Key on a Mac
On this page
- Can I use my ChatGPT or Claude subscription instead?
- How do I get an OpenAI API key?
- How do I get an Anthropic (Claude) API key?
- What about OpenRouter or a local model?
- How do I add the key to a Mac app safely?
- How much does BYOK cost?
- Where does BYOK fall short?
- How Sunroom does it
- Which key should I choose?
- FAQ
Short answer: To use your own OpenAI or Anthropic API key in a Mac assistant, create a key in the provider's console (platform.openai.com/api-keys or platform.claude.com/settings/keys), add credit, set a spend limit, then paste the key into the app's AI settings. Your ChatGPT or Claude subscription is not an API key; the API is billed separately.
"Bring your own key" (BYOK) means an app sends AI requests to a provider using your developer account, not the app maker's. You pay the provider for what you use. You also pick the model, and you get API data terms rather than consumer ones.
It sounds technical, but it takes about five minutes. Here's the whole process, including how to keep the bill under control.
Can I use my ChatGPT or Claude subscription instead?
Not as a key. OpenAI says plainly that "ChatGPT and the API platform have separate billing systems". Anthropic says Claude paid plans and the Claude Console are separate products and the API is billed separately.
Some apps can connect a subscription in other ways. Raycast, for example, lists Bring Your Own Subscription for Claude or ChatGPT. That's an app feature, not an API key.
How do I get an OpenAI API key?
- Go to platform.openai.com/api-keys and sign in. Billing here is separate from any ChatGPT plan.
- Add a payment method and credit under billing.
- Create a new secret key and name it after the app (for example "Mac assistant").
- Copy the key straight away. OpenAI says the full key is only shown when you create it.
- Set a limit. OpenAI's spend limits guide explains how to add a monthly limit in Project settings › Limits, with an option to enforce a hard limit so requests stop at the cap.
How do I get an Anthropic (Claude) API key?
- Sign in to the Claude Console.
- Buy credits on the Billing page. Anthropic bills API use from prepaid credits; when the balance hits zero, requests stop until you add more.
- Open API keys and create a key, named after the app.
- Copy it into the app.
- Leave auto-reload off if you want the credit balance to act as your spending cap.
What about OpenRouter or a local model?
OpenRouter gives you "access to hundreds of AI models through a single API endpoint." One key from openrouter.ai/keys covers models from several providers, which is handy if you like to switch.
A local model needs no key at all. It runs on your Mac, so it's free per request and fully private, but smaller and slower than top cloud models. See private AI on a Mac for the trade-offs.
How do I add the key to a Mac app safely?
Paste it into the app's AI or model settings, then check three things:
- Where it's stored. Prefer apps that keep keys in your macOS Keychain, not in a plain settings file.
- What's sent. A key gives the app a pipe to the provider. Good apps send only what each request needs.
- One key per app. If you stop using an app, revoke its key in the provider's console without breaking anything else.
To see keys an app has saved, open Keychain Access (on macOS 26 it's no longer in Utilities; search for it with ⌘Space) and search for the app's name. Never paste a key into a chat or a shared document.
How much does BYOK cost?
You pay per token (roughly, per word) sent and received, at the provider's current rates. Short questions cost very little. Long documents, big mailboxes and agent tasks that loop cost more.
Three ways to stay in control:
- Set a hard monthly limit (OpenAI) or keep a small prepaid balance with auto-reload off (Anthropic).
- Choose a smaller model for routine jobs, and a larger one only when you need it.
- Check usage in the console after the first week, so you know your real monthly figure.
Where does BYOK fall short?
- Another account and bill. You manage credits, limits and keys yourself.
- Your data still leaves the Mac. API terms are stricter than consumer ones, but requests are processed on the provider's servers.
- Setup friction. For non-technical people in your family, "go make an API key" is a real hurdle.
How Sunroom does it
Sunroom's AI agent, Ray, gives you three choices. On macOS 26 with Apple Intelligence, Ray runs on Apple's on-device model, included in every plan. Or bring your own AI: an Anthropic, OpenAI or OpenRouter key, or a local model.
When you use your own cloud key, only what a request needs is sent, and you can keep file names private. Keys live in your Keychain. Your mail, files and calendars stay on your Mac.
If you already pay for Claude, there's another route: Claude subscribers can add Ray's Mac tools to the Claude desktop app and use them on their plan. Changes still wait for your OK. Sunroom runs on macOS 14 Sonoma or later, on Apple silicon, and is in private beta.
Which key should I choose?
As of November 2026, from each provider's own pages:
| OpenAI key | Anthropic key | OpenRouter key | Local model | |
|---|---|---|---|---|
| Where to create | platform.openai.com/api-keys | platform.claude.com/settings/keys | openrouter.ai/keys | No key |
| How you pay | API billing, separate from ChatGPT | Prepaid credits | OpenRouter account | Free per request |
| Spend control | Project hard limits | Prepaid balance | See OpenRouter | n/a |
| Trains on your data by default | No (API) | No (API) | Check OpenRouter's privacy settings | No, stays on your Mac |
| Leaves your Mac | Yes | Yes | Yes | No |
Before letting any assistant act on your files with a key, read how to automate your Mac with AI safely. To see which launchers and assistants accept keys, compare Raycast, Alfred and Ray. If your Mac supports it, Apple Intelligence on the Mac may mean you need no key at all. More in the AI on Mac hub.
FAQ
Can I use my ChatGPT Plus or Claude Pro subscription as an API key?
No. OpenAI says ChatGPT and the API platform have separate billing, and Anthropic says the Claude API is billed separately from paid Claude plans. You need a developer account and a key for each.
Where do I get an OpenAI API key?
Sign in at platform.openai.com/api-keys and create a new secret key. OpenAI shows the full key only once, so copy it straight into your app or a password manager.
Where do I get an Anthropic API key?
Sign in to the Claude Console at platform.claude.com, open Settings › API keys, and create a key. API usage is paid with prepaid credits you buy in the Console.
Is it safe to paste an API key into a Mac app?
It's reasonable if the app stores the key in your macOS Keychain and you set a spend limit or keep a small credit balance. Revoke the key from the provider's console if you stop using the app.
What is OpenRouter?
OpenRouter gives you one API key and one endpoint for hundreds of models from different providers. Create a key at openrouter.ai/keys.
Fix your Mac the way Apple didn't.
Sunroom adds better Files, Calendar, Mail and Music apps, a live Home screen and Ray, an AI agent that asks before it acts. Join the waitlist for the private beta.



