Bring Your Own API Key (BYOAK)
Use your own provider API keys instead of AdaL credits. It is set per provider: your key for one provider, AdaL credits for the rest.
Quick start
/byoak add anthropic sk-ant-your-key
That's it. Anthropic models now call Anthropic directly with your key, starting with your next message. No restart.
Supported providers
Type the provider name as shown in the first column.
| Provider | Key name | Get a key |
|---|---|---|
anthropic | ANTHROPIC_API_KEY | console.anthropic.com |
openai | OPENAI_API_KEY | platform.openai.com |
google | GOOGLE_API_KEY | aistudio.google.com |
minimax | MINIMAX_API_KEY | platform.minimax.io |
zai | ZAI_API_KEY | docs.z.ai |
deepseek | DEEPSEEK_API_KEY | platform.deepseek.com |
kimi | MOONSHOT_API_KEY | platform.kimi.ai |
xai | XAI_API_KEY | console.x.ai |
qwen | QWEN_API_KEY | bailian.console.aliyun.com |
meta | META_API_KEY | dev.meta.ai |
dataexpert | DATAEXPERT_API_KEY | Partner proxy for Anthropic models, if you hold a DataExpert.io key |
dataexpert is a partner key, so the /byoak dialog lists only the 10 providers until you add it. Once added, it appears as the first row.
Commands
| Command | What it does |
|---|---|
/byoak | Open the key dialog |
/byoak add <provider> <key> | Save a key. It is enabled right away. |
/byoak add <provider> <key> <base-url> | Save a key and send that provider's requests to your own endpoint (see Custom endpoint) |
/byoak add <provider> | Open the dialog for that provider |
Saving a provider again replaces its key and its endpoint.
In the dialog:
↑↓select a providertturn the key on or offddelete the keyrrefreshiopen these docsEscclose
How it works
When a provider's key is on:
- AdaL calls that provider directly with your key. Requests do not pass through AdaL.
- No AdaL credits are used for that provider. The footer shows
BYOAKwhile the active model runs on your key. - The key covers every model of that provider, including the helper models AdaL runs on the side (compaction, summaries) when they use that provider.
When the key is off or missing:
- Requests go through AdaL and use your credits.
Changes apply live: adding, turning off, or deleting a key rebuilds the connection for the model you are using. Image, video, and voice generation always run on AdaL credits — they use AdaL's own provider accounts, not your key.
Custom endpoint
Send a provider's requests to your own URL — an LLM gateway, a proxy, or a server that speaks the same API — by adding the URL after the key:
/byoak add anthropic sk-ant-your-key https://gateway.example.com/anthropic
/byoak add qwen your-key http://localhost:8000/v1
- Requests for that provider go straight to your URL, with your key. They do not pass through AdaL.
- The URL takes effect right away for the current model. No restart.
- The
/byoakdialog shows the URL next to the key (sk-ant...gAA @ https://gateway.example.com/anthropic), so you can always see where requests go. - The model list does not change. Pick models with
/modelas usual; your endpoint must serve the model id AdaL sends. That is the case for pass-through gateways and proxies. For a server that hosts its own models under other names, this feature is not enough yet. - Turning the key off (
t) stops using the endpoint too. To go back to the provider's own host, add the key again without a URL.
Which API your endpoint must serve
AdaL talks to each provider in that provider's own API shape. Your endpoint must accept the same shape, at the same path under the base URL you give.
| Providers | Your endpoint must serve | Base URL | Example |
|---|---|---|---|
anthropic, minimax | Anthropic Messages API — POST <base>/v1/messages | host root, no /v1 | https://gateway.example.com/anthropic |
openai, deepseek, xai, meta | OpenAI Responses API — POST <base>/responses | ends in /v1 | https://gateway.example.com/v1 |
zai, kimi, qwen | OpenAI Chat Completions — POST <base>/chat/completions | ends in /v1 | http://localhost:8000/v1 |
A local server that only implements Chat Completions (most self-hosted
runtimes) works for zai, kimi, and qwen keys. It does not work for the
openai key, which needs the Responses API.
google does not support a custom endpoint yet. dataexpert already has a
fixed endpoint; give the URL on the anthropic key instead.
Rules
- The URL must start with
http://orhttps://and include a host. http://tolocalhostor a private address is accepted as is. For any other host AdaL saves the URL but warns you: plainhttp://sends your key unencrypted.- A wrong URL fails on your next message with the provider's own error, and the connection error tip reminds you to check the URL with
/byoak.
Example: a LiteLLM proxy
With LiteLLM running locally in Anthropic pass-through mode on port 4000, AdaL holds only the LiteLLM key:
/byoak add anthropic sk-your-litellm-key http://127.0.0.1:4000/anthropic
Every Anthropic request then goes to http://127.0.0.1:4000/anthropic/v1/messages,
and LiteLLM forwards it with the Anthropic key it holds.
Security
- Keys, and any endpoint URL, are stored on your machine in
~/.adal/settings.json. - A key is used only for requests to its provider — or to your endpoint when you set one. It is not logged.
- The dialog shows keys masked (
sk-ant...gAA).
Related: Models · Slash Commands · Keyboard Shortcuts