UNPKG

@imgly/plugin-ai-image-generation-web

Version:

AI image generation plugin for the CE.SDK editor

47 lines (46 loc) 1.27 kB
/** * Parameters for EachLabs image inference */ export interface EachLabsImageInferenceParams { /** Model slug (e.g., 'nano-banana-pro') */ model: string; /** Model version */ version: string; /** Input parameters for the model */ input: Record<string, unknown>; } /** * Result from EachLabs image inference */ export interface EachLabsImageResult { imageURL: string; } /** * EachLabs storage interface for file uploads */ export interface EachLabsStorage { /** * Upload a file to EachLabs storage * @param file - The file to upload * @returns The URL of the uploaded file */ upload: (file: File) => Promise<string>; } /** * EachLabs API client interface */ export interface EachLabsClient { imageInference: (params: EachLabsImageInferenceParams, abortSignal?: AbortSignal) => Promise<EachLabsImageResult[]>; /** * Storage API for uploading files */ storage: EachLabsStorage; } /** * Creates an EachLabs API client * * @param proxyUrl - The proxy URL to use for API requests * @param headers - Optional additional headers * @returns EachLabs client instance */ export declare function createEachLabsClient(proxyUrl: string, headers?: Record<string, string>): EachLabsClient;