Pinecone TypeScript SDK - v9.0.0
    Preparing search index...

    Type Alias PineconeConfiguration

    Configuration passed to Pinecone when creating a client.

    type PineconeConfiguration = {
        additionalHeaders?: HTTPHeaders;
        apiKey: string;
        assistantRegion?: string;
        caller?: { model: string; provider?: string };
        controllerHostUrl?: string;
        fetchApi?: FetchAPI;
        maxRetries?: number;
        sourceTag?: string;
    }
    Index
    additionalHeaders?: HTTPHeaders

    Optional headers to be included in all requests.

    These are applied after the headers the SDK sets, so an entry keyed exactly X-Pinecone-Api-Version pins every request this client makes — control plane and data plane — to that API version. Matching is case-sensitive: x-pinecone-api-version is sent alongside the SDK's header rather than replacing it. The same rule applies to Api-Key and User-Agent. Content-Type is the exception, since the request body is already encoded by the time these headers are applied.

    Request and response models are generated from the 2026-07 schemas, so scope a pinned client to the calls that need the older version rather than using it as a general downgrade.

    const pc = new Pinecone({
    apiKey: 'your-api-key',
    additionalHeaders: { 'X-Pinecone-Api-Version': '2026-01' },
    });
    apiKey: string

    The API key for your Pinecone project. You can find this in the Pinecone console.

    assistantRegion?: string

    Optional configuration field for specifying a region to use with the assistant APIs. If not specified, the default region of "us" is used.

    caller?: { model: string; provider?: string }

    Caller identification included in the User-Agent header, for example an AI coding assistant. Set model to the caller's model name and optionally identify its provider.

    Type Declaration

    • model: string

      The model name reported by the caller.

    • Optionalprovider?: string

      Optional provider identifier (e.g., 'google', 'anthropic', 'openai').

    controllerHostUrl?: string

    Override the API host for index management. Defaults to https://api.pinecone.io.

    fetchApi?: FetchAPI

    Custom fetch implementation; omit to use the global fetch.

    maxRetries?: number

    Maximum retries after the initial request. Defaults to 3; set to 0 to disable retries.

    sourceTag?: string

    Optional sourceTag that is applied to the User-Agent header with all requests.