Skip to main content

Anthropic Integration

Connect Anthropic to give Claude Code agents an API key when they run on a cloud computer. Every cloud run that uses Claude Code is billed to this connection's Claude Console account. On your laptop, Claude Code uses your own sign-in instead; Autoheal never stores a Claude sign-in.

What it is used for​

UseDescription
Claude Code agentsAn agent with a claude: section runs Claude Code on a cloud computer with this key
Coding agent checksProject settings → Coding agents → Check runs Claude Code once to confirm the key works

The connection belongs to a project. A Claude Code run uses the connection of the project it runs in.

Prerequisites​

  • Computers turned on for your organization
  • A Claude Console API key
  • For an organization-wide key, the ID of the workspace to bill

Setup​

  1. Create an API key
    1. Sign in to the Claude Console
    2. Go to API keys and click Create key
    3. Create it in the workspace you want to bill, and copy the key (sk-ant-...)
  2. Add Integration in Autoheal
    1. Go to Integrations in the project whose agents use Claude Code
    2. Click Anthropic
    3. Enter a name (e.g., "Claude Code billing")
  3. Configure Credentials

    Enter the following:

    • API Key: your Claude Console API key
    • Workspace ID (optional): only for an organization-wide key, the workspace to bill (wrkspc_...). Leave it empty for a workspace key.
  4. Save and check

    Save the integration, then open Project settings → Coding agents, select Claude Code and click Check.

Use it in an agent​

Add a claude: section to the agent's agent.yaml:

YAML
model: anthropic:claude-sonnet-5
claude:
mode: acceptEdits
version: "2.1"
  • mode is the session's permission mode: acceptEdits edits files without asking; default asks first; plan changes nothing. Left out, the adapter's default applies.
  • version pins the coding agent's version, as a prefix. Leave it out to run the version installed on the computer: a pinned version is refused once the computer image moves past it.
  • integration names the Anthropic connection whose key it uses. Only needed when the project has several.

A project admin can turn Claude Code off in Project settings → Coding agents; its runs are then refused.