import type { ImageSafetyPolicy } from '../types/images.js'; /** Options for `createOpenAIVisualModeration()`. */ export interface VisualModerationOptions { /** OpenAI API key. */ apiKey: string; /** API base URL. Defaults to `https://api.openai.com/v1`. */ baseUrl?: string; /** Defaults to `omni-moderation-latest`, which reads images as well as text. */ model?: string; /** Replaces the global `fetch`. */ fetch?: typeof globalThis.fetch; /** * Score, 0–1, at or above which a category blocks. When omitted, the provider's own `flagged` * decision is used, which is the calibration it publishes. */ blockThreshold?: number; /** * Score at or above which a category is sent for human review without blocking. Must be below * `blockThreshold`. Omitted means nothing is routed to review. */ reviewThreshold?: number; /** Per-category overrides, for a category a product needs stricter or looser than the rest. */ categoryThresholds?: Record; /** Moderates the prompt and input images before generation. Defaults to true. */ inspectInput?: boolean; /** Moderates generated images before they are returned. Defaults to true. */ inspectOutput?: boolean; /** * Let content through when moderation itself fails. Defaults to false: an outage of the safety * check is not a reason to skip it, so an error blocks the request instead. */ failOpen?: boolean; } /** * Screens prompts, input images, and generated images through OpenAI's multimodal moderation. * * Text-only checks are insufficient for media: an innocuous prompt can yield an unsafe image, and an * uploaded reference can carry what the prompt never mentions. This inspects both sides of the call * and reports findings in the neutral `MediaSafetyFinding` shape, so it composes with any other * `ImageSafetyPolicy` through `combineSafetyPolicies`. */ export declare function createOpenAIVisualModeration(options: VisualModerationOptions): ImageSafetyPolicy; /** * Runs several safety policies and concatenates what they find. * * Every policy runs even after one blocks, so the finding list shows everything that was wrong * rather than stopping at the first problem. */ export declare function combineSafetyPolicies(...policies: ImageSafetyPolicy[]): ImageSafetyPolicy;