import * as z from "zod/v4"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ImageGenerationLayer } from "./imagegenerationlayer.js"; import { ImageGenerationUsage } from "./imagegenerationusage.js"; export type ImageGenerationResponseData = { /** * Base64-encoded image bytes. Present unless the request asked for `response_format: "url"` and `url` was issued. */ b64Json?: string | undefined; /** * Layer metadata, present when the request asked the provider to split the image into layers (Seedream: `provider.options.seed.layer_decomposition: true` with the required `layer_decomposition_options.max_images`, 2 to 16). Decomposition requires `n` to be 1 or omitted; the response returns up to `max_images` images (the base image plus its layers). */ layer?: ImageGenerationLayer | undefined; /** * Media type (MIME type) of the image, e.g. `image/png`, `image/jpeg`, `image/webp`, `image/svg+xml`. May be omitted if the format could not be determined. */ mediaType?: string | undefined; /** * Signed download URL for the image bytes, issued for `response_format: "url"` requests. Valid until `expires_at`. Absent when the response fell back to `b64_json`. */ url?: string | undefined; }; /** * Image generation response */ export type ImageGenerationResponse = { /** * Unix timestamp (seconds) when the image was generated */ created: number; /** * Generated images */ data: Array; /** * Unix timestamp (seconds) of the earliest expiry among the `url`s in `data`; treat every URL as expired after it. Present only when URLs were issued. */ expiresAt?: number | undefined; /** * Token and cost usage for the image generation request, when available */ usage?: ImageGenerationUsage | undefined; }; /** @internal */ export declare const ImageGenerationResponseData$inboundSchema: z.ZodType; export declare function imageGenerationResponseDataFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ImageGenerationResponse$inboundSchema: z.ZodType; export declare function imageGenerationResponseFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=imagegenerationresponse.d.ts.map