Class BedrockMantleBackend

  • All Implemented Interfaces:
    com.anthropic.backends.Backend

    
    public final class BedrockMantleBackend
     implements Backend
                        

    The Bedrock Mantle backend that manages the AWS credentials or API key required to access Anthropic's AI models via the Bedrock Mantle service and signs requests using AWS SigV4.

    Only the Messages API (/v1/messages) and its subpaths are supported on Bedrock Mantle.

    Unless using an API key, requests are cryptographically signed using credentials issued by AWS. These can be provided via system properties, environment variables, or other AWS facilities. They can be resolved automatically by the default AWS provider chain by calling Builder.fromEnv. Alternatively, a custom AWS credentials provider can be configured on the builder.

    If using an API key, the key can be set directly, or provided via the AWS_BEARER_TOKEN_BEDROCK environment variable (falls back to ANTHROPIC_AWS_API_KEY).

    Both the credentials (or API key) and the region can be resolved independently and passed to Builder.awsCredentials (or Builder.apiKey) and Builder.region should an alternative method of resolution be required.

    See the AWS documentation for details on how to configure AWS credentials.