content block
One typed piece of a message, such as text, an image, a tool call, a tool result or a thinking block.
In more detail
Both requests and replies carry lists of content blocks. Read replies by block type, join text blocks rather than assuming there is only one, and when streaming, rebuild each block from its start, delta and stop events by index.
Related terms
- Messages API — Anthropic's main API for Claude: you send a model name, an optional system prompt and a list of messages, and get back content blocks, a stop reason and usage.
- tool call — A model's structured request to run one tool with given arguments, returned instead of, or alongside, text.
- multimodal model — A model that accepts or produces more than one kind of data, such as text, images and audio.
Taught in
- The Request And The Response — AI Engineering: LLM Apps, RAG & Agents
- Streaming Responses — AI Engineering: LLM Apps, RAG & Agents
- Grounded Answers With Citations — AI Engineering: LLM Apps, RAG & Agents
- Images, Audio And Speech — AI Engineering: LLM Apps, RAG & Agents
References
- Anthropic: Messages API reference (temperature, top_k, top_p, stop_sequences, stop_reason)
- Anthropic: Streaming Messages