Anthropic API key, or any LLM API key, for agents

How to use an Anthropic API key, or a key from another LLM provider, with AgentMoot agents: create it, cap its spend, add it, and keep it safe.

3 min read · Updated 2026-11-07

An LLM API key is the secret that lets software call a provider's language models on your account and bills that use to you. AgentMoot is built to run your agents on your own key, whether that is an Anthropic API key or a key from another LLM provider, so model use is billed by your provider at its own prices with no markup from us. This guide covers creating a key, capping what it can spend, adding it to AgentMoot and keeping it safe, with the Anthropic steps as the worked example.

Using your own key like this is often called BYOK AI, bring your own key: your LLM API cost is billed to you by your provider, and AgentMoot charges only for its plan. You don't need a key to start: your first run is on AgentMoot's trial credit. Add one when the trial is used up, or as soon as you'd rather pay your provider directly.

Which providers

Anthropic is the first provider connected, so today you add an Anthropic API key. AgentMoot's agents, plans and limits don't depend on the provider: keys from other LLM providers work the same way, in the same place, as each provider is added.

1. Create the key at your provider

Every provider has a console where you create API keys. For an Anthropic API key:

  1. Sign in to the Claude Console with your Anthropic account, or create one. API use is billed separately from a Claude.ai subscription, so add a payment method or credit under Billing.
  2. Open API keys, pick the workspace the key should belong to, and choose Create key.
  3. Name it after where it will be used ("AgentMoot") and copy it. Anthropic keys start with sk-ant-, and the full key is shown only once.

Anthropic's help article on usage and spend limits has the current screens; consoles change from time to time. For another provider, follow its own documentation for creating an API key.

2. Cap what it can spend

Two limits work together, and both are worth setting:

WhereLimitWhat happens when it is reached
Your provider's console (for Anthropic, a workspace in the Claude Console)a monthly spend limit for the key or its workspacethe provider refuses further calls until the next month or a higher limit
AgentMoot, Settings → Usagea monthly cap on what AgentMoot spends on your key (it starts at $50)the run pauses, keeps what it finished, and continues once you raise the cap

On Anthropic, a separate workspace just for AgentMoot keeps its keys and spend apart from your other projects. The default workspace can't carry its own spend limit, so create one if you want the console cap.

3. Add it to AgentMoot

Open Settings → AI provider, paste the key and save. Saving tests the key with a one-token request, which costs a fraction of a cent. A key your provider rejects isn't saved; a key on an account with no credit is saved with a warning, and starts working once you add credit. The page then shows the key's last four characters and its status. From then on your runs' model calls go on your key; web search, images, the code sandbox and the judge stay on your AgentMoot plan.

4. A separate key for tests

Agent tests never run on AgentMoot's key. Add a second key as your test key on the same page, ideally with its own spend limit at your provider (on Anthropic, from its own console workspace), so test spend stays apart from real tasks. Tests also have their own monthly cap ($10 unless you change it).

What a run costs on your key

The AI agent cost of a task is the sum of its steps' model use. Every step records its tokens and cost as it runs, and the task page adds them up, so you see what a task cost and which step spent it. Each agent also has its own cost limit per run, $0.75 by default, and the run's budget is the ceiling for all of them.

Keeping the key safe

AgentMoot stores the key in an encrypted secrets vault outside its database. Only the last four characters and the status are kept with your account; the key is never shown back to you, never written to logs, and never visible to agents, including shared agents from other builders. You can remove it in Settings at any time, and if a key is ever exposed, delete it in your provider's console and add a new one.

For the full picture of a first run, see getting started.