@squidcloud/client
Version:
A typescript implementation of the Squid client
26 lines (25 loc) • 1.05 kB
TypeScript
import { AiGenerateImageOptions } from './public-types';
/**
* AiImageClient provides methods for AI-powered image processing,
* such as generating images from text prompts and removing backgrounds.
* @category AI
*/
export declare class AiImageClient {
private readonly rpcManager;
/**
* 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.
*
* @param prompt - A natural language description of the desired image.
* @param options - Configuration options for image generation (e.g., size, style).
* @returns A Promise that resolves to a url with the image.
*/
generate(prompt: string, options: AiGenerateImageOptions): Promise<string>;
/**
* Removes the background from an image file.
*
* @param file - The image file to process.
* @returns A Promise that resolves to a base64-encoded image string with the background removed.
*/
removeBackground(file: File): Promise<string>;
}