Reference
API glossary
8 exam-critical terms in the API category. See all categories →
Token
APIThe unit an LLM reads and writes. ~4 characters or ¾ of a word in English. You pay per input + output token, and context limits are measured in tokens.
Context window
APIMax tokens the model considers per call. Claude models today have ~200K windows. Includes system prompt, history, tool results, and output room.
stop_reason
APIField in Claude's response indicating why generation stopped. Values: end_turn (done), tool_use (wants a tool), max_tokens (hit output cap), stop_sequence (hit a stop string).
tool_use
APIA content block Claude returns when it wants to call a tool. Contains tool name, input args, and a unique tool_use_id you must reference in the tool_result.
tool_result
APIA content block you send back in the next user message containing the tool's output. Must reference the matching tool_use_id or the API rejects the call.
tool_choice
APIControls tool calling. 'auto' = model decides (may return text). 'any' = must call a tool, model picks which. Forced name = must call that specific tool.
Extended thinking
APIBuilt-in capability where Claude reasons in a dedicated internal channel before answering. Different from CoT prompting (a technique). Use for complex problems.
Batch API
APIAsync, high-volume, cheaper per-token API. For latency-tolerant workloads (overnight reports, bulk extraction). NOT for blocking pre-merge checks where latency matters.