Class Client

Api

public

Classdesc

An API client for Craiyon.

Hierarchy

  • Client

Constructors

Properties

GENERATE_IMAGES_URL: string = '/v3'
MODELS: typeof CraiyonModel = CraiyonModel
VERSION: number = 3

Methods

  • A builder function that sets the model version.

    Returns

    The modified client instance.

    Parameters

    • apiToken: string

    Returns Client

  • A builder function that sets the base URL of the Craiyon backend instance.

    Returns

    The modified client instance.

    Parameters

    • baseUrl: string

      The base URL to use. Must not include the /draw endpoint.

    Returns Client

  • A builder function that sets the maximum number of retries to attempt.

    Returns

    The modified client instance.

    Parameters

    • maxRetries: number

      The maximum number of retries to attempt.

    Returns Client

  • A builder function that sets the model version.

    Returns

    The modified client instance.

    Parameters

    • modelVersion: string

      The craiyon model to use.

    Returns Client

Generated using TypeDoc