Represents a client for interacting with the AUTOMATIC1111 Stable Diffusion Web UI API. Extends the Https.Client class to provide methods for making HTTP requests.

This client automatically sets the base URL and headers for the API requests. It also supports basic authentication using a username and password.

const client = new SDWebUIClient({
baseUrl: "https://api.example.com",
username: "user",
password: "pass"
});

Configuration options for the client.

The base URL for the API. If not provided, it will be read from the environment variable SD_API_URL.

The username for basic authentication. If not provided, it will be read from the environment variable SD_API_USERNAME.

The password for basic authentication. If not provided, it will be read from the environment variable SD_API_PASSWORD.

Hierarchy (View Summary)

Constructors

Properties

Methods

Constructors

Properties

api: SDWebUIApi = ...

Represents the API for interacting with the AUTOMATIC1111 Stable Diffusion Web UI API.

Methods

  • Type Parameters

    • T

    Parameters

    • path: string
    • Optionalparams: string | Record<string, string> | URLSearchParams
    • Optionalopts: RequestOptions

    Returns Promise<T>

  • Type Parameters

    • T

    Parameters

    • path: string
    • Optionaldata: unknown
    • Optionalopts: RequestOptions

    Returns Promise<T>