The course gives you API access to models from OpenAI, Anthropic, and Google. Harvard FAS Academic Technology Group funds the access, and the MaDSys group runs the proxy layer in front of it: the hybridInference router, which handles key distribution, which models an account may reach, and account management. You request one key from the course and use it for all three providers rather than holding a separate account with each one.
This is the path for Assignment 2 and Assignment 3, where the model runs behind a commercial API and the machine you call it from does not matter. It is also available for a small number of calls in Assignment 5, where you otherwise serve the model yourself on the course HPC. Note that this is a different thing from Claude Code, which is a separate Harvard FAS license for the agent you drive from a terminal.
Three steps, in order.
The API is expensive, and an agent is the worst case for it. A model is stateless, so every step of an agent loop re-sends the whole context and pays for it again. The bill therefore grows with the number of steps multiplied by the context length, not with the number of questions you asked.
Consider a 50-step agent session that carries 20,000 tokens of context into each step and generates 500 tokens per step. That is 50 × 20,000 = 1,000,000 input tokens and 50 × 500 = 25,000 output tokens for a single run. On Claude Haiku 4.5 the run costs 1.0 × $1.00 + 0.025 × $5.00 = $1.13. On Claude Opus 5 the same run costs 1.0 × $5.00 + 0.025 × $25.00 = $5.63, or 5.0× as much. One run of either is affordable. However, a 200-run sweep on Opus 5 is $1,125, which is not, and a parameter sweep is exactly what Assignment 3 asks you to do.
Two other levers matter more than model choice for a fixed workload. First, prompt caching bills a repeated prefix far below the input rate (on the Anthropic models a cache hit costs 10% of the base input price, against a 25% surcharge on the write), and an agent loop that re-sends a stable system prompt and tool list is the case it was built for. Second, context length is a cost you control: trimming what you re-send each step reduces every subsequent step's bill, which is the measurement Assignment 3 is about.
Prices are US dollars per million tokens, at the standard (non-batch) rate, as published by each provider on 2026-08-22. Batch processing halves the rate at all three providers. Prices change, and several rates below are explicitly temporary, so treat these tables as the starting point for your own estimate and check the provider's page before you plan a large run.
Read across the three tables before you pick. The spread is wider than it looks: Claude Fable 5 costs 50× as much per input token as GPT-5.6 Luna, and 42× as much per output token. The cheapest option overall is GPT-5.6 Luna, and the cheapest that still gives you a 1M-token context is Gemini 3.5 Flash-Lite. Note also that only Claude Haiku 4.5 and the OpenAI models are below 1M context, which matters once an agent loop starts accumulating history.
| Model | Context | Input $/1M | Output $/1M | Notes |
|---|---|---|---|---|
| GPT-5.6 Luna | 272K | $0.20 | $1.20 | The cheapest model the course provides. A sound default while the harness is still wrong. |
| GPT-5.6 Terra | 272K | $2.00 | $12.00 | Mid-tier of the GPT-5.6 family. |
| GPT-5.6 Sol | 272K | $4.00 | $20.00 | Promotional rate, held at least through 2026-11-21. |
| GPT-5.5 | 272K | $5.00 | $30.00 | The previous generation. |
Every OpenAI model here has a 272K context, and above that length the rate roughly doubles.
| Model | Context | Input $/1M | Output $/1M | Notes |
|---|---|---|---|---|
| Claude Haiku 4.5 | 200K | $1.00 | $5.00 | The smallest Claude. Note the 200K context, 5× smaller than the rest of the family. |
| Claude Sonnet 5 | 1M | $2.00 | $10.00 | The usual middle choice for agent work. |
| Claude Opus 5 | 1M | $5.00 | $25.00 | Use for the final measurement, not for debugging. |
| Claude Fable 5 | 1M | $10.00 | $50.00 | The most expensive model the course provides. Justify it in your write-up before using it at scale. |
The Claude models are the ones where prompt caching is documented most precisely: a cache hit costs 10% of the base input rate, against a 25% surcharge on the write.
| Model | Context | Input $/1M | Output $/1M | Notes |
|---|---|---|---|---|
| Gemini 3.5 Flash-Lite | 1M | $0.30 | $2.50 | The cheapest model with a 1M context. |
| Gemini 3.7 Flash | 1M | $0.75 | $3.75 | Rate holds through 2026-12-31, then doubles. It will not change during the semester. |
| Gemini 3.1 Pro | 1M | $2.00 | $12.00 | Preview model. Above a 200K prompt the rate rises to $4.00 input and $18.00 output. |
Every Gemini model here has a 1M context, which makes this the cheapest family to hand a long prompt.
Sources (2026-08-22): OpenAI API pricing, Anthropic pricing, and Gemini API pricing.