Skip to content

AnthropicAwsApiKeyFetch

Namespace: Vercel.AI.Anthropic

public sealed class AnthropicAwsApiKeyFetch

API-key fetch wrapper. The transport is read when the call is sent, not when the wrapper is created.

Inheritance: object

View source

public AnthropicAwsApiKeyFetch(string apiKey)

Creates a wrapper for <code class=“paramref”>apiKey</code>.

Parameters

Name Type Description
apiKey string

View source

public Func<AnthropicAwsPreparedCall, AnthropicAwsPreparedCall>? Transport { get; set; }

Optional transport. When unset, the prepared call is returned directly.

Value: Func<AnthropicAwsPreparedCall, AnthropicAwsPreparedCall>

View source

Send(string, string?, string?, IReadOnlyDictionary<string, string?>?)

Section titled “Send(string, string?, string?, IReadOnlyDictionary<string, string?>?)”
public AnthropicAwsPreparedCall Send(string url, string? method, string? body, IReadOnlyDictionary<string, string?>? headers)

Applies the API key and user-agent, then invokes Transport if one is set.

Parameters

Name Type Description
url string
method string
body string
headers IReadOnlyDictionary<string, string>

Returns: AnthropicAwsPreparedCall

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product