Message generation (Messages)

Use the Anthropic Messages protocol to generate a reply. Before generation, you can count the tokens in the input messages with the token-counting endpoint, which does not generate a reply.

Choose a task

Task

Page

Description

Create a Message

Create a Message

Generate a reply using the Anthropic Messages format and receive text or thinking blocks.

Count input tokens

Count input tokens

Count input tokens for a Messages request without generating a reply.

Last updated on