AnthropicOptions
Namespace: Vercel.AI.Anthropic
public class AnthropicOptionsAnthropic Messages API settings.
Inheritance: object
Properties
Section titled “Properties”AccessKeyId
Section titled “AccessKeyId”public string? AccessKeyId { get; set; }AWS access key. Used when no Anthropic API key is configured.
Value: string
ApiKey
Section titled “ApiKey”public string? ApiKey { get; set; }Explicit API key. Mutually exclusive with AuthToken.
Value: string
ApiKeyEnvironmentVariable
Section titled “ApiKeyEnvironmentVariable”public string ApiKeyEnvironmentVariable { get; set; }Environment variable. Defaults to ANTHROPIC_API_KEY.
Value: string
AuthToken
Section titled “AuthToken”public string? AuthToken { get; set; }Bearer token. Mutually exclusive with ApiKey.
Value: string
BaseUrl
Section titled “BaseUrl”public string BaseUrl { get; set; }API origin. The official host is normalized to /v1. Message calls append /messages.
Value: string
BatchResultDownloads
Section titled “BatchResultDownloads”public BatchResultDownloads? BatchResultDownloads { get; set; }Settings for downloading JSON Lines batch results.
Value: BatchResultDownloads
CredentialProvider
Section titled “CredentialProvider”public Func<CancellationToken, Task<AnthropicAwsCredentials>>? CredentialProvider { get; set; }Supplies SigV4 credentials for one request.
Value: Func<CancellationToken, Task<AnthropicAwsCredentials>>
Headers
Section titled “Headers”public Dictionary<string, string?> Headers { get; }Headers merged into every request.
Value: Dictionary<string, string>
public string? Name { get; set; }Model provider id. Defaults to anthropic.messages.
Value: string
Region
Section titled “Region”public string? Region { get; set; }AWS region. Used when the AWS base URL is not set explicitly.
Value: string
SecretAccessKey
Section titled “SecretAccessKey”public string? SecretAccessKey { get; set; }AWS secret key.
Value: string
SessionToken
Section titled “SessionToken”public string? SessionToken { get; set; }AWS session token.
Value: string
TransformRequestBody
Section titled “TransformRequestBody”public Func<JsonObject, JsonObject>? TransformRequestBody { get; set; }Optional rewrite of the JSON body before it is sent.
Value: Func<JsonObject, JsonObject>
TransformRequestHeaders
Section titled “TransformRequestHeaders”public Func<Dictionary<string, string?>, IReadOnlyDictionary<string, JsonElement>?, Dictionary<string, string?>>? TransformRequestHeaders { get; set; }Optional rewrite of the combined request headers. Receives the call’s provider options and returns the headers to send.
UtcNow
Section titled “UtcNow”public Func<DateTimeOffset>? UtcNow { get; set; }Clock used when signing. Tests pin this.
Value: Func<DateTimeOffset>
Version
Section titled “Version”public string Version { get; set; }anthropic-version header.
Value: string
WorkspaceId
Section titled “WorkspaceId”public string? WorkspaceId { get; set; }Claude Platform workspace id.
Value: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product