| Parameter | Purpose |
|---|---|
| model | Which Claude model to use (claude-opus-4-5, claude-sonnet-4-5...) |
| messages | Conversation history as a list of role/content pairs |
| system | System prompt — sets the model's role and instructions |
| max_tokens | Maximum tokens in the response |
| temperature | Randomness of output (0–1) |
| tools | Tool definitions for function calling |
| stream | Whether to stream the response token by token |
content — list of content blocks (text or tool_use)stop_reason — "end_turn", "tool_use", "max_tokens"usage — input_tokens and output_tokens for cost tracking