Skip to main content

Overview

Anthropic Claude integration provides access to Claude 3.5 Sonnet, Claude 3 Opus, Haiku, and other models through the Messages API. Supports advanced features like extended thinking, tool use, and vision.

Setup

1

Get API Key

Sign up at Anthropic Console and create an API key
2

Add Credential

In Flowise, go to Credentials and create a new Anthropic API credential
3

Add to Canvas

Drag the ChatAnthropic node from the Chat Models category to your canvas

Configuration

Basic Parameters

credential
credential
required
Your Anthropic API credential containing the API key
modelName
string
default:"claude-3-haiku"
The Claude model to use:
  • claude-3-5-sonnet-latest - Most capable model
  • claude-3-5-haiku-latest - Fast and cost-effective
  • claude-3-opus-latest - Previous generation flagship
  • claude-3-sonnet - Balanced performance
  • claude-3-haiku - Fastest responses
temperature
number
Controls randomness in responses (0.0 to 1.0). Lower = more focused, higher = more creative
streaming
boolean
default:true
Enable streaming for real-time response generation

Advanced Parameters

maxTokensToSample
number
Maximum number of tokens to generate. Claude supports up to 4096 output tokens
topP
number
Nucleus sampling threshold (0.0 to 1.0). Use this OR temperature, not both
topK
number
Sample from the top K options for each token. Reduces variety of responses

Extended Thinking (Reasoning)

Extended thinking is available for Claude 3.5 Sonnet and Claude 4 models, enabling deeper reasoning capabilities.
extendedThinking
boolean
default:false
Enable extended thinking mode for reasoning-intensive tasks
budgetTokens
number
default:1024
Maximum tokens Claude can use for internal reasoning process (1-10000)

Vision Support

allowImageUploads
boolean
default:false
Enable image analysis for vision-capable Claude models

Usage Examples

Basic Configuration

// Standard chat configuration
Model Name: claude-3-5-sonnet-latest
Temperature: 0.7
Max Tokens: 2048
Streaming: true

Extended Thinking Mode

// For complex reasoning tasks
Model Name: claude-3-5-sonnet-latest
Extended Thinking: true
Budget Tokens: 4096
Temperature: 0.3  // Lower for more focused reasoning

Vision-Enabled Chat

// Analyze images
Model Name: claude-3-5-sonnet-latest
Allow Image Uploads: true
Max Tokens: 2048

Tool Use Agent

// Optimal settings for function calling
Model Name: claude-3-5-sonnet-latest
Temperature: 0.1
Top K: 1
Max Tokens: 4096

Extended Thinking Deep Dive

When extended thinking is enabled, Claude uses a separate “thinking” process before generating the final response.
{
  "thinking": {
    "process": "Internal reasoning steps...",
    "tokens_used": 512
  },
  "response": "Final answer based on thinking..."
}
Budget Tokens Guidelines:
  • 1024-2048: Quick reasoning tasks
  • 2048-4096: Moderate complexity problems
  • 4096-8192: Complex analysis and planning
  • 8192+: Advanced research and multi-step reasoning
Extended thinking tokens count against your total API usage but provide transparency into Claude’s reasoning process.

Best Practices

Model Selection

  • Use Sonnet 3.5 for most production workloads
  • Use Haiku 3.5 for high-volume, simple tasks
  • Use Opus when you need maximum capability

Extended Thinking

  • Enable for math, coding, and analysis
  • Set budget tokens based on task complexity
  • Monitor token usage in responses

Performance

  • Enable streaming for better UX
  • Use appropriate max tokens
  • Consider caching for repeated queries

Cost Optimization

  • Start with Haiku for testing
  • Use Sonnet for production
  • Monitor extended thinking token usage

Claude vs GPT Comparison

FeatureClaude 3.5 SonnetGPT-4o
Context Window200K tokens128K tokens
Output Tokens4K-8K4K-16K
Extended ThinkingYesReasoning (o1 models)
VisionYesYes
Tool UseYesFunction Calling
Best ForAnalysis, writingCreative tasks, coding

Common Issues

Anthropic has different rate limits per tier:
  • Free tier: 5 requests/minute
  • Build tier: 50 requests/minute
  • Scale tier: Custom limits
Solution: Implement exponential backoff and monitor usage
Extended thinking requires:
  • Claude 3.5 Sonnet or Claude 4
  • Extended thinking parameter enabled
  • Sufficient budget tokens allocated
Claude supports large contexts but has limits:
  • Monitor conversation length
  • Implement summarization for long chats
  • Use appropriate models (200K context)

Build docs developers (and LLMs) love