Blog / model configuration
Hermes Agent Anthropic API Key Setup and Rotation
To use Claude models with Hermes Agent, create an Anthropic API key in the console, store it as a secret in the deployment configuration, and verify one request before opening the assistant to users. Rotating the key later is a two-step change: create the new key, deploy it, then revoke the old one.
- 01
Create the key in the Anthropic console
Sign in to the Anthropic console, open the API keys section, and create a key dedicated to this Hermes Agent deployment.
- 02
Set a spend limit before you deploy
Configure a monthly limit and usage alerts so a runaway loop or a leaked key has a bounded cost.
- 03
Store the key as a secret
Paste the key into the Hermes Agent deployment form, which stores it as a protected secret. Never commit it to a repository or share it in chat.
- 04
Deploy and send one verification request
Choose a Claude model, deploy, and send a short message. A single successful reply confirms the key, the model name, and the network path.
- 05
Plan the rotation before you need it
Write down who owns the key and how to rotate it, then practise the rotation once so the process is not improvised.
- 06
Revoke the old key after a successful rotation
Create the replacement, deploy it, verify traffic moved, and only then delete the previous key from the console.
Four-step path
How do you set up an Anthropic API key for Hermes Agent?
Five checkpoints: create the key, set spend limits, store it as a secret, deploy a test request, then plan the rotation.
- Step 01
Create the key in the Anthropic console
Sign in to the Anthropic console, open the API keys section, and create a key dedicated to this Hermes Agent deployment.
- Step 02
Set a spend limit before you deploy
Configure a monthly limit and usage alerts so a runaway loop or a leaked key has a bounded cost.
- Step 03
Store the key as a secret
Paste the key into the Hermes Agent deployment form, which stores it as a protected secret. Never commit it to a repository or share it in chat.
- Step 04
Deploy and send one verification request
Choose a Claude model, deploy, and send a short message. A single successful reply confirms the key, the model name, and the network path.
- Step 05
Plan the rotation before you need it
Write down who owns the key and how to rotate it, then practise the rotation once so the process is not improvised.
- Step 06
Revoke the old key after a successful rotation
Create the replacement, deploy it, verify traffic moved, and only then delete the previous key from the console.
Where do you create an Anthropic API key?
In the Anthropic developer console under API keys. Create a separate key per deployment so usage and revocation stay attributable to one assistant.
- Use one key per Hermes Agent deployment, not one key for everything.
- Name the key after the deployment so the console list stays readable.
- Copy the value once; the console will not show it again.
- Store it in the deployment configuration rather than a shared note.
Do you need a paid Anthropic account?
API access is billed separately from any consumer Claude subscription. You need billing enabled on the API account, and usage is charged per token rather than per seat.
Set the spend limit before the first deploy. A limit is the cheapest protection against a loop, a leaked key, or an unexpectedly expensive workflow.
Which errors mean the key is the problem?
Authentication failures, permission errors, and quota-exceeded responses point at the key or the account. Timeouts and connection resets point at the network instead.
- An authentication error means the key is wrong, revoked, or truncated.
- A permission error usually means the key's workspace cannot use the model.
- A quota error means the spend limit or the account balance was reached.
- A timeout means the request never reached the provider.
How do you keep an API key safe?
Store it only in the deployment's protected configuration, restrict who can read it, and rotate on a schedule or immediately after any suspected exposure.
A key pasted into a chat message, a screenshot, or a public repository should be considered compromised. Rotation is fast; an unexpected bill is not.
How do you rotate the key without downtime?
Create the new key first, deploy it, verify that requests succeed, and then revoke the old key. Doing it in that order avoids a window where the assistant cannot reach the provider.
Two keys can exist for a short period, which is exactly what makes the change safe. Deleting first and creating second is what causes the outage.
Which primary sources support this page?
Product behavior is checked against the current deployment flow. These external links provide the upstream project or channel documentation used for setup details.
Direct answers
Frequently asked questions
Is the Anthropic API free with a Claude subscription?
No. API usage is billed separately from consumer subscription plans, so enable billing on the API account.
Can I use one key for several Hermes Agent deployments?
You can, but separate keys per deployment make usage, revocation, and incident response much clearer.
What should I do if the key leaks?
Create a replacement, deploy it, verify requests succeed, then revoke the exposed key and review usage for the affected period.
Does Hermes Agent store the key in plain text?
The deployment stores channel and provider credentials as protected secrets. Treat the deployment account itself as sensitive for the same reason.
Key takeaways
- To use Claude models with Hermes Agent, create an Anthropic API key in the console, store it as a secret in the deployment configuration, and verify one request before opening the assistant to users. Rotating the key later is a two-step change: create the new key, deploy it, then revoke the old one.
- Start with one model, one channel, and one controlled test conversation.
- Use managed hosting when deployment speed matters more than operating the server yourself.
Continue the setup
Related Hermes Agent guides
Blog guide
How to Set Up Model API Keys for Hermes Agent
Set up Hermes Agent model API keys, choose a provider, validate model access, protect credentials, and prove fallback behavior with smoke tests.
Read nextBlog guide
Hermes Agent Credential Vault and Key Pools
Store model and tool credentials in the Hermes Agent credential vault, build key pools for rate limits, and rotate secrets without breaking the agent.
Read nextBlog guide
Hermes Agent Provider Routing Across Multiple Models
Route Hermes Agent across multiple model providers by task, cost, and latency. Covers rule design, verification steps, and the failure modes to avoid.
Read nextBlog guide
How to Choose a Model for Hermes Agent
Choose the right Hermes Agent model for support, briefings, operations, and channel workflows across GPT, Claude, Gemini, DeepSeek, Kimi, and GLM.
Read next