Skip to main content

Anthropic Component

Interact with Anthropic's Claude models

Component key: anthropic

Description

Anthropic is an artificial intelligence research company that provides various AI systems and large language models. Use the component to generate chat responses from the models offered from Anthropic.

API Documentation

This component was built using the Anthropic Typescript SDK.

Connections

Anthropic API

To generate an API key:

  1. Navigate to API Keys and select create key
  2. Enter the API key value into the connection configuration of the integration.
InputNotes
API Key
password
/ Required
apiKey
Your Anthropic API key.

Data Sources

List Models

List all available Claude models | key: selectModel | type: picklist

InputNotes
Connection
connection
/ Required
connection
Anthropic API connection.

{
"result": [
{
"key": "claude-3-7-sonnet-20250219",
"label": "Claude 3.7 Sonnet"
}
]
}

Actions

Chat

Start a new conversation with Claude | key: chat

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
Anthropic API connection.
 
Message
string
/ Required
initialMessage
The message to send in the conversation.
What is the capital of France?
Max Tokens
string
maxTokens
4096
Maximum number of tokens to generate (default: 4096).
1000
Model
string
/ Required
model
claude-3-5-sonnet-latest
The Claude model to use.
claude-3-opus-20240229
System Prompt
string
systemPrompt
Optional system prompt to set the context and behavior for the chat.
You are a helpful AI assistant that specializes in answering questions about science.
Temperature
string
temperature
1
Randomness of the output (0-1, default: 1).
0.7

{
"data": {
"content": [
{
"text": "Hi! My name is Claude.",
"type": "text"
}
],
"id": "msg_013Zva2CMHLNnXjNJJKqJ2EF",
"model": "claude-3-7-sonnet-20250219",
"role": "assistant",
"stop_reason": "end_turn",
"stop_sequence": null,
"type": "message",
"usage": {
"input_tokens": 2095,
"output_tokens": 503
}
}
}

Count Tokens

Count the number of tokens in a message or conversation | key: countTokens

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
Anthropic API connection.
 
Message
string
/ Required
message
The message to send in the conversation.
What is the capital of France?
Model
string
/ Required
model
claude-3-5-sonnet-latest
The Claude model to use.
claude-3-opus-20240229

{
"data": {
"input_tokens": 100
}
}

Get Model

Get details of a specific Claude model | key: getModel

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
Anthropic API connection.
 
Model
string
/ Required
model
claude-3-5-sonnet-latest
The Claude model to use.
claude-3-opus-20240229

{
"data": {
"created_at": "2025-02-19T00:00:00Z",
"display_name": "Claude 3.7 Sonnet",
"id": "claude-3-7-sonnet-20250219",
"type": "model"
}
}

List Models

List all available Claude models | key: listModels

InputDefaultNotesExample
After ID
string
afterId
ID of the object to use as a cursor for pagination. Returns the page of results immediately after this object.
msg_123456789
Before ID
string
beforeId
ID of the object to use as a cursor for pagination. Returns the page of results immediately before this object.
msg_123456789
Connection
connection
/ Required
connection
 
Anthropic API connection.
 
Fetch All
boolean
fetchAll
false
Fetch all paginated results. Turning this On will ignore the Limit, After ID, and Before ID inputs.
 
Limit
string
/ Required
limit
20
Number of items to return per page. Defaults to 20. Range: 1-3.
10

{
"data": {
"data": [
{
"created_at": "2025-02-19T00:00:00Z",
"display_name": "Claude 3.7 Sonnet",
"id": "claude-3-7-sonnet-20250219",
"type": "model"
}
],
"first_id": "<string>",
"has_more": true,
"last_id": "<string>"
}
}

Raw Request

Send raw HTTP request to Anthropic | key: rawRequest

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
Anthropic API connection.
 
Data
string
data
The HTTP body payload to send to the URL.
{"exampleKey": "Example Data"}
File Data
string
Key Value List
fileData
File Data to be sent as a multipart form upload.
[{key: "example.txt", value: "My File Contents"}]
File Data File Names
string
Key Value List
fileDataFileNames
File names to apply to the file data inputs. Keys must match the file data keys above.
 
Form Data
string
Key Value List
formData
The Form Data to be sent as a multipart form upload.
[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header
string
Key Value List
headers
A list of headers to send with the request.
User-Agent: curl/7.64.1
Max Retry Count
string
maxRetries
0
The maximum number of retries to attempt. Specify 0 for no retries.
 
Method
string
/ Required
method
The HTTP method to use.
 
Query Parameter
string
Key Value List
queryParams
A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
 
Response Type
string
/ Required
responseType
json
The type of data you expect in the response. You can request json, text, or binary data.
 
Retry On All Errors
boolean
retryAllErrors
false
If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors.
 
Retry Delay (ms)
string
retryDelayMS
0
The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.
 
Timeout
string
timeout
The maximum time that a client will await a response to its request
2000
URL
string
/ Required
url
/models
Input the path only (/models), The base URL is already included (https://api.anthropic.com/v1). For example, to connect to https://api.anthropic.com/v1/models, only /models is entered in this field.
/models
Use Exponential Backoff
boolean
useExponentialBackoff
false
Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.