@squidcloud/client
    Preparing search index...

    Class AiImageClient

    AiImageClient provides methods for AI-powered image processing, such as generating images from text prompts and removing backgrounds.

    Index

    Methods

    • Generates an image based on a given text prompt and options and returns a url to the generated image. The url will be valid for one hour.

      Parameters

      • prompt: string

        A natural language description of the desired image.

      • options: AiGenerateImageOptions

        Configuration options for image generation (e.g., size, style).

      Returns Promise<string>

      A Promise that resolves to a url with the image.

    • Removes the background from an image file.

      Parameters

      • file: File

        The image file to process.

      Returns Promise<string>

      A Promise that resolves to a base64-encoded image string with the background removed.