# 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](../text-generation/anthropic-messages.md) | Generate a reply using the Anthropic Messages format and receive text or thinking blocks. |
| Count input tokens | [Count input tokens](../text-generation/count-tokens.md) | Count input tokens for a Messages request without generating a reply. |

```{toctree}
:hidden:
:maxdepth: 1

Create a Message <../text-generation/anthropic-messages>
Count input tokens <../text-generation/count-tokens>
```
