assetmax
Version:
Manifest-driven asset management system with contract-based generation
37 lines (36 loc) • 954 B
TypeScript
/**
* FLUX Kontext Pro model integration (TypeScript version)
*/
export interface FluxGenerationOptions {
prompt: string;
inputImage?: string;
aspectRatio?: string;
promptUpsampling?: boolean;
seed?: number;
outputFormat?: 'webp' | 'jpg' | 'png';
safetyTolerance?: number;
}
export declare class FluxModel {
private client;
private readonly modelName;
private readonly aspectRatios;
private readonly outputFormats;
constructor(apiToken?: string);
/**
* Upload local image to Replicate and return URL
*/
uploadImage(imagePath: string): Promise<string>;
/**
* Generate/edit image using FLUX Kontext Pro
*/
generate(options: FluxGenerationOptions): Promise<string>;
/**
* Get model information
*/
getModelInfo(): {
name: string;
supportedAspectRatios: string[];
supportedFormats: string[];
costPerImage: number;
};
}