export declare const SILENT_REJECT_THRESHOLD_IMAGE = 30000; export declare const SILENT_REJECT_THRESHOLD_VIDEO = 100000; /** * Per-resolution image thresholds. The flat 30_000 ceiling lets some real * rejections slip through at 1K (the LEGISLATOR profile in the PNW * field-guide came back as a ~2 KB refusal stub which is well under 30 KB * but we need a wider margin at 1K to catch noisier rejections that still * compress lower than a real photo). Conversely small-resolution outputs * can legitimately be under 30 KB. * * Lookup with `thresholdForResolution(res)`; unknown values fall back to * the flat default. */ export declare const SILENT_REJECT_THRESHOLDS_BY_RESOLUTION: Record; export declare function thresholdForResolution(res?: string): number; export interface VeniceRejectionInfo { model: string; prompt?: string; byteSize: number; threshold: number; kind: 'image' | 'video'; message?: string; } export declare class VeniceRejectionError extends Error { readonly kind: 'image' | 'video'; readonly model: string; readonly prompt?: string; readonly byteSize: number; readonly threshold: number; constructor(info: VeniceRejectionInfo); } /** * Throw if an image buffer is below the silent-reject threshold. * * Pass the decoded image bytes (NOT the base64 string). The threshold is * calibrated for 1K outputs; smaller resolutions may need an override. */ export declare function assertNotSilentRejectImage(buf: Buffer | Uint8Array, ctx: { model: string; prompt?: string; threshold?: number; }): void; /** * Throw if a video buffer is below the silent-reject threshold. * * Pass the downloaded MP4 bytes. Threshold calibrated for 720p/5s clips; * very short or low-resolution clips may need an override. */ export declare function assertNotSilentRejectVideo(buf: Buffer | Uint8Array, ctx: { model: string; prompt?: string; threshold?: number; }): void; /** * Decode a base64 image and assert it is not a silent rejection. * Returns the decoded buffer for downstream use. */ export declare function decodeAndAssertImage(b64: string, ctx: { model: string; prompt?: string; threshold?: number; }): Buffer; //# sourceMappingURL=rejection.d.ts.map