Course AI gateway

This gateway gives you access to Claude for your course. You get a personal key with a budget; this page shows what you have left and how to connect Claude Code to it.

Your key stays in this browser tab; it is not saved anywhere.

Set up Claude Code

Your system:

Install Claude Code

Open a terminal and run:

Already installed? Skip this step. You do not need a Claude subscription or an Anthropic account.

Tell Claude Code to use the gateway

Claude Code reads its settings from . Run this once to create the file:

If the command says the file already exists, open it in an editor and add the "env" block from above to it by hand. The snippet contains a placeholder until you paste your key at the top of this page.

Check the connection

This sends one tiny request through the gateway. A reply starting with {"id":"msg_ means everything works:

Start working

Go to a project folder and start Claude Code:

Inside Claude Code, /status should show this gateway under Anthropic base URL and ANTHROPIC_AUTH_TOKEN as the credential. /model lists the models your key may use.

Using the VS Code extension? Put the same four values into the VS Code setting claudeCode.environmentVariables (Preferences: Open User Settings (JSON)):

When something does not work

What you seeWhat it meansWhat to do
Claude Code opens a login screenIt did not find your settings. Check that the settings file from step 2 exists at the path shown there and is valid JSON.
Invalid gateway key (401)The key is mistyped, or was replaced by a new one. Copy the key again, without spaces. Ask your instructor for a new key if needed.
Course budget used upYou spent your budget for this period. Wait for the reset date in the message, or ask your instructor.
The model … is not enabled for your gateway keyYou selected a model that is not part of your course. Run /model and pick one of the models named in the message.
A warning about two credentials / “auth conflict”You are also logged in with a private Claude account. Run /logout in Claude Code, then start it again.
/status shows no “Anthropic base URL” lineThe settings file is not being read. Make sure the file is named exactly settings.json and sits in the .claude folder of your home directory.

Good to know