tutti-api - v2.1.0
    Preparing search index...

    Interface LLMCaptchaProviderOptions

    interface LLMCaptchaProviderOptions {
        apiKey?: string;
        baseURL?: string;
        fetch?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        maxRetries?: number;
        mimeType?: string;
        model?: string;
        prompt?: string;
        rasterize?: (
            challenge: CaptchaChallenge,
        ) => Promise<{ data: Uint8Array; mimeType: string }>;
    }
    Index

    Properties

    apiKey?: string

    Google AI API key. Default: process.env.GEMINI_API_KEY.

    baseURL?: string
    fetch?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    Injectable fetch (default: global fetch).

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

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

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    maxRetries?: number

    Retries on transient errors (503/429/500). Default 4 (exponential backoff).

    mimeType?: string

    Override the image mime type sent to the model (else the challenge's).

    model?: string

    Model id. Default: "gemini-3.1-flash-lite".

    prompt?: string

    Instruction sent alongside the image.

    rasterize?: (
        challenge: CaptchaChallenge,
    ) => Promise<{ data: Uint8Array; mimeType: string }>

    Convert the challenge image to a Gemini-supported raster (PNG/JPEG/WEBP). Gemini vision rejects image/svg+xml, and the tutti captcha is an SVG — supply a rasterizer (e.g. a small SVG→PNG step) to auto-solve it.