Skip to main content

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.

ProviderKey nameGet a key
anthropicANTHROPIC_API_KEYconsole.anthropic.com
openaiOPENAI_API_KEYplatform.openai.com
googleGOOGLE_API_KEYaistudio.google.com
minimaxMINIMAX_API_KEYplatform.minimax.io
zaiZAI_API_KEYdocs.z.ai
deepseekDEEPSEEK_API_KEYplatform.deepseek.com
kimiMOONSHOT_API_KEYplatform.kimi.ai
xaiXAI_API_KEYconsole.x.ai
qwenQWEN_API_KEYbailian.console.aliyun.com
metaMETA_API_KEYdev.meta.ai
dataexpertDATAEXPERT_API_KEYPartner 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​

CommandWhat it does
/byoakOpen 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 provider
  • t turn the key on or off
  • d delete the key
  • r refresh
  • i open these docs
  • Esc close

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 BYOAK while 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 /byoak dialog 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 /model as 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.

ProvidersYour endpoint must serveBase URLExample
anthropic, minimaxAnthropic Messages API — POST <base>/v1/messageshost root, no /v1https://gateway.example.com/anthropic
openai, deepseek, xai, metaOpenAI Responses API — POST <base>/responsesends in /v1https://gateway.example.com/v1
zai, kimi, qwenOpenAI Chat Completions — POST <base>/chat/completionsends in /v1http://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:// or https:// and include a host.
  • http:// to localhost or a private address is accepted as is. For any other host AdaL saves the URL but warns you: plain http:// 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