Skip to main content

Anthropic Component

Interact with Anthropic's Claude models

Component key: anthropic

Changelog ↓

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.
InputNotesExample
API Key

Your Anthropic API key.

Data Sources

List Models

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

InputNotesExample
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

InputNotesExample
Connection

Anthropic API connection.

Message

The message to send in the conversation.

What is the capital of France?
Max Tokens

Maximum number of tokens to generate (default: 4096).

1000
Model

The Claude model to use.

claude-3-opus-20240229
System Prompt

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

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

InputNotesExample
Connection

Anthropic API connection.

Message

The message to send in the conversation.

What is the capital of France?
Model

The Claude model to use.

claude-3-opus-20240229

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

Get Model

Get details of a specific Claude model | key: getModel

InputNotesExample
Connection

Anthropic API connection.

Model

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

InputNotesExample
After ID

ID of the object to use as a cursor for pagination. Returns the page of results immediately after this object.

msg_123456789
Before ID

ID of the object to use as a cursor for pagination. Returns the page of results immediately before this object.

msg_123456789
Connection

Anthropic API connection.

Fetch All

Fetch all paginated results. Turning this On will ignore the Limit, After ID, and Before ID inputs.

false
Limit

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

InputNotesExample
Connection

Anthropic API connection.

Data

The HTTP body payload to send to the URL.

{"exampleKey": "Example Data"}
File Data

File Data to be sent as a multipart form upload.

[{key: "example.txt", value: "My File Contents"}]
File Data File Names

File names to apply to the file data inputs. Keys must match the file data keys above.

Form Data

The Form Data to be sent as a multipart form upload.

[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header

A list of headers to send with the request.

User-Agent: curl/7.64.1
Max Retry Count

The maximum number of retries to attempt. Specify 0 for no retries.

0
Method

The HTTP method to use.

Query Parameter

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

The type of data you expect in the response. You can request json, text, or binary data.

json
Retry On All Errors

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.

false
Retry Delay (ms)

The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.

0
Timeout

The maximum time that a client will await a response to its request

2000
URL

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

Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.

false

Changelog

2025-05-21

Initial release of Anthropic component with AI chat completion, token counting, and model management capabilities.