Mel – the agentic terminal
The AI terminal for teams.
Guides · AI coding agents
How to use your own API key in an AI terminal, and test it
Updated
Add your key in the terminal's settings, run one small task, and check two places: your provider's usage page, where the request should appear, and the tool's own usage or credits page, where it should not. Then check what happens when the tool's included usage runs out, and whether your team plan lets you use your own key at all.
Adding a key is the easy part. What matters is how the tool uses it. A tool can keep spending its own hosted credits while your key is set, stop using your key once its included usage is gone, or let a team admin turn own keys off. A few minutes of testing tells you which, before a long agent run does.
Steps
- Create a key for this tool only. In your provider's console, create a new API key and name it after the tool and the machine, for example "terminal-laptop". A key used by one tool alone makes its usage easy to read and easy to revoke. Set a budget alert at the provider too.
- Add the key in the tool's settings. Paste it into the screen the tool provides for provider keys, not into a file in your project. If the tool can check the key when you save it, let it: a wrong or empty key is easier to fix now than mid-task.
- Note both balances. Write down what your provider's usage page shows, and what the tool shows for its own included usage or credits.
- Run one small task. Ask a short question or a one-file change. Then look again: the provider's usage page should show the new request, and the tool's credits or usage page should not have moved. If it did, the tool spent its own hosted usage on that turn, not your key.
- Check which model answered. If the tool picks models for you, make sure the answer came from a provider you hold a key for. A tool that falls back to its own models when yours fail may bill you for that turn.
- Test what happens when included usage runs out. Read the tool's docs or pricing page for what your key does once the plan's included usage is used up. Your key should keep working: you are paying the provider, not the tool. If the docs do not say, ask support before you rely on it.
- On a team plan, ask who controls own keys. Some team plans let an admin turn own keys off, or allow them only for some providers or company sizes. Check the plan page, and ask your admin before you set a key on a work machine.
- Keep the key safe. Revoke it at once if it appears in a commit, a screenshot or a chat, and rotate it when a laptop is lost or someone leaves. See how to use your own API key with an AI coding tool for the basics.
What to write down
| Check | What you want to see |
|---|---|
| The request appears at the provider | Yes, after one small task |
| The tool's credits move | No, on a turn that used your key |
| The model that answered | One from a provider you hold a key for |
| Your key when included usage runs out | Still works |
| Own keys on your team plan | Allowed for the providers you need |
Doing it with Mel
Mel is free with your own API key. You pay your provider for the usage, and a turn on your key uses no Mel credits.
- Download Mel for Mac, Windows or Linux and sign in with a free Mel account. The terminal works without an account; Mel's AI agent needs one.
- Click your avatar in the top-right, choose Settings, open AI and scroll to Provider API keys.
- Paste your key into its provider's row and click Save. Mel checks the key with the provider when you save it and tells you whether it was verified.
- Press ctrl+enter (cmd+enter on macOS) and give the agent one small task.
- Look at the line under the answer. A turn on your key reads 0 credits · your key. Then check your provider's usage page for the request.
What Mel does with a saved key:
- Your key, and only your key. While a key is saved, Mel's agent runs on the keys you saved and does not fall back to Mel's hosted models. On Auto, it chooses among the models of the providers you hold keys for.
- No credits are needed. A turn on your own key spends no Mel credits, so it keeps working with a credit balance of zero, on every plan, Free included.
- On a Business team, a member can use their own key, and the turn spends none of the team's shared credits. Business work goes only to US model providers, and own keys follow the same rule. Mel has no setting for an admin to turn own keys off.
Signing out of Mel removes the keys saved on that machine, so you paste them again after you sign back in.
FAQ
How do I know my own key is being used? Run one small task, then check your provider's usage page for the request and the tool's credits page for no change. In Mel, the line under the answer reads "0 credits · your key".
Will my key keep working when the plan's included usage runs out? It should, because the provider bills you, not the tool. Check the tool's docs before you rely on it. In Mel it does: a turn on your own key needs no Mel credits.
Can a tool spend its own credits while my key is set? Some can, for example by falling back to hosted models when your key fails. In Mel, while a key is saved, the agent runs only on the keys you saved.
Can a team admin turn off own keys? On some team plans, yes. Check the plan page and ask your admin. Mel has no admin setting that turns own keys off; on Business, own keys work with the same US model providers as the rest of the team's work.
Do I still pay Mel if I use my own key? No. Mel is free with your own API key. Your provider charges you for usage.
- How to use your own API key with an AI coding tool
- How to compare two AI models on the same coding task
- What is a BYOK AI terminal?
- What is an AI terminal for teams?
Facts checked on Oct 27, 2026.
Mel – the agentic terminal · openmel.dev. A multi-agent, multi-model AI terminal for Mac, Windows, Linux and VS Code. Free with your own API key.