-
Notifications
You must be signed in to change notification settings - Fork 0
Getting an Anthropic API Key
The foreman talks to Claude through the Anthropic API, which needs an API key. You can either give the key to the server once (so everyone using it is covered), or paste your own key into the web app. Either way, usage is billed to whoever owns the key — so keep it secret.
An API key is not the same as a Claude.ai subscription. The API is billed separately, by usage (per token).
Prefer OpenAI or another provider? See Getting an OpenAI API key.
- Go to the Anthropic Console and sign in, or create an account.
- Add credit under Billing (the API runs on prepaid credits — a small top-up is plenty to try the foreman).
- Open Settings → API keys and choose Create key.
- Give it a name (for example
FICSIT Foreman) and create it. -
Copy the key now — it is shown only once. It starts with
sk-ant-.
Pick one of these:
-
In the web app (easiest for trying it out). Open the foreman at
http://localhost:8725, click Settings, and paste the key into the Anthropic API key field. It is stored only in your browser and sent with each message — never saved on the server. -
On the server (covers everyone, no per-user key). Set
ANTHROPIC_API_KEYin your.envbefore starting the stack:ANTHROPIC_API_KEY=sk-ant-...
See Configuration for the full list of variables. With a server key set, the web app works without anyone entering their own.
If both are present, the key entered in the web app takes precedence for that browser.
- You are billed per token of usage. The foreman uses a capable model for chat and a cheaper model for background session summaries, to keep costs down.
- Treat the key like a password: don't commit it to git or share it. The web app
keeps it only in your browser; the server reads it from
.env, which is git-ignored. - You can revoke or rotate a key any time from Settings → API keys in the Anthropic Console.
FICSIT Foreman
- Home
- Installation
- API keys
- Configuration
- Game data channels
- Troubleshooting
- MCP clients