Anthropic · Arazzo Workflow
Anthropic Count Tokens Then Create Message
Version 1.0.0
Estimate input token usage for a prompt, then send the message only when it fits a budget.
View Spec
View on GitHub
AIArtificial IntelligenceClaudeFoundation ModelsLarge Language ModelsMachine LearningMCPAgentsArazzoWorkflows
Provider
Workflows
count-tokens-then-message
Count input tokens for a prompt and conditionally create the message.
Calls Count Message Tokens to estimate the prospective input token total, and only proceeds to Create Message when that total is at or below the supplied token budget.
1
countTokens
countMessageTokens
Count the input tokens for the prospective message request without creating the message or charging output tokens.
2
createMessage
createMessage
Send the prompt as a real message now that the input token total is known to be within budget, and capture the generated response.
Source API Descriptions
openapi