detachbox
PagesAdd API keys

Add API keys

Run Claude Code, Codex or OpenCode on your own API key from any of seven providers, billed by the provider. Paste the key once on Subscriptions & keys, and every launch on it starts with the right address and model.

Which agent takes which key

ProviderClaude CodeCodexOpenCode
AnthropicYesYes
OpenAIYesYes
xAIYesYes
DeepSeekYesYesYes
Z.aiYesYesYes
abliteration.aiYesYesYes
GeminiYes

Add a key

  1. Open Subscriptions & keys and pick Add an API key, or Add key under a provider.
  2. Pick the Provider and paste the key.
  3. Give it a Name if you hold two keys of one provider, such as Work and Personal.
  4. Pick Check and save.

detachbox checks the key with the provider before it saves it. A refused key never gets saved, and the dialog says so. Once saved, the dashboard shows only the key's last 4 characters.

You can also add a key while you launch: Add a key… in the Runs on list of a launch or of New terminal opens the same dialog and picks the new key right away.

Run an agent on a key

Pick the key under Runs on in a launch or in New terminal. The Model field is optional. Leave it empty to use the model shown there, the best fit for that agent and provider. Your choice of key and model is saved in the project launch.

The key is stored in the project's launch settings, readable by the agent that uses it and by no other project. Change the key or the model of a saved launch any time: terminals you open from then on use the new choice, and running ones keep what they started with.

Watch a key's balance

For providers that report it, the key's row shows the money left, with left, top it up soon when it runs low. The same balance shows in the account menu over a terminal and in the header chips. A provider that does not report balances says so on the row.

If the provider starts refusing a key, its row shows the error. Launches on it stop until you replace the key.

Rename, replace or remove a key

Open the ⋯ menu on the key's row:

  • Make default: launches on Always my default for that provider use this key.
  • Rename: change the name that tells two keys apart.
  • Replace key: paste the new key and pick Check and replace. Launches on the old key move to the new one. The old key stays valid at the provider until you revoke it there.
  • Remove key: launches on it move to your default access for that provider; with none, they stop until you pick another. The key stays valid at the provider until you revoke it there.

Rotate keys of one provider

With two or more keys from one provider, a launch can move to the next key when one hits its limit or runs out of balance. Rotation shows how to turn it on.