Skip to main content

Anthropic AI

Anthropic AI provides access to Claude, a powerful and safe large language model (LLM). The Anthropic API enables developers to integrate Claude's capabilities into applications for text generation, conversation, and analysis. This connector allows you to send prompts to Claude and receive AI-generated responses, making it ideal for building AI-powered applications, chatbots, content generation systems, and data analysis tools.

Anthropic AI icon

Power end-to-end data operations for your Anthropic AI API with Nexla. Our bi-directional Anthropic AI connector is purpose-built for Anthropic AI, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Anthropic AI or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Anthropic AI workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

Before creating an Anthropic AI credential, you'll need to obtain API credentials from Anthropic. The Anthropic API uses API key authentication with additional version headers.

To obtain the required API credentials for Anthropic:

  1. Sign in to Anthropic Console: Navigate to https://console.anthropic.com/ and sign in to your Anthropic account. If you don't have an account, you can create one by clicking Sign up and following the registration process.

  2. Access Account Settings: Once signed in, navigate to Account Settings in the Anthropic console. You can access this from the account menu or dashboard.

  3. Generate API Keys: In Account Settings, navigate to the API Keys section. Click the Create Key button to generate a new API key. Provide a name for the key to help identify its purpose (e.g., "Nexla Integration").

  4. Copy API Key: After creation, copy the API key immediately. Anthropic API keys are only displayed once for security reasons. Store this key securely, as you'll need it when creating the credential in Nexla.

Anthropic also supports workspaces to segment API keys and control spend by use case. You can organize your API keys within different workspaces for better management and billing control.

Anthropic API keys are sensitive credentials that provide access to your Anthropic account and API usage. Keep these keys secure and never share them publicly or commit them to version control systems.

The Anthropic API requires the following configuration:

  • Base URL: The base URL for Anthropic API requests. The default is https://api.anthropic.com.
  • API Version: The API version to use for requests. The default is v1.
  • Anthropic Version: The anthropic-version header value that specifies the API version format. This is required for all API requests and should match the API version you're using (e.g., 2023-06-01 for v1 API).

All requests to the Anthropic API must include the x-api-key header with your API key. The API accepts JSON in request bodies and returns JSON in response bodies, so ensure you send the Content-Type: application/json header in requests.

For complete information about Anthropic API authentication and getting started, see the Anthropic API Getting Started Documentation.

Authenticate

Credentials required

An authentication method that requires sending a unique secret token with each API request on Anthropic

FieldRequiredSecretDescription
API Key ValueYesYesAn encoded string value used as a secret token to authenticate API requests on Anthropic.
Base URLYesYesPlease enter the base URL for your Anthropic API account.
API VersionYesYesPlease enter the API version for your Anthropic API requests.
Anthropic VersionYesYesPlease enter the Anthropic version to pass in the header for your API requests.

Create a credential in Nexla

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

New Credential Overlay – Anthropic AI

AnthropicCred.png
  1. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  2. API Key Value: Enter your Anthropic API key in the API Key Value field. This is the secret token that authenticates your application with the Anthropic API. You can obtain this key from the Anthropic console under API Keys.

  3. Base URL: Enter the base URL for your Anthropic API requests in the Base URL field. The default value is https://api.anthropic.com. This should match the Anthropic API endpoint you're using.

  4. API Version: Enter the API version for your Anthropic API requests in the API Version field. The default value is v1. This version determines which API endpoints and features are available.

  5. Anthropic Version: Enter the anthropic-version header value in the Anthropic Version field. This header is required for all Anthropic API requests and specifies the API version format. The value should match the API version you're using (e.g., 2023-06-01 for v1 API). This header is sent as anthropic-version in the request headers. For complete information about versioning, see the Anthropic API Versioning Documentation.

    The API key is sensitive information that should be kept secure. Nexla will store this credential securely and use it only for API authentication purposes. The Anthropic-Version header is required for all API requests and must match a supported API version format.

  6. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Anthropic AI connector tile, then select the credential that will be used to connect to the Anthropic AI instance, and click Next; or, create a new Anthropic AI credential for use in this flow. Anthropic AI data sources can ingest data from Anthropic's Claude API, allowing you to retrieve model information, message batches, and other API responses—useful for extracting AI model metadata, tracking message batch status, or analyzing API usage patterns.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Anthropic AI endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

List models

This endpoint retrieves a list of all available Claude models in the Anthropic API. Use this endpoint when you need to discover available models, check model capabilities, or build dynamic workflows that operate on multiple models.

  • This endpoint automatically retrieves all available Claude models. No additional configuration is required beyond selecting this endpoint template.
  • Enter a schedule in the Schedule field to specify when this data source should run. The schedule uses cron expression format (e.g., 0 6 * * * for daily at 6 AM).
  • The endpoint returns model metadata including model names, IDs, and capabilities. The response includes models from the Claude family such as Claude Haiku, Sonnet, and Opus.

This endpoint is useful for discovering available models before configuring more specific endpoints. The returned data includes model identifiers that can be used as input for other Anthropic API endpoints. For complete information about listing models, see the Anthropic Models API Documentation.

Get model

This endpoint retrieves detailed information about a specific Claude model. Use this endpoint when you need detailed model metadata, capabilities, or configuration information for a particular model.

  • Enter the model identifier in the Model field. This should be the exact model name (e.g., claude-3-5-sonnet-20241022). You can find available model names by using the "List models" endpoint first.
  • Enter a schedule in the Schedule field to specify when this data source should run. The schedule uses cron expression format.
  • The endpoint returns detailed model information including model ID, name, and specific capabilities.

Model identifiers are specific to each Claude model version. Ensure you have the correct model identifier before configuring this endpoint. For complete information about model details, see the Anthropic Models API Documentation.

Get message batch

This endpoint retrieves the status and results of a message batch from Anthropic's API. Use this endpoint when you need to check the status of batch message processing or retrieve batch results.

  • Enter the message batch ID in the Message Batch ID field. This ID is returned when you create a message batch using the Anthropic API.
  • Enter a schedule in the Schedule field to specify when this data source should run. The schedule uses cron expression format.
  • The endpoint returns batch status information including processing status, completion time, and any errors that occurred during processing.

Message batch IDs are unique identifiers returned when creating message batches. You can obtain batch IDs from the response when creating batches through the Anthropic API. For complete information about message batches, see the Anthropic Messages API Documentation.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

Anthropic AI data sources can also be manually configured to ingest data from any valid Anthropic AI API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

Anthropic API URLs typically follow the format: https://api.anthropic.com/v1/models for listing models, or https://api.anthropic.com/v1/models/{model_id} for specific model details. Replace {model_id} with the actual model identifier. For the Response Data Path, use $.data[*] to extract individual model objects from list models responses, or $ to extract the entire object from single model responses. You do not need to include authentication headers (x-api-key and anthropic-version) as these are automatically included from your credentials. For complete information about Anthropic API endpoints, see the Anthropic API Getting Started Documentation.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Anthropic AI data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.

Use as a destination

Click the + icon on the Nexset that will be sent to the Anthropic AI destination, and select the Send to Destination option from the menu. Select the Anthropic AI connector from the list of available destination connectors, then select the credential that will be used to connect to the Anthropic AI organization, and click Next; or, create a new Anthropic AI credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Anthropic AI endpoints. Select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

Multiple conversational turns

This endpoint sends messages to Claude for multi-turn conversations. Use this endpoint when you need to have extended conversations with Claude, maintain conversation context, or build interactive AI applications.

  • This endpoint sends data to Claude's message API for conversational interactions. The request body should contain the message content in JSON format following Anthropic's message API structure.
  • The endpoint supports multi-turn conversations by maintaining conversation history in the request payload.
  • Each record in your Nexset will be sent as a separate message to Claude, and the response will be returned for each message.

The request body should follow Anthropic's message API format, including model selection, message content, and optional parameters like max_tokens. For complete information about the messages endpoint, see the Anthropic Messages API Documentation.

Count message tokens

This endpoint counts the number of tokens in a message before sending it to Claude. Use this endpoint when you need to estimate token usage, validate message length, or optimize API costs.

  • This endpoint sends message content to Anthropic's token counting API. The request body should contain the message content in JSON format.
  • The endpoint returns the token count for the provided message, allowing you to estimate API usage and costs before making actual API calls.
  • Each record in your Nexset will be processed to count tokens, and the token count will be returned for each message.

Token counting helps estimate API costs and ensure messages fit within model context limits. For complete information about token counting, see the Anthropic Messages Count Tokens API Documentation.

Create message batch

This endpoint creates a batch of messages for asynchronous processing. Use this endpoint when you need to process large volumes of messages efficiently or when you want to queue messages for later processing.

  • This endpoint sends message batch data to Anthropic's batch API. The request body should contain the batch configuration and messages in JSON format following Anthropic's batch API structure.
  • The endpoint creates a batch job that will be processed asynchronously. You can check the batch status using the "Get message batch" source endpoint.
  • Each record in your Nexset will be included in the batch, and a batch ID will be returned for tracking the batch status.

Message batches are useful for processing large volumes of messages efficiently. The batch API returns a batch ID that can be used to check processing status. For complete information about creating message batches, see the Anthropic Creating Message Batches API Documentation.

Delete message batch

This endpoint deletes a message batch from Anthropic's API. Use this endpoint when you need to cancel or remove a batch that is no longer needed.

  • Enter the message batch ID in the Message Batch ID field. This ID is returned when you create a message batch using the "Create message batch" endpoint.
  • The endpoint sends a DELETE request to remove the specified batch from Anthropic's system.
  • Once deleted, the batch cannot be recovered, and any pending processing will be cancelled.

Message batch IDs are unique identifiers returned when creating batches. Ensure you have the correct batch ID before deleting. For complete information about deleting message batches, see the Anthropic Deleting Message Batches API Documentation.

Manual configuration

Anthropic AI destinations can also be manually configured to send data to any valid Anthropic AI API endpoint. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, attribute exclusions, record batching, and response webhooks.

The Anthropic API accepts JSON in request bodies and returns JSON in response bodies, so select JSON as the content format for Anthropic API destinations. Anthropic API URLs typically follow the format: https://api.anthropic.com/v1/messages for sending messages, or https://api.anthropic.com/v1/messages/batches/{batch_id} for batch operations—replace {batch_id} with the actual batch identifier. For update/delete operations, include the ID of the object to be updated or deleted at the end of the URL. You do not need to include authentication headers (x-api-key and anthropic-version) as these are automatically included from your credentials. For complete information about Anthropic API endpoints, see the Anthropic API Getting Started Documentation.

Save & activate

Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To send the data to the configured Anthropic AI endpoint, open the destination resource menu, and select Activate.

The Nexset data will not be sent to the Anthropic AI endpoint until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.