Claude · Arazzo Workflow
Claude Count Tokens Then Create Message
Version 1.0.0
Pre-flight a prompt through token counting before sending it to the Messages API.
View Spec
View on GitHub
Artificial IntelligenceChatbotsConversational AIGenerative AILarge Language ModelsMachine-LearningNatural Language ProcessingArazzoWorkflows
Provider
Workflows
count-tokens-then-create-message
Count input tokens for a prompt, then generate a message with the same prompt.
Counts the input tokens for a model and prompt, then sends the prompt to the Messages API, returning both the pre-flight token count and the generated message usage.
1
countTokens
Count the number of input tokens the prompt will consume for the chosen model, without creating a message.
2
createMessage
Send the same prompt to the Messages API now that its token footprint is known, capturing the generated content and usage.
Source API Descriptions
Arazzo Workflow Specification
Work with this as data
Every workflow here is available over the APIs.io API and to AI agents over MCP.