Anthropic LLM
Category: AI & ML
Node id: anthropic-llm
Anthropic Claude LLM inference with streaming and extended thinking support
What it does
- Anthropic Claude API integration with streaming support
- Extended thinking (reasoning content) extraction
- Multi-turn conversation support
- Prompt caching with cache hit/creation token tracking
- Custom base URL for API-compatible endpoints
- System prompt customization
Use cases
- Production inference via Claude models (Sonnet, Opus, Haiku)
- Complex reasoning tasks leveraging extended thinking
- Streaming chat with real-time token delivery
- Multi-turn clinical or analytical conversations
Runtime
- Performance tier:
variable
Input ports
| Name | Type | Required | Description |
|---|---|---|---|
prompt | text | No | Single user prompt |
messages | json | No | Multi-turn conversation messages array |
Output ports
| Name | Type | Required | Description |
|---|---|---|---|
result | json | No | Main result containing response, finish_reason, and reasoning |
metadata | json | No | Execution metadata including tokens, chunk_count, stream, and stop_reason |
success | boolean | No | Whether the operation succeeded |
Settings
Basic
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Model | model | string | Yes | claude-3-5-sonnet-20241022 | Anthropic model name | |
| System Prompt | system_prompt | text | No | "" | System prompt to prepend | |
| Stream | stream | boolean | No | false | Enable streaming responses |
Auth
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| API Key | api_key | secret | No | Anthropic API key (or set ANTHROPIC_API_KEY env var) | ||
| Base URL | base_url | string | No | "" | Custom API base URL |
Advanced
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Temperature | temperature | number | No | 1 | min 0; max 1 | Sampling temperature |
| Max Tokens | max_tokens | number | No | 4096 | min 1 | Maximum tokens to generate |
| Top P | top_p | number | No | 1 | min 0; max 1 | Nucleus sampling parameter |
Errors
| Code | Description |
|---|---|
API_KEY_MISSING | Anthropic API key not found in config or ANTHROPIC_API_KEY env var |
MODEL_REQUIRED | Model name must be specified |
API_CALL_FAILED | Anthropic API request returned an error |
INPUT_REQUIRED | Either prompt or messages input must be provided |
Runtime notes
- result.reasoning is only present when the model returns extended thinking content — check for its existence before wiring
- When stream=true, metadata.chunks contains an array of deltas; when false, chunk_count is 0
- API key falls back to ANTHROPIC_API_KEY env var if not set in config
- Provide either prompt (single turn) or messages (multi-turn) — not both; prompt is wrapped with an optional system message
See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.
Etwas unklar? Senden Sie Feedback zur Dokumentation per E-Mail..