Reference

API glossary

8 exam-critical terms in the API category. See all categories →

AllAPIAgenticPromptClaude CodeTool DesignMCPContext

Token

API

The 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

API

Max tokens the model considers per call. Claude models today have ~200K windows. Includes system prompt, history, tool results, and output room.

stop_reason

API

Field 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

API

A 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

API

A 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

API

Controls 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

API

Built-in capability where Claude reasons in a dedicated internal channel before answering. Different from CoT prompting (a technique). Use for complex problems.

Batch API

API

Async, high-volume, cheaper per-token API. For latency-tolerant workloads (overnight reports, bulk extraction). NOT for blocking pre-merge checks where latency matters.