import type { StorageAdapter } from './storage-adapter.js'; import type { ImageGenerationResult } from './types.js'; /** * Fluent image generation facade. * * @example * const result = await ImageGenerator.of('A sunset over mountains').size('landscape').generate() * const path = await ImageGenerator.of('A logo').model('openai/dall-e-3').store('images/logo.png', storage) * * @example Failover across providers * const result = await ImageGenerator.of('A donut') * .model('openai/dall-e-3') * .failover('google/imagen-3', 'azure/dall-e-3') * .generate() */ export declare class ImageGenerator { private readonly _prompt; private _model; private _size; private _quality; private _style; private _n; private _failover; private constructor(); static of(prompt: string): ImageGenerator; model(model: string): this; /** * Provider/model strings to try if the primary fails. * Tried in order; the first to succeed wins. Swallows individual errors, * surfaces only the last one if every candidate fails. */ failover(...models: string[]): this; size(size: string): this; quality(quality: 'standard' | 'hd'): this; style(style: 'natural' | 'vivid'): this; count(n: number): this; generate(): Promise; /** * Generate the first image and persist it through a caller-supplied * {@link StorageAdapter}. Returns the `path` it was stored at. * * ```ts * import { writeFile } from 'node:fs/promises' * await ImageGenerator.of('a logo') * .store('out/logo.png', { put: (p, bytes) => writeFile(p, bytes) }) * ``` */ store(path: string, storage: StorageAdapter): Promise; } //# sourceMappingURL=image.d.ts.map