# Your Babson AI Key

Babson provides every student in this course an API key for Claude Sonnet 5, with a $100 monthly budget covered by the College. It is issued for OIM3690, it is meant for your work in this course, and it runs through December 31, 2026.

IT sends the key with a PDF covering Claude Desktop, a separate application for chat and for Cowork. Follow that if you want those. This page covers VS Code, which is where the course actually builds things, and it takes about five minutes.

## What you receive

An email from Babson IT with four values in a table:

| Field | What it is |
|---|---|
| Gateway base URL | The address your tools send requests to |
| API key | Your credential, starting with `sk-` |
| Auth scheme | `x-api-key` |
| Model | The exact model name your tools must ask for, currently `claude-sonnet-5` |

Keep that email. Every step below uses those four values, and this page does not repeat the gateway URL or the key, so read those from your own message.

## Rules and budget

- **Nothing public-facing.** Do not put this key in a deployed website, app, or service where other people could trigger requests on it. Your own machine and your own editor are fine. For a project that calls a model from a live site, use your own key from another provider.
- **Do not share it.** Every request is attributed to you, so lending the key out means lending your identity.
- **Assume it is logged.** Requests through the gateway, including prompts, responses, and tool activity, are recorded and attributable to your key, for cost tracking, support, and institutional records.
- **The budget is $100 a month.** It resets at the start of each month, and requests stop when it runs out.

## Set it up in VS Code

1. Open the Command Palette with `Ctrl+Shift+P` (Windows) or `Cmd+Shift+P` (macOS) and run **Chat: Manage Language Models**.
2. Click **Add Models**.
3. Choose **Custom Endpoint**.
4. For the group name, enter `Babson AI`.
5. Enter a display name, such as `Sonnet 5 (Babson)`, then paste the **API key** from your email.
6. For the API type, choose **Messages**.
7. VS Code opens a file called `chatLanguageModels.json`. Change only its `models` list. Find the line `"models": [`, delete everything between that `[` and the `]` that closes it, and paste the block below in its place. Then replace `PASTE_YOUR_GATEWAY_BASE_URL_HERE` with the gateway base URL from your email, and save.

```json
{
  "id": "claude-sonnet-5",
  "name": "Sonnet 5 (Babson)",
  "url": "PASTE_YOUR_GATEWAY_BASE_URL_HERE/v1/messages",
  "toolCalling": true,
  "vision": true,
  "maxInputTokens": 200000,
  "maxOutputTokens": 32000
}
```

Get these right:

- **`id` must match the Model value in your email exactly**, including every hyphen. A near miss returns an error that looks like the key is broken.
- **`url` is your gateway base URL with `/v1/messages` on the end.** Keep the `https://` and add nothing else.
- **Do not touch the `apiKey` line.** VS Code already wrote it, and it looks like `${input:chat.lm.secret...}` with an id unique to your machine. It points at the key you pasted in step 5, which VS Code keeps in your system keychain. Copying someone else's line breaks it.
- **The two token numbers are deliberate.** The deployment accepts up to a million input tokens and 128,000 output tokens, so both values here sit well inside what it allows. A project in this course runs to a few thousand tokens, and a request that filled the full window would cost about two dollars against your monthly budget.

Save the file. If the model does not show up in the chat model picker, restart VS Code.

## Check that it works

Open the Chat view, click the model picker at the bottom of the input box, and select **Sonnet 5 (Babson)**. Ask it anything. A reply means you are done.

**If the model is not in the picker**, look for a second dropdown next to it, showing a session target such as Copilot, Claude or Codex. Recent VS Code versions have one, and older ones do not. Set it to **Local**. A key you added yourself is a custom endpoint, and custom endpoints run under Local, so under any other target the model is missing from the list. That looks like a broken key and is not one.

Know what this key pays for:

- It powers **chat and agent mode**, which is where the course spends its AI budget.
- Inline completions, the gray ghost text you accept with `Tab`, keep running on Copilot's own free allowance and never touch this key.

## Where the key is stored

`chatLanguageModels.json` lives in VS Code's user configuration folder, inside your home directory. It sits outside every project folder, so it never lands in an assignment repository and Git never sees it.

> Do not paste an API key into a project file, a commit, or a prompt.

## Claude Desktop and Claude Code

The PDF that came with your key sets up **Claude Desktop**, where you get Chat and Cowork. It is a separate application from VS Code and it does not replace the steps above. Set it up if you want it.

**Claude Code**, the AI agent that runs in a terminal, is switched off on Babson keys by default, because it needs Git configured on your machine. IT can turn it on. Message me if you want it and I will ask on behalf of the class.

## If something breaks

| What you see | Usual cause |
|---|---|
| The model never appears in the picker | The JSON has a syntax error, or VS Code needs a restart |
| An error naming the model | The `id` does not match the Model value from your email |
| An authentication error | The key was pasted with a stray space, or the URL is missing `/v1/messages` |
| It broke right after you pasted into the JSON file | Your paste overwrote the `apiKey` line VS Code wrote. Remove the model under **Chat: Manage Language Models**, add it again, and paste only the model block |
| It worked and then stopped | The monthly budget ran out, and it resets on the first |

For installation and setup problems, email the IT Service Center at support@babson.edu. For anything about the key itself, such as the model, the budget, or a request to raise it, message me first and I will take it to the AI team. Bring everything else to class or office hours.
