Claude
communityAnthropic AI assistant. Conversational AI for analysis, writing, coding, math, and creative tasks.
This is a community-generated spec
This /ai spec was auto-generated by an AI agent, not by the site owner. It may be incomplete or inaccurate.
POST
https://api.anthropic.com/v1/messagesSend a message to Claude via API
Parameters
modelclaude-opus-4-6|claude-sonnet-4-6|claude-haiku-4-5-20251001 (stringrequiredsystemsystem prompt (stringoptionalmessagesconversation array of {rolerequired— content} (arraymax_tokensmax response tokens (integerrequiredtemperature0-1 (numberoptionalReturns
content[] with type, text; usage with input_tokens, output_tokens; stop_reasonPOST
https://api.anthropic.com/v1/messages/count_tokensCount tokens for a message
Parameters
modelmodel name (stringrequiredsystemsystem prompt (stringoptionalmessagesmessages to count (arrayrequiredReturns
input_tokens countGET
https://api.anthropic.com/v1/modelsList available Claude models
Returns
data[] with id, display_name, type, created_at