Anthropic Claude API Connector Guide

The Anthropic Claude connector lets Tealfabric workflows generate, classify, and summarize content using Claude models through a message-based API. It is best suited for automation where you need predictable instruction following, controlled token usage, and clear operational handling for retries and model selection.

Document information
FieldValue
Canonical URL/docs/04_connecting-systems/connectors/a/anthropic-claude
Version (published date)2026-05-08
Tagsconnectors, reference, anthropic-claude
Connector IDanthropic-claude-1.0.0

Anthropic Claude connector flow showing API-key authentication, structured message requests, and workflow-safe AI responses for classification and summarization tasks.

Configuration and authentication

Configure the connector with your Anthropic credentials and default model settings so each workflow run starts with a safe baseline. The connector uses API key authentication, which means every request must include a valid key and version header.

  • api_key (required): Anthropic API key from the Anthropic Console.
  • api_version (optional): default 2023-06-01.
  • model (optional): default claude-3-sonnet-20240229.
  • timeout_seconds (optional): request timeout for long responses.

Use the test operation after configuration to confirm connectivity before enabling production automations.

Generate responses with chat

Use chat for non-streaming completion steps where a workflow needs a final answer before moving forward. Keep prompts task-specific and set token limits to control cost and latency.

const baseUrl = "https://api.example.com/api/v1";
const tenantId = "<TENANT_ID>";
const apiKey = "<API_KEY>";

async function classifySupportTicket(integrationId: string, message: string) {
  const response = await fetch(`${baseUrl}/integrations/${encodeURIComponent(integrationId)}/execute`, {
    method: "POST",
    headers: {
      "X-API-Key": apiKey,
      "X-Tenant-ID": tenantId,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      operation: "chat",
      model: "claude-3-sonnet-20240229",
      system: "Classify support tickets into Billing, Technical, or Account.",
      messages: [{ role: "user", content: message }],
      max_tokens: 250,
      temperature: 0.2,
    }),
  });
  if (!response.ok) throw new Error(`Request failed: ${response.status}`);
  const payload = await response.json();
  const blocks = payload?.data?.response?.content ?? [];
  return blocks
    .filter((block: { type?: string; text?: string }) => block?.type === "text" && typeof block?.text === "string")
    .map((block: { text: string }) => block.text)
    .join("\n");
}
curl -X POST "https://api.example.com/api/v1/integrations/<ENTITY_ID>/execute" \
  -H "X-API-Key: <API_KEY>" \
  -H "X-Tenant-ID: <TENANT_ID>" \
  -H "Content-Type: application/json" \
  -d '{
    "operation": "chat",
    "model": "claude-3-sonnet-20240229",
    "system": "Classify support tickets into Billing, Technical, or Account.",
    "messages": [{"role":"user","content":"Customer cannot access invoices after plan change."}],
    "max_tokens": 250,
    "temperature": 0.2
  }'
{
  "success": true,
  "data": {
    "message_count": 1,
    "response": {
      "id": "msg_01...",
      "type": "message",
      "role": "assistant",
      "content": [
        {
          "type": "text",
          "text": "Category: Billing. Reason: invoice access changed after plan transition."
        }
      ],
      "model": "claude-3-sonnet-20240229"
    },
    "tokens": {
      "input_tokens": 46,
      "output_tokens": 24,
      "total_tokens": 70
    }
  },
  "metadata": {
    "processing_time_ms": 412
  }
}

Stream long responses with stream

Use stream when users or downstream systems benefit from partial output as it is generated, such as draft generation or long summarization tasks. The parameter model is aligned with chat, but response delivery is incremental.

const baseUrl = "https://api.example.com/api/v1";
const tenantId = "<TENANT_ID>";
const apiKey = "<API_KEY>";

async function startStreamingSummary(integrationId: string) {
  const response = await fetch(`${baseUrl}/integrations/${encodeURIComponent(integrationId)}/execute`, {
    method: "POST",
    headers: {
      "X-API-Key": apiKey,
      "X-Tenant-ID": tenantId,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      operation: "stream",
      model: "claude-3-haiku-20240307",
      messages: [{ role: "user", content: "Summarize the attached incident report in 6 bullet points." }],
      max_tokens: 600,
    }),
  });
  if (!response.ok) throw new Error(`Request failed: ${response.status}`);
  return response.json();
}
curl -X POST "https://api.example.com/api/v1/integrations/<ENTITY_ID>/execute" \
  -H "X-API-Key: <API_KEY>" \
  -H "X-Tenant-ID: <TENANT_ID>" \
  -H "Content-Type: application/json" \
  -d '{
    "operation": "stream",
    "model": "claude-3-haiku-20240307",
    "messages": [{"role":"user","content":"Summarize the attached incident report in 6 bullet points."}],
    "max_tokens": 600
  }'
{
  "success": true,
  "data": {
    "message": "Streaming started",
    "execution_id": "<ENTITY_ID>"
  },
  "metadata": {
    "processing_time_ms": 133
  }
}

Reliability and model strategy

For predictable production behavior, validate API keys early, enforce retry with exponential backoff on 429 and timeout failures, and choose model tiers by task complexity instead of defaulting to the most expensive model. The connector also applies a legacy-compatible in-process throttle of 60 requests per 60-second window before executing API calls. Haiku is typically best for fast classification, Sonnet for balanced general automation, and Opus for specialized high-complexity reasoning.

This strategy helps teams keep response quality high while controlling latency and operating cost.

Additional resources