/** * Generation parameter interface. */ export interface GenerateImageParams { prompt: string; nsfw_checker?: boolean; callBackUrl?: string; } /** * AI image generation helper class using the GPT Image-2 API. */ export declare class ImageGenerator { private readonly apiKey; private readonly createTaskUrl; private readonly queryTaskUrl; private readonly defaultModel; constructor(apiKey: string, model?: string); /** * Create an image generation task. * @param params Generation parameters. */ createTask(params: GenerateImageParams): Promise; /** * Query task status. * @param taskId Task ID. */ queryTask(taskId: string): Promise; /** * Generate an image with the complete flow: create task + poll status, with timeout control. * @param params Generation parameters. * @param onProgress Progress callback. * @param timeoutSeconds Timeout in seconds. Defaults to 2 seconds. * @returns Image URL on success, or the task ID when the timeout is reached. */ generateImageWithTimeout(params: GenerateImageParams, onProgress?: (message: string, elapsedSeconds: number) => void, timeoutSeconds?: number): Promise<{ success: true; imageUrl: string; } | { success: false; taskId: string; reason: 'timeout'; }>; } //# sourceMappingURL=imageGenerator.d.ts.map