Hierarchy (View Summary)

Constructors

Properties

client: ApiClient
eip712: EIP712Helper
listeners: {
    availableModels?: (data: AvailableModel[]) => void[];
    job?: (data: JobEvent) => void[];
    project?: (data: ProjectEvent) => void[];
} = {}
provider: AbstractProvider

Accessors

Methods

  • Cancel project by id. This will cancel all jobs in the project and mark project as canceled. Client may still receive job events for the canceled jobs as it takes some time, but they will be ignored

    Parameters

    • projectId: string

    Returns Promise<void>

  • Get supported size presets for the model and network. Size presets are cached for 10 minutes.

    Parameters

    • network: SupernetType

      'fast' or 'relaxed'

    • modelId: string

      model id (e.g. 'flux1-schnell-fp8')

    • forceRefresh: boolean = false

      force refresh cache

    Returns Promise<SizePreset[]>

    const presets = await client.projects.getSizePresets('fast', 'flux1-schnell-fp8');
    console.log(presets);
  • Wait for available models to be received from the network. Useful for scripts that need to run after the models are loaded.

    Parameters

    • timeout: number = 10000

      timeout in milliseconds until the promise is rejected

    Returns Promise<AvailableModel[]>