The API and Beyond
70 minutes
Module 13 · Tier III
The API
From tool to infrastructure.
Charter Oak Strategic Partners
The restaurant analogy.
Counter
One address for all orders.
Order ticket
Model, message, max length.
The meal
Claude’s answer + receipt.
Kitchen rules
Persistent instructions.
Chat. Projects. Cowork. Skills.
Every feature you have used is built on top of this API.
Three models. One decision.
The most capable. Complex reasoning, nuanced analysis.
DeliberateInput /MTok
$5
Output /MTok
$25
The workhorse. Most production use cases start here.
BalancedInput /MTok
$3
Output /MTok
$15
The speed model. High-volume classification and routing.
FastInput /MTok
$1
Output /MTok
$5
Tool use.
Claude does not just generate text.
It calls functions, reads results, and answers with real data.
Four steps. Invisible to the user.
Define tools
Your code lists what functions Claude can call: get_order_status, check_inventory, calculate_shipping.
Claude decides
"Where is my order #12345?" → Claude calls get_order_status with order_id 12345.
System executes
Your code runs the function — queries the database, calls the shipping API — sends the result back.
Claude responds
"Your order shipped yesterday via FedEx. Expected arrival: Thursday." The user sees an answer, not the plumbing.
The code execution tool.
Claude writes and runs code inside a sandboxed environment. The same capability that powers Cowork, made available in the API.
Data analysis
Claude writes a Python script to process a CSV, runs it, and returns the results. No manual scripting.
Document generation
Claude writes code to format a report, create a spreadsheet, or generate a structured file. Output is the file.
Complex calculations
Claude writes the math rather than doing arithmetic inline. Results are exact, not estimated.
Requires code execution enabled in Settings. Runs in a sandboxed container — cannot reach external systems without tools.
Three ways to reduce cost.
50-90%
Prompt Caching
Repeated system prompts are cached. You pay less for the same context.
50%
Batch API
Overnight processing, bulk classification. Submit a batch, collect results later.
67%
Model Selection
Haiku for classification. Sonnet for generation. Right-size the model to the task.
Support ticket classification.
tickets/day: 200
input/ticket: ~200 tokens (incl. system prompt)
output/ticket: ~5 tokens (category label)
model: Haiku ($1/$5 per MTok)
───────────────────────────
monthly input: 1.2 MTok × $1 = $1.20
monthly output: 0.03 MTok × $5 = $0.15
annual total: $16.20
Two hours per day returned to your support team for complex cases and relationship building.
Content generation at scale.
use case: personalized product descriptions
volume: 50 new products/day
input/product: ~500 tokens (system prompt + specs)
output/product: ~250 tokens (200-word description)
model: Sonnet ($3/$15 per MTok)
───────────────────────────────
monthly input: 0.75 MTok × $3 = $2.25
monthly output: 0.375 MTok × $15 = $5.63
annual total: $94.50
15,000 first-draft descriptions per year. Your content team refines them instead of writing from scratch.
When the API makes sense.
Above 50 requests/day, the API becomes compelling. Above 500, it is the only option.
The task needs the same treatment every time. Classification, extraction, routing.
Output goes into a database, triggers a workflow, updates a CRM, sends a notification.
Response needed in seconds. Real-time chat, live classification, dynamic content.
Fewer than two conditions met? Stick with Chat, Projects, or Cowork.
Pick a task. Calculate the cost.
How many requests per day? How many tokens in, tokens out? Which model? Calculate the monthly API cost. Then calculate how many hours your team gets back.
Five minutes individual. Five minutes table discussion.
You know the vocabulary.
You know the economics.
Now prioritize.
Module 14: The Automation Audit. Everything you have learned, applied to your actual work.