Claude Format - Tool Calling Messages
- Generic Anthropic Messages API reference with tool calling for all compatible models
- Tool calling: supports Function Calling with tool definitions
- Multimodal input: supports text + image mixed input
- Extended thinking: supports thinking/reasoning mode
- Supports streaming and non-streaming responses
Authorizations
All APIs require Bearer Token authentication
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
Model name, e.g. claude-sonnet-4-6
"claude-sonnet-4-6"
List of messages in the conversation
Maximum number of tokens to generate (required)
System prompt
Sampling temperature (0-1)
0 <= x <= 1Nucleus sampling parameter (0-1)
0 <= x <= 1Top-K sampling parameter
Whether to stream the response
Custom stop sequences that will cause the model to stop generating
List of tools the model may use
How the model should use the provided tools
Request metadata
Response
Claude Messages API response
Unique message ID
"msg_abc123"
Object type
message Role
assistant Response content blocks
Model used
Reason the generation stopped
end_turn, max_tokens, stop_sequence, tool_use "end_turn"
Token usage statistics