Vision Lens SDK
    Preparing search index...

    Interface Config

    interface Config {
        activeLearnQueue: boolean;
        anthropicApiKey: string;
        anthropicWorkspaceId?: string;
        apiKey: string;
        asyncBatch: boolean;
        azureApiKey?: string;
        azureEndpoint?: string;
        batchSize: number;
        bedrockAccessKeyId?: string;
        bedrockRegion?: string;
        bedrockSecretAccessKey?: string;
        categoriesConfigPath?: string;
        categoryConfig: CategoryConfig;
        cloudProvider: string;
        concurrency: number;
        consensusProviders?: readonly string[];
        consensusThreshold: number;
        dedupeThreshold: number;
        delayBetweenCallsMs: number;
        dryRun: boolean;
        embed: boolean;
        estimate: boolean;
        filenameTemplate: string;
        forceSkipAnalysis: boolean;
        googleApiKey: string;
        inputDir: string;
        interactive: boolean;
        learn: boolean;
        linkImages: boolean;
        linkWindowDays: number;
        localConfidenceThreshold: number;
        localModel: string;
        logFormat: "pretty" | "json";
        maxRetries: number;
        model: string;
        ollamaUrl?: string;
        outputBucket?: string;
        outputDir: string;
        outputFormat: "pretty" | "json" | "none" | "csv" | "xlsx" | "sqlite";
        plugins: readonly string[];
        provider: LLMProvider;
        quiet: boolean;
        resumeBatch: boolean;
        retryDelayMs: number;
        selfCritique: boolean;
        sessionGapMinutes?: number;
        skipAnalysis: boolean;
        temporalWindowMinutes: number;
        timing: boolean;
        verbose: boolean;
        vertexLocation?: string;
        vertexProjectId?: string;
        watch: boolean;
        watchPoll: boolean;
        webhookUrl?: string;
    }
    Index

    Properties

    activeLearnQueue: boolean

    When true, write active_learning_queue.json after each run listing images with confidence < 0.5 or category === 'unknown' that need human review.

    anthropicApiKey: string

    Anthropic API key — used when provider is 'anthropic'.

    anthropicWorkspaceId?: string

    Anthropic workspace id, sent as the anthropic-workspace-id header for keys not scoped to a workspace.

    apiKey: string

    OpenAI API key — used when provider is 'openai'.

    asyncBatch: boolean

    When true, submit images to provider's async batch API and exit; use --resume to collect.

    azureApiKey?: string

    Azure OpenAI API key — required when provider is 'azure'. Overrides AZURE_OPENAI_API_KEY env var.

    azureEndpoint?: string

    Azure OpenAI endpoint URL — required when provider is 'azure'. Example: https://my-resource.openai.azure.com/

    batchSize: number
    bedrockAccessKeyId?: string

    AWS access key ID for Bedrock (overrides AWS_ACCESS_KEY_ID env var)

    bedrockRegion?: string

    AWS region for Bedrock (default: us-east-1)

    bedrockSecretAccessKey?: string

    AWS secret access key for Bedrock (overrides AWS_SECRET_ACCESS_KEY env var)

    categoriesConfigPath?: string
    categoryConfig: CategoryConfig
    cloudProvider: string

    Cloud provider to use for tier-2 escalation in hybrid mode. Default: 'openai'.

    concurrency: number

    Max concurrent API batch calls in-flight at once. Default: 3.

    consensusProviders?: readonly string[]

    Two provider names for multi-model consensus, e.g. ['openai', 'anthropic']. When set, both providers analyse every batch and majority vote decides the category. Disagreements are flagged with lowConsensus: true on the ProcessedResult.

    consensusThreshold: number

    Minimum majority ratio (0–1) needed for temporal consensus override. Default: 0.6.

    dedupeThreshold: number

    Hamming distance threshold for perceptual-hash deduplication (0–64). 0 disables deduplication. Default: 8 (~12.5% bit difference).

    delayBetweenCallsMs: number
    dryRun: boolean
    embed: boolean

    When true, generate text embeddings for each image after analysis and write analysis_embeddings.index.json. Requires a supported embedding provider.

    estimate: boolean

    When true, print cost estimate and exit without making API calls.

    filenameTemplate: string

    Output filename template. Must contain {n} or {n:N}. Tokens: {n} or {n:N} — sequence number, zero-padded to N digits (default 3) {category} — image category slug {description} — LLM description as a URL-safe slug {date} — DD-MM-YYYY (legacy shorthand) {date:FORMAT} — custom date: YYYY YY MM DD M D {datetime} — DD-MM-YYYY_HH-MM (legacy shorthand) {datetime:FORMAT} — custom datetime: adds HH H mm m ss s

    forceSkipAnalysis: boolean

    When true, skip analysis even if categories.json changed (suppresses hash-mismatch warning).

    googleApiKey: string

    Google AI API key — used when provider is 'google'.

    inputDir: string
    interactive: boolean

    When true, enter interactive review mode between analysis and processing. Requires a TTY.

    learn: boolean

    When true, inject override patterns from previous runs into the batch prompt as few-shot examples.

    linkImages: boolean

    When true, run cross-image linking pass to identify related image pairs.

    linkWindowDays: number

    Time window in days for grouping images in the linking pass. Default: 7.

    localConfidenceThreshold: number

    Confidence threshold below which images are escalated to the cloud tier in hybrid mode. Default: 0.70.

    localModel: string

    Ollama model for the local tier-1 pass in hybrid mode. Default: 'llava'.

    logFormat: "pretty" | "json"

    Log format: 'pretty' renders coloured text; 'json' emits one JSON object per line to stdout/stderr.

    maxRetries: number

    Number of retries after the first attempt, not the number of attempts: 0 means a single attempt, 3 means up to 4 attempts (see attemptsFor).

    model: string
    ollamaUrl?: string

    Ollama server base URL — required when provider is 'ollama'. Default: http://localhost:11434

    outputBucket?: string

    Cloud storage bucket URI for output files, e.g. s3://my-bucket/prefix, gs://my-bucket/prefix, azblob://container/prefix When set, FileRepository adapts to the matching cloud provider.

    outputDir: string
    outputFormat: "pretty" | "json" | "none" | "csv" | "xlsx" | "sqlite"
    plugins: readonly string[]

    Paths to plugin .mjs files loaded via --plugin (repeatable).

    provider: LLMProvider
    quiet: boolean
    resumeBatch: boolean

    When true, poll an existing async batch job from analysis_job.json until complete, then process.

    retryDelayMs: number
    selfCritique: boolean

    When true, run a self-critique pass that flags suspicious classifications for reanalysis.

    sessionGapMinutes?: number

    Split images into sessions at gaps larger than this many minutes. Undefined disables session reconstruction. Default when enabled: 60.

    skipAnalysis: boolean
    temporalWindowMinutes: number

    Temporal cluster window in minutes. Images within this window are grouped. Default: 5.

    timing: boolean

    When true, print per-step wall-time breakdown in the run summary.

    verbose: boolean
    vertexLocation?: string

    Google Cloud location for Vertex AI (default: us-central1)

    vertexProjectId?: string

    Google Cloud project ID for Vertex AI (overrides GOOGLE_CLOUD_PROJECT env var)

    watch: boolean

    When true, watch inputDir for new images and process them incrementally.

    watchPoll: boolean

    When true, use polling for file watching (required on NFS/SMB mounts).

    webhookUrl?: string

    Optional URL to POST the full AnalysisCache JSON to after each successful run.