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.

In more detail

Every call is stateless, so the client resends the conversation each turn. Replies arrive as a list of typed content blocks, such as text, tool_use and thinking, which code should join or dispatch by type rather than assume a single string.

Related terms

Taught in

References

Certification courses