/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { IRunConfig, TaskConfig } from "@workglow/task-graph"; import { CreateWorkflow } from "@workglow/task-graph"; import type { DataPortSchema } from "@workglow/util/schema"; import type { ModelConfig } from "../../model/ModelSchema"; import type { AiImageOutput } from "../base/AiImageOutputTask"; import { AiImageOutputTask } from "../base/AiImageOutputTask"; export declare const ImageGenerateInputSchema: { readonly type: "object"; readonly properties: { readonly aspectRatio: { readonly type: "string"; readonly title: "Aspect Ratio"; readonly description: "Output image aspect ratio. Mapped per-provider to the nearest supported size."; readonly enum: readonly ["1:1", "16:9", "9:16", "4:3", "3:4"]; readonly default: "1:1"; }; readonly quality: { readonly type: "string"; readonly title: "Quality"; readonly description: "Generation quality. Only honored by providers that support it (gpt-image-2)."; readonly enum: readonly ["low", "medium", "high"]; readonly "x-ui-group": "Configuration"; }; readonly seed: { readonly type: "number"; readonly title: "Seed"; readonly description: "Random seed for reproducibility. When unset, results are non-deterministic and the task is treated as not cacheable."; readonly "x-ui-group": "Configuration"; }; readonly negativePrompt: { readonly type: "string"; readonly title: "Negative Prompt"; readonly description: "What the model should avoid. Honored by providers that support it (Imagen, HF diffusion models)."; readonly "x-ui-group": "Configuration"; }; readonly providerOptions: { readonly type: "object"; readonly title: "Provider Options"; readonly description: "Provider-specific options that don't normalize across providers (e.g., DALL-E style, HF guidance scale)."; readonly additionalProperties: true; readonly "x-ui-group": "Advanced"; }; readonly model: { readonly oneOf: readonly [{ readonly title: "Model"; readonly description: `The model ${string}`; } & Record & { readonly format: import("..").TypeModelSemantic; readonly type: "string"; }, { readonly type: "object"; readonly properties: { readonly model_id: { readonly type: "string"; }; readonly capabilities: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly "x-ui-editor": "multiselect"; }; readonly title: { readonly type: "string"; }; readonly description: { readonly type: "string"; readonly "x-ui-editor": "textarea"; }; readonly provider: { readonly type: "string"; }; readonly provider_config: { readonly type: "object"; readonly properties: { readonly credential_key: { readonly type: "string"; readonly format: "credential"; readonly "x-ui-hidden": true; }; readonly native_dimensions: { readonly type: "integer"; readonly description: "Native output vector dimensions for embedding models"; }; readonly mrl: { readonly type: "boolean"; readonly description: "Whether the model supports Matryoshka Representation Learning"; }; }; readonly additionalProperties: true; readonly default: {}; }; readonly metadata: { readonly type: "object"; readonly default: {}; readonly "x-ui-hidden": true; }; }; readonly required: readonly ["provider", "provider_config"]; readonly format: "model"; readonly additionalProperties: true; } & Record & { readonly format: import("..").TypeModelSemantic; }]; } & Record & { readonly format: import("..").TypeModelSemantic; }; readonly prompt: { readonly type: "string"; readonly title: "Prompt"; readonly description: "Text describing the image to generate"; }; }; readonly required: readonly ["model", "prompt"]; readonly additionalProperties: false; }; export declare const ImageGenerateOutputSchema: DataPortSchema; export type ImageGenerateTaskInput = { aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | "3:4" | undefined; quality?: "low" | "medium" | "high" | undefined; seed?: number | undefined; negativePrompt?: string | undefined; providerOptions?: { [x: string]: unknown; } | undefined; model: string | ModelConfig; prompt: string; }; export type ImageGenerateTaskOutput = AiImageOutput; export type ImageGenerateTaskConfig = TaskConfig; export declare class ImageGenerateTask extends AiImageOutputTask { static type: string; /** Capabilities required of the model; gated in {@link AiTask.execute}. */ static readonly requires: ["image.generation"]; static category: string; static title: string; static description: string; static cacheable: boolean; static inputSchema(): DataPortSchema; static outputSchema(): DataPortSchema; validateInput(input: ImageGenerateTaskInput): Promise; } export declare const imageGenerate: (input: ImageGenerateTaskInput, config?: ImageGenerateTaskConfig, runConfig?: Partial) => Promise; declare module "@workglow/task-graph" { interface Workflow { imageGenerate: CreateWorkflow; } } //# sourceMappingURL=ImageGenerateTask.d.ts.map