Polyman Documentation - v3.1.0
    Preparing search index...

    Interface AnthropicOptions

    How to reach the Anthropic API.

    interface AnthropicOptions {
        id?: string;
        baseUrl?: string;
        apiKey?: string;
        headers?: Record<string, string>;
        defaultMaxTokens?: number;
        fetch?: (
            input: string | URL | Request,
            init?: RequestInit,
        ) => Promise<Response>;
    }
    Index
    id?: string

    Provider id. Defaults to anthropic.

    baseUrl?: string

    Base URL. Defaults to https://api.anthropic.com.

    apiKey?: string

    Sent as x-api-key.

    headers?: Record<string, string>

    More headers for every request, like anthropic-beta.

    defaultMaxTokens?: number

    max_tokens when a request has no maxOutputTokens.

    fetch?: (input: string | URL | Request, init?: RequestInit) => Promise<Response>

    The fetch to use. Defaults to the global one. Tests pass a fake.