interface IComfyApiConfig {
    WebSocket?: {
        CLOSED: 3;
        CLOSING: 2;
        CONNECTING: 0;
        OPEN: 1;
        prototype: WebSocket;
        new (url, protocols?): WebSocket;
    };
    api_base?: string;
    api_host?: string;
    cache?: CachedFnOptions;
    clientId?: string;
    fetch?: {
        (input, init?): Promise<Response>;
        (input, init?): Promise<Response>;
    };
    sessionName?: string;
    ssl?: boolean;
    user?: string;
}

Properties

WebSocket?: {
    CLOSED: 3;
    CLOSING: 2;
    CONNECTING: 0;
    OPEN: 1;
    prototype: WebSocket;
    new (url, protocols?): WebSocket;
}

These settings are for compatibility with Node.js environments.

Type declaration

    • new (url, protocols?): WebSocket
    • Parameters

      • url: string | URL
      • Optional protocols: string | string[]

      Returns WebSocket

  • Readonly CLOSED: 3
  • Readonly CLOSING: 2
  • Readonly CONNECTING: 0
  • Readonly OPEN: 1
  • prototype: WebSocket
api_base?: string

The base path for the API endpoints, default is an empty string.

api_host?: string

The host address of the API server, defaults to '127.0.0.1:8188'.

cache?: CachedFnOptions
clientId?: string

The client identification string, default is an empty string.

fetch?: {
    (input, init?): Promise<Response>;
    (input, init?): Promise<Response>;
}

These settings are for compatibility with Node.js environments.

Type declaration

    • (input, init?): Promise<Response>
    • Parameters

      • input: URL | RequestInfo
      • Optional init: RequestInit

      Returns Promise<Response>

    • (input, init?): Promise<Response>
    • Parameters

      • input: string | URL | Request
      • Optional init: RequestInit

      Returns Promise<Response>

sessionName?: string

The name of the session, used for identifying the session instance, default is an empty string.

ssl?: boolean

Whether to use SSL for the connections, defaults to false.

user?: string

The username for authentication, default is 'sc-comfy-ui-client'.