Skip to main content

Anthropic API key

StratChat is the only panel that needs an Anthropic API key. Setting one up takes about ten minutes, once per machine, and runs a few dollars a race weekend. Do it before an event, not during one.

Usage bills to your Anthropic account; P1TS adds no markup and sees no usage data. ⚠️ It also needs working internet, even on-prem - the AI call is the one part of P1TS that leaves your LAN, and without it every update and question comes back (error).

⚠️ A claude.ai subscription does not cover this. The API is billed separately, even under the same email address - if you already pay for Claude Pro or Max, you still need API credits (step 2).

Free Claude chat vs. the API - why StratChat needs a key

StratChat's assistant is Claude, from Anthropic. It is the same AI you would chat with on the Claude website - what differs is how access is bought, and Anthropic sells it two ways:

  • A claude.ai subscription lets you chat with Claude on Anthropic's own site, claude.ai.
  • An API key is a long password-like string that lets a program like StratChat talk to Claude on your behalf, and bills you for what it uses.

Free chat is a capped consumer product the AI companies subsidize; the API has no free tier - programs pay for exactly what they use, fractions of a cent per update (Anthropic's pricing).

Setup​

All of this is in the Anthropic Console. Have ready an email address, a credit card, and the date of your last event of the season.

1. Create a Console account at platform.claude.com - a separate sign-up from claude.ai, even with the same email address.

2. Buy $10 of credits on the Billing page. Without credits the key will exist but every request fails. You may decide to skip Auto-reload - with it off, the card is charged only when you top up yourself.

3. Create a workspace - Workspaces → Create workspace, named something like P1TS StratChat. Not the Default one - the next step's spend limit cannot be set there. It is also your kill switch: archiving a workspace kills every key in it within seconds.

4. Give it a $10 monthly spend limit and a $5 email alert, on the Console's Spending → Spend limits page. Under Workspace limits, pick your workspace, then Set limit to $10. This is what makes a leaked key survivable - see Cost. We recommend also setting Email notifications just below it, at $5 - that email is the only warning you get before the limit stops StratChat.

5. Create the key on the API keys page. If the Console first offers identity federation, choose Continue with an API key - federation is for cloud-hosted software, not a panel in your browser. Then fill in the dialog, changing two fields from their defaults:

  • Name - anything you will recognise later, e.g. p1ts-stratchat.
  • Scope - pick the workspace from step 3. Not Organization, and not the pre-selected Default workspace.
  • Expires - not the 30-day default. We suggest Custom and the end of your race season, e.g. 12/31/2027.

⚠️ Scope and Expires both matter: a key scoped to Organization fails every call with a confusing "invalid request", one on the Default workspace is not covered by step 4's limit, and an expiry cannot be extended afterwards.

6. Copy the key before you close the dialog. It starts with sk-ant- and is shown once only. Paste it into a password manager as well as into StratChat.

7. Paste it into StratChat - the panel's gear icon → Anthropic API Key (BYOK) → close → ask a question. An answer means you're finished.

Treat the key like a credit card number: anyone who has it can spend against your account. If it leaks, delete it on the API keys page and it stops working immediately.

Shared pitwall machine? Link the key to a service account

Step 5's dialog has a Linked account field that cannot be changed afterwards:

  • One engineer, their own laptop → a personal key (linked to themselves).
  • A shared machine, or anything that must outlive staff changes → ask an organisation admin for a service account, and link the key to that.

⚠️ A personal key is archived when that person leaves the organisation - re-inviting them does not bring it back, and StratChat stops working for the whole team.

Also worth knowing: the key's 7-day expiry warning email goes only to whoever created it, so put a calendar reminder where the team will see it.

If it doesn't work​

  • An authentication error means the key itself is wrong - usually copied incompletely, or since deleted or expired. Create a new one (steps 5-6).
  • An "invalid request" error on every call, with a valid-looking key, is the unscoped-key trap in step 5. Create a replacement key scoped to the one workspace.
  • It worked earlier today and now doesn't, with nothing changed, is most often the credits or the spend limit running out. Check the Billing page and the Spend limits page - they are two separate things.

Cost​

There is no P1TS charge for StratChat. You pay Anthropic directly: with the default model and Concise on, a car running green laps costs roughly $0.30 per hour of live running, so a typical race weekend lands around $3-5 including typed questions. A $10 cap with an alert at $5 covers a race weekend with room to spare, and the email lands halfway - early enough to top up mid-weekend rather than discovering the ceiling during a session.

⚠️ Keep the cap at or below your credit balance. Both can stop Strat Chat, but only the cap emails you first - so if the cap is the higher of the two you will never hear from it, and the first sign of trouble is the panel dying with no warning.

Your Settings move those figures - a larger model, Concise off, or more update switches all cost more. Session usage there tracks this browser; the Console's Cost page is the total across every machine using the key.

How the spend limit behaves

The limit belongs to the workspace, not to the key - which is the whole reason for step 3. It matters because the key lives in a browser (see Key exposure): you cannot make a browser-held key unreadable, but you can make it worthless beyond a number you chose.

  • Every key in the workspace draws on the same budget. Add a second key for another engineer's laptop and they share it, which is usually what you want. Separate budgets need separate workspaces.
  • It resets at the start of each month, so a heavy race month does not borrow from the next one.
  • The alert email is the only warning you get - set it at half the limit rather than just under it, as a nudge to check rather than an alarm as you run out.
  • Hitting it reads like a broken key, because the error comes from Anthropic rather than from P1TS. If the panel worked this morning and stopped this afternoon, check the limit before hunting for a key problem.
  • Raising it takes effect straight away - no new key, nothing to paste, no restart. That is why starting at $10 is safe. Top the credits up to match whenever you raise it.

Key exposure​

The key is stored in this browser so you don't retype it every session, which means anyone with access to that computer can read it, and a successful attack on the p1ts.com site could too. It is never logged, never shown in an error message, and never included in any diagnostic output - but P1TS cannot revoke it for you. That happens on the Console's API keys page, which is why steps 3-5 matter: a scoped, capped, expiring key limits what a leak costs you.