Class AnthropicApi

java.lang.Object
org.springframework.ai.anthropic.api.AnthropicApi

public class AnthropicApi extends Object
The Anthropic API client.
Since:
1.0.0
Author:
Christian Tzolov, Mariusz Bernacki, Thomas Vitale, Jihoon Kim
  • Field Details

  • Constructor Details

    • AnthropicApi

      public AnthropicApi(String anthropicApiKey)
      Create a new client api with DEFAULT_BASE_URL
      Parameters:
      anthropicApiKey - Anthropic api Key.
    • AnthropicApi

      public AnthropicApi(String baseUrl, String anthropicApiKey)
      Create a new client api.
      Parameters:
      baseUrl - api base URL.
      anthropicApiKey - Anthropic api Key.
    • AnthropicApi

      public AnthropicApi(String baseUrl, String anthropicApiKey, String anthropicVersion, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder, org.springframework.web.client.ResponseErrorHandler responseErrorHandler)
      Create a new client api.
      Parameters:
      baseUrl - api base URL.
      anthropicApiKey - Anthropic api Key.
      restClientBuilder - RestClient builder.
      webClientBuilder - WebClient builder.
      responseErrorHandler - Response error handler.
    • AnthropicApi

      public AnthropicApi(String baseUrl, String anthropicApiKey, String anthropicVersion, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, String anthropicBetaFeatures)
      Create a new client api.
      Parameters:
      baseUrl - api base URL.
      anthropicApiKey - Anthropic api Key.
      anthropicVersion - Anthropic version.
      restClientBuilder - RestClient builder.
      webClientBuilder - WebClient builder.
      responseErrorHandler - Response error handler.
      anthropicBetaFeatures - Anthropic beta features.
  • Method Details