The course issues you a Claude API key. This page covers wiring it into Claude Code, what gets logged, and how your usage allocation works
The course gives you an Anthropic API key so you don’t need your own account or subscription. Complete the five setup steps before the first class, then read the key’s usage and privacy conditions.
On this page: the setup · keep your key out of your repos · what happens to your prompts · usage allocation · other tools
Your key routes through strproxy, an ANU-hosted proxy that sits between your machine and Anthropic. It tracks your allocation and keeps the audit trail. It is only reachable from the ANU network: that’s a university-wide network rule, not a course setting, and it applies to everything your key touches, Claude Code included. Campus wifi doesn’t count — on ANU-Secure your traffic is dropped exactly as it is at home — so unless you’re on wired campus Ethernet, nothing works until you connect the VPN, which is why that’s step one.
Get on the ANU network#
Connect the ANU VPN (GlobalProtect) before you start work, every time, on campus as well as off. A disconnected VPN is the first thing to check whenever something “doesn’t work”.
Install it from ANU IT’s
download GlobalProtect
page. As a student, sign in to the download portal at
student-access.anu.edu.au — the staff and partner portals won’t let you
in. That page links onward to the OS-specific install steps and to
connecting and reconnecting
once it’s installed.
If you’re on Windows and doing your development through WSL (the course recommendation — see onboarding), run GlobalProtect in Windows as normal; WSL shares the Windows VPN connection, so there’s nothing extra to install inside WSL.
Get your key#
Your key is handed out through Canvas, behind a short access quiz so the usage and privacy basics below don’t get skipped. In the COMP4020/COMP8020 Canvas course, find the Start here module and work through it in order: Canvas unlocks each item only as you finish the one before it, so a step that looks locked is usually just waiting on the previous one.
- VPN install — tick off the step confirming you’ve installed it
- research participation — voluntary, gates nothing, carries no completion requirement; take it or skip it
- pre-course survey — two minutes, not assessed, and nothing you say there affects your key
- access quiz — the step that gates the key, with unlimited attempts, so retake it until you score 100%
That unlocks the Your Claude Code API key assignment. Your key is in the
instructor comment on your submission: a value starting with sk-. You only
ever see your own key.
If the assignment stays locked, the comment is missing, or the key doesn’t work, start a private Ed thread to the teaching team — don’t contact Anthropic, and don’t contact ANU IT.
Configure Claude Code#
Add your key and the gateway to your user-wide Claude Code settings at
~/.claude/settings.json. Create the file if it doesn’t exist:
{
"env": {
"ANTHROPIC_BASE_URL": "https://strproxy.comp.anu.edu.au",
"ANTHROPIC_AUTH_TOKEN": "sk-...(your key)",
"ANTHROPIC_MODEL": "claude-sonnet-5"
}
}
The variable is ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY — this
catches people out. Claude Code sends ANTHROPIC_AUTH_TOKEN as the
Authorization header, which is exactly what the proxy expects for its
virtual-key authentication. Use ANTHROPIC_API_KEY and it won’t authenticate.
The ANTHROPIC_MODEL line controls spending. On an API key Claude Code
otherwise defaults to Opus, several times Sonnet’s price per token, which can
use a week’s allocation in a day. Sonnet is the course default. The proxy allows
the current Haiku, Sonnet and Opus tiers and their dated snapshots, so switching
for a task that warrants it is fine as long as you watch your spend. Naming a
tier outside those gets a “model not permitted” error; ask the convenor if you
need access to one.
Two free local models also run on School GPU servers: soco-fast (smaller and
quicker) and soco-smart (larger and more capable). They don’t draw on your
weekly allocation, so they keep working once it runs out. To switch mid-session,
type /model soco-fast, and /model claude-sonnet-5 to go back; /model saves
your choice as the default for new sessions, so switch back when you’re done. To
start a session on one, set ANTHROPIC_MODEL in the shell that runs Claude
Code, and unset it to go back to Claude.
macOS / Linux:
export ANTHROPIC_MODEL=soco-fast
Windows (PowerShell):
$env:ANTHROPIC_MODEL = "soco-fast"
They’re open-weight models on shared hardware: weaker than Claude on hard agentic work, slow when the whole class is using them, and missing some Claude features such as prompt caching. They’re best-effort, so if one stops responding, switch back to Claude rather than debugging it.
Confirm it works#
From a terminal, with the VPN connected:
claude --print "say hi"
A reply means you’re routed through strproxy and you’re done. If instead you get:
- 401 / authentication error — the key is wrong, incomplete, or revoked.
Check you pasted the whole
sk-value with no stray whitespace. A message naming an OAuth token is about a leftover claude.ai login rather than your course key: run/logoutinside Claude Code, restart, and check theenvblock above is in~/.claude/settings.json. - 422 / budget exceeded — you’ve spent this week’s budget. It comes back
at Thursday 9:00 am; the local models (
soco-fast,soco-smart) keep working meanwhile. - 429 / rate limit — too many requests in flight at once. Each key caps concurrent requests and requests per minute — a generous guard rail, not your budget — so let the current run finish or run fewer agents in parallel and it clears on its own.
- nothing happens, and it just hangs — almost always the VPN, campus wifi included. Outside the ANU network your traffic is dropped rather than refused, so Claude Code stalls with no output and no error. Connect the VPN and retry. If it still hangs, it’s likely a transient proxy outage: wait a minute, and tell the convenor if it keeps failing.
Install the course skills plugin#
The course ships a handful of Claude Code skills — checking your budget, a setup doctor, deadline reminders, a submission checklist — as a plugin. Install it in two one-liners from your terminal:
claude plugin marketplace add comp4020-agentic-coding-studio/core
claude plugin install comp4020@comp4020
The first points Claude Code at the course’s plugin
marketplace on GitHub
(no VPN needed — it’s a public repo); the second installs the plugin. If
you’re already inside a Claude Code session, the same two steps are the slash
commands /plugin marketplace add comp4020-agentic-coding-studio/core and
/plugin install comp4020@comp4020.
The plugin does not update itself, and the skills change through the semester, so you need to update it explicitly. It is two commands, not one — refreshing the marketplace only re-reads the catalogue, and installs nothing:
claude plugin marketplace update comp4020
claude plugin update comp4020@comp4020
The new version loads on the next restart. /comp4020:doctor tells you when
your copy is behind, and so do /comp4020:ship and /comp4020:preflight — a
stale copy runs whatever steps the version you installed happened to carry.
Once it’s in, you don’t need to remember any commands: just ask in plain
English — “how much budget do I have left?”, “is my setup right?”, “what’s due
this week?”, “am I ready to submit?” — and the matching skill handles it. Run
/comp4020:help for the full menu.
Keep your key out of your repos#
Your key must never be stored in a file that git tracks.
~/.claude/settings.json — note the leading ~, which makes it the file in
your home directory, outside every repo — satisfies that by construction,
which is why step 3 puts it there.
Inside a repo, .claude/settings.json (no ~) is a different file and an
ordinary tracked one. The course templates ignore the whole .claude/
directory, so nothing you write under it in a course repo can be committed,
including the .claude/settings.local.json used by the
repo-scoped setup. In any other repo, run
git check-ignore .claude/settings.local.json before writing a key into that
file, and never paste the key into a code sample or a workflow file.
Course repos become public at each week’s cutoff. Deleting a committed key from the file does not remove it from the git history.
The first pnpm install in a course template repo installs a pre-commit hook.
It blocks any commit containing something shaped like an API key. If a commit is
refused with “looks like an API key”, take the key out of the file — use an
environment variable, or an untracked file like .env, which the templates
already ignore — and commit again. Don’t bypass it with --no-verify. If a
key has already reached GitHub, treat it as leaked: start a private Ed thread to
the teaching team and ask for it to be rotated.
What happens to your prompts#
Every prompt you send and every response you get back travels through ANU infrastructure on its way to Anthropic and back. Two parties handle that traffic, and they do different things with it.
What Anthropic does with your prompts#
The course uses Anthropic’s commercial API (the API Billing terms). Anthropic’s standard API retention policy automatically deletes inputs and outputs within 30 days, unless Anthropic and the customer have agreed different terms such as an approved zero-data-retention arrangement. Under its commercial-product training policy, Anthropic does not use API inputs or outputs to train its models by default. These are Anthropic’s current published defaults; the course will state any ANU-specific arrangement here once it has been confirmed against the live organization settings.
What ANU logs#
All traffic through the course key is logged to an ANU-held database:
- the prompts you send
- Claude’s responses
- token counts
- timestamps
This is no different from your ANU email: anything you send through ANU systems is, in principle, visible to ANU IT. The captured data supports normal course operation:
- enforcing your usage allocation
- detecting leaked credentials (e.g. an API key accidentally committed to a public repo)
- maintaining an audit trail for academic-integrity purposes
The infrastructure does not distinguish “course work” from “other use” of the key. If you point your course key at a side project at 11pm on a Tuesday, that traffic is logged the same way.
What the course can’t see#
The course infrastructure only sees traffic through the course-issued key. A personal Anthropic account, another agent, or a friend’s API key is invisible to the course. We can’t police what happens outside that boundary, but the course-provided key is the supported path, and going outside it puts you outside the support model.
Usage allocation#
You’ll be given an allocation that covers your Claude usage for the course, so you won’t be paying out of pocket. The allocation is weekly, and every student’s week resets at the same moment: Thursday at 9:00 am, Canberra time.
The allocation is provided for course work: it isn’t a general-purpose Claude subscription, and pointing it at side projects burns budget you’ll want later (and is logged like everything else — see What ANU logs above). The cap is set on the proxy and can be adjusted during the semester, so no page here quotes it. Your cap, your spend so far and when the week resets all come from the proxy itself; checking your usage below shows the ways to ask it.
Managing your allocation is your responsibility. “I ran out and couldn’t finish my prototype” or “I ran out and couldn’t submit” is never an acceptable excuse for a missed deadline, so plan for headroom.
If you blow through your allocation early, talk to your tutor before assuming the next prototype is impossible. There’s usually a sensible workaround, but it has to happen before the deadline.
Checking your usage#
You can see your current weekly spend any time — on the ANU network or VPN, same as everything else:
curl -s https://strproxy.comp.anu.edu.au/api/me \
-H "Authorization: Bearer sk-...(your key)"
The response reports your spend, your cap, and when the week resets. Add
?detail=requests for a per-request breakdown of the current week:
curl -s "https://strproxy.comp.anu.edu.au/api/me?detail=requests" \
-H "Authorization: Bearer sk-...(your key)"
Easier still: the key Claude Code already uses is the same one this endpoint accepts, so you can just ask Claude. With the course skills plugin installed, “how much budget do I have left?” does the right thing; without it, paste the curl command into a session and ask Claude to read back the JSON.
If you’d rather not have to ask, an optional companion plugin keeps the figure in your status line, at the bottom of every session — see the last step of the onboarding page. It’s a cached indicator that lags your real spend by a minute or so, so the methods above remain the authoritative number.
Other tools#
The proxy is a thin shim over the Anthropic Messages API, so anything that
speaks that API works the same way: set the base URL to
https://strproxy.comp.anu.edu.au and the API key to your sk- key. That
covers other coding harnesses (Aider, Continue, Goose, OpenCode) and scripts
using the official Anthropic SDKs. The exact setting names vary per tool —
look for “custom Anthropic endpoint” or “API base URL”. Claude Code is the
supported path the lectures assume — running anything else is
going off piste — but the
credits aren’t tied to it.
pi#
pi is a minimal terminal harness. Install it with mise:
mise use -g npm:@earendil-works/pi-coding-agent
pi reads its configuration from ~/.pi/agent/ (on Windows,
%USERPROFILE%\.pi\agent\). Create two files there. models.json adds the
proxy as a provider:
{
"providers": {
"strproxy": {
"baseUrl": "https://strproxy.comp.anu.edu.au",
"api": "anthropic-messages",
"apiKey": "sk-...(your key)",
"models": [{ "id": "claude-sonnet-5" }]
}
}
}
settings.json makes it the default:
{
"defaultProvider": "strproxy",
"defaultModel": "claude-sonnet-5"
}
Check it with pi -p "Reply with exactly: pong", then run pi in a course
repo. Only models listed under strproxy go through the proxy: ask for another
one and pi sends it to Anthropic directly, which fails with invalid x-api-key.
Add a model to the list to use it. pi reads your CLAUDE.md, but it doesn’t ask
before running commands or editing files, so commit before you start.