Skip to content

Claude (API key)

Choose this to run agents on an Anthropic API key instead of a subscription login: the usage is billed to that key. It suits agents you share with other people, and it lets you keep several keys on one machine, one per team or budget, each with its own monthly cap in US dollars. Have a key from the Anthropic Console ready; it starts with sk-ant- and stays on the machine. The agents are still Claude Code, running on your machine.

Agents run Claude Code with an Anthropic API key, billed to that key. Add one key per team or budget.

  • An engine for agents: an agent on this machine can run on it.

Claude Code runs on your machine, in the folders you chose, with your Anthropic API key. The model itself runs at Anthropic. The key is kept on your machine only.

Anthropic bills the key you add.

You can add the module from the machine’s page in the app. To do it by hand, run these on the machine.

The steps are the same on macOS, Linux and Windows.

  1. Check Claude Code

    Terminal window
    monoclaw doctor

    The host brings its own copy of Claude Code; doctor says if anything is missing.

  2. Add Claude (API key)

    Terminal window
    monoclaw modules add claude-api
  3. Add a key

    Terminal window
    monoclaw modules connect claude-api --name "Claude (API key) key"

    Paste the key when asked (it isn’t shown). It’s kept on this machine only. Add more keys the same way, one per budget or team.

    Get a key at Anthropic Console → API keys.

  4. Set a monthly limit (optional)

    Terminal window
    monoclaw modules cap <connection id> --usd 20

    The connection id (pac_…) is in monoclaw modules list. The machine stops using the key when the limit is reached.

  5. Check it

    Terminal window
    monoclaw modules list

    It says Ready when it can be used; the machine’s page in the app shows the same.

You choose these for each agent.

Model. Default: Claude Code’s default.

  • Claude Code’s default: Whatever Claude Code picks for this account
  • Opus: The most capable; slower and costs more
  • Sonnet: Fast and capable; a good everyday choice
  • Haiku: The fastest and cheapest, for simple work

Permissions. Default: Auto.

  • Auto: A safety check approves each action and asks you only when unsure
  • Ask: Asks before every change or command
  • Accept edits: Edits files without asking; asks before commands
  • Plan: Plans only; changes nothing

Each connection can have a monthly cap, in US dollars. The machine counts what the connection used in the calendar month (UTC) and refuses work that would go over the cap.

Terminal window
monoclaw modules cap <connection id> --usd <n>
monoclaw modules cap <connection id> --off

The connection id is shown by monoclaw modules list.

You can add more than one key, for example one for each team or budget. Each has its own cap.