import * as z from "zod/v4"; import { OpenEnum } from "../types/enums.js"; import { ContentPartImage, ContentPartImage$Outbound } from "./contentpartimage.js"; import { ImageGenerationProviderPreferences, ImageGenerationProviderPreferences$Outbound } from "./imagegenerationproviderpreferences.js"; import { TraceConfig, TraceConfig$Outbound } from "./traceconfig.js"; /** * Normalized aspect ratio of the generated image. Providers clamp to their supported subset. */ export declare const ImageGenerationRequestAspectRatio: { readonly Eleven: "1:1"; readonly Twelve: "1:2"; readonly Fourteen: "1:4"; readonly Eighteen: "1:8"; readonly TwentyOne: "2:1"; readonly TwentyThree: "2:3"; readonly TwoDot351: "2.35:1"; readonly ThirtyTwo: "3:2"; readonly ThirtyFour: "3:4"; readonly FortyOne: "4:1"; readonly FortyThree: "4:3"; readonly FortyFive: "4:5"; readonly FiftyTwo: "5:2"; readonly FiftyFour: "5:4"; readonly FiftySeven: "5:7"; readonly SeventyFive: "7:5"; readonly EightyOne: "8:1"; readonly NineHundredAndSixteen: "9:16"; readonly OneHundredAndSixtyNine: "16:9"; readonly NineHundredAndNineteenDot5: "9:19.5"; readonly NineteenDot59: "19.5:9"; readonly NineHundredAndTwenty: "9:20"; readonly TwoHundredAndNine: "20:9"; readonly NineHundredAndTwentyOne: "9:21"; readonly TwoHundredAndNineteen: "21:9"; readonly Auto: "auto"; }; /** * Normalized aspect ratio of the generated image. Providers clamp to their supported subset. */ export type ImageGenerationRequestAspectRatio = OpenEnum; /** * Background treatment. `transparent` requires an output_format that supports alpha (png or webp). */ export declare const ImageGenerationRequestBackground: { readonly Auto: "auto"; readonly Transparent: "transparent"; readonly Opaque: "opaque"; }; /** * Background treatment. `transparent` requires an output_format that supports alpha (png or webp). */ export type ImageGenerationRequestBackground = OpenEnum; /** * Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. */ export declare const ImageGenerationRequestOutputFormat: { readonly Png: "png"; readonly Jpeg: "jpeg"; readonly Webp: "webp"; readonly Svg: "svg"; }; /** * Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. */ export type ImageGenerationRequestOutputFormat = OpenEnum; /** * Rendering quality. Providers without a quality knob ignore this. */ export declare const ImageGenerationRequestQuality: { readonly Auto: "auto"; readonly Low: "low"; readonly Medium: "medium"; readonly High: "high"; readonly Xhigh: "xhigh"; readonly Max: "max"; }; /** * Rendering quality. Providers without a quality knob ignore this. */ export type ImageGenerationRequestQuality = OpenEnum; /** * Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. */ export declare const ImageGenerationRequestResolution: { readonly FiveHundredAndTwelve: "512"; readonly SevenHundredAndSixtyEight: "768"; readonly OneK: "1K"; readonly TwoK: "2K"; readonly FourK: "4K"; }; /** * Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. */ export type ImageGenerationRequestResolution = OpenEnum; /** * Image generation request input */ export type ImageGenerationRequest = { /** * Normalized aspect ratio of the generated image. Providers clamp to their supported subset. */ aspectRatio?: ImageGenerationRequestAspectRatio | undefined; /** * Background treatment. `transparent` requires an output_format that supports alpha (png or webp). */ background?: ImageGenerationRequestBackground | undefined; /** * Reference images to guide image-to-image generation, as base64 data URLs or HTTP(S) URLs. */ inputReferences?: Array | undefined; /** * The image generation model to use */ model: string; /** * Upper bound on the number of images to generate (1-10). Providers may return fewer images, and providers that only support single-image generation reject n > 1. */ n?: number | undefined; /** * Compression level (0-100) for webp/jpeg output. Ignored for png and by providers without a compression knob. */ outputCompression?: number | undefined; /** * Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`. */ outputFormat?: ImageGenerationRequestOutputFormat | undefined; /** * Text description of the desired image */ prompt: string; /** * Provider routing preferences and provider-specific passthrough configuration. */ provider?: ImageGenerationProviderPreferences | undefined; /** * Rendering quality. Providers without a quality knob ignore this. */ quality?: ImageGenerationRequestQuality | undefined; /** * Normalized resolution tier of the generated image. Concrete pixel dimensions are derived per-provider. */ resolution?: ImageGenerationRequestResolution | undefined; /** * If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. */ seed?: number | undefined; /** * A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. */ sessionId?: string | undefined; /** * Optional. A convenience shorthand for output dimensions — pass a tier ("2K", "4K") or explicit pixels ("2048x2048") and we normalize it to the right dimensions for the chosen provider. A tier size is equivalent to setting `resolution` and combines with `aspect_ratio`. An explicit pixel size is authoritative: a mismatched `resolution` or `aspect_ratio` alongside it is rejected with a 400. */ size?: string | undefined; /** * If true, partial images are streamed as SSE events as they become available. Only supported by providers with native streaming (currently OpenAI). Non-streaming providers ignore this flag and return a buffered response. */ stream?: boolean | undefined; /** * Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. */ trace?: TraceConfig | undefined; /** * A stable identifier for your end-users. Used to help detect and prevent abuse. Never sent to providers verbatim: for providers whose data policy requires user IDs, it is folded into a hashed, per-account upstream user identifier. */ user?: string | undefined; }; /** @internal */ export declare const ImageGenerationRequestAspectRatio$outboundSchema: z.ZodType; /** @internal */ export declare const ImageGenerationRequestBackground$outboundSchema: z.ZodType; /** @internal */ export declare const ImageGenerationRequestOutputFormat$outboundSchema: z.ZodType; /** @internal */ export declare const ImageGenerationRequestQuality$outboundSchema: z.ZodType; /** @internal */ export declare const ImageGenerationRequestResolution$outboundSchema: z.ZodType; /** @internal */ export type ImageGenerationRequest$Outbound = { aspect_ratio?: string | undefined; background?: string | undefined; input_references?: Array | undefined; model: string; n?: number | undefined; output_compression?: number | undefined; output_format?: string | undefined; prompt: string; provider?: ImageGenerationProviderPreferences$Outbound | undefined; quality?: string | undefined; resolution?: string | undefined; seed?: number | undefined; session_id?: string | undefined; size?: string | undefined; stream?: boolean | undefined; trace?: TraceConfig$Outbound | undefined; user?: string | undefined; }; /** @internal */ export declare const ImageGenerationRequest$outboundSchema: z.ZodType; export declare function imageGenerationRequestToJSON(imageGenerationRequest: ImageGenerationRequest): string; //# sourceMappingURL=imagegenerationrequest.d.ts.map