Level 4 · cheat sheet
Build with Claude, on one page.
1. Your first order by code.
FIRST ORDER BY CODE Console = where you get keys and try requests Playground = test a request, then copy its code Key lives in ANTHROPIC_API_KEY, never in code Request = model · max_tokens · messages · system Model ID = the exact name, like claude-opus-5-5 Response = a list of content blocks + stop_reason Usage = tokens in and out: your receipt
Say it: “I made my first call: model, max_tokens, messages, and the key stays in an environment variable.”
2. Pick the chef by job.
PICK THE CHEF Haiku 5.5: fast, cheap, simple high-volume jobs Sonnet 5.5: balanced · Opus 5.5: the usual default Fable 5.2: the hardest, longest work MTok = a million tokens; output costs 5x input Effort = low · medium · high · xhigh · max Time to first token = how soon words appear Test on your own tasks before you switch
Say it: “We start on Opus 5.5, then test Haiku, Sonnet and lower effort on real tasks.”
3. Same plate every time.
SAME PLATE EVERY TIME JSON Schema = the plate diagram: fields and types output_config.format = lock the final answer’s shape No extra fields allowed (your developer sets this) Strict tool use = tool inputs match the schema Validation = still check it in code Refusal or max_tokens can break the shape Code reads it? Schema. A person reads it? Prose.
Say it: “When code reads the reply, we give Claude a JSON schema and still validate the result.”
4. Wire the appliances.
WIRE THE APPLIANCES tools = name · description · input_schema stop_reason tool_use = your code’s turn tool_use block = Claude’s order, with an id tool_result block = your answer, same id Parallel calls = answer all, in one message Server tools (web search) run at Anthropic Tool Runner = the SDK runs the loop for you
Say it: “Our code runs the loop: Claude orders a tool, we run it and send the result.”
5. Prep once, serve many.
PREP ONCE, SERVE MANY cache_control = mark the end of the shared part Order: tools, system, messages; stable first Cache TTL = 5 min default, 1 hour costs more Cached reads = a small fraction of normal input Cache hit = cache_read_input_tokens above 0 Batches = half price, most done in an hour, expire at 24 h, tag with custom_id Token counting = size it before you send
Say it: “We cache the shared start of each prompt and batch overnight jobs at half price.”
6. The recipe library, built.
THE RECIPE LIBRARY, BUILT Files API = upload once, reuse by file_id Document block = hand Claude a PDF or text Small library: send it whole Big library: chunk, embed, retrieve, cite Voyage AI = embeddings (Anthropic has none) BM25 = keyword search; reranker sorts finalists Contextual retrieval = a note on every chunk
Say it: “Small libraries go in whole with citations. Big ones get retrieval: embeddings plus BM25, reranked, cited.”
7. Taste tests in code.
TASTE TESTS IN CODE Eval = cases + a way to run + a way to grade Code grader = exact match, schema check: free Pairwise comparison = judge picks the better of two Rubric = what a judge scores one answer on Baseline = today’s results, saved · Pass rate = share that pass Log cost, seconds, stop_reason on every case Check the judge against your own grades
Say it: “Every change reruns the same cases against the baseline, logging cost and time.”
8. Opening night.
OPENING NIGHT 429 = slow down; wait retry-after seconds 429 with no retry-after = maybe the tier spend cap 400 “specified usage limits” = your own spend limit 529 overloaded = backoff: longer waits, plus jitter Other 400 · 401 · 404 = fix it, don’t retry Log request ID, tokens, seconds; never the key Keys on the server · spend limit set · evals run
Say it: “Before launch: a spend limit, keys on the server, retries with backoff, and request IDs logged.”