Moderation is not one field BabySea introduced a unified moderation interface that collapses the fragmented, model-specific safety fields of generative media APIs into a single boolean, generation_moderation. The company's engineering writeup details how it maps that intent to conflicting model fields such as disable_safety_checker, enable_safety_checker, safety_tolerance, safety_filter_level and moderation, inverting polarity and translating types behind the scenes rather than passing raw fields through. The approach targets subtle bugs that arise when multi-model systems expose inconsistent moderation controls directly. When people discuss moderation in generative media, they often describe it as if there is a single standard control: turn safety on, turn safety off, maybe adjust one tolerance value. That is not how real model interfaces work. In practice, moderation is exposed through a scattered set of fields that vary from model to model. One model may expose disable safety checker . Another may expose enable safety checker . Another may use safety tolerance as a number. Another may use the same field as a string enum. Some models add safety filter level . Others expose a separate moderation mode. Some combine several of these. Some expose only one. The result is that moderation is not a clean capability. It is a fragmented interface. Because the inconsistency is not in documentation, it is in the interface itself. A model can expose moderation through fields like these: disable safety checker: boolean enable safety checker: boolean safety tolerance: number safety tolerance: string safety filter level: string moderation: string The inconsistency is not superficial. It exists at multiple levels at once. First, the field names conflict. disable safety checker and enable safety checker represent opposite polarity. A strict moderation intent may require false in one model and true in another. Second, the types conflict. safety tolerance may be numeric in one model and a string enum in another. Third, the semantics conflict. A boolean switch is not equivalent to a tolerance range, and neither is equivalent to a policy level such as block low and above or a moderation mode such as auto . Fourth, availability is inconsistent. Some models expose one moderation field, some expose several, some expose combinations that have to be aligned manually. This means there is no stable moderation surface at the model layer. A pass-through design looks simple: expose every raw field and let developers choose what they want. That design fails immediately in a multi-model system. It pushes all inconsistency upward. The application now has to know which model expects inverted booleans, which one expects a string tolerance, which one wants a numeric range, and which one needs multiple moderation fields coordinated together. At that point, the API is no longer abstracting anything. It is just forwarding fragmentation. A useful abstraction has to preserve intent. The same request should mean the same thing regardless of which model is ultimately selected. BabySea defines a single control for moderation intent: generation moderation: boolean The meaning is intentionally simple. true // moderation ON ➜ strict/safe false // moderation OFF ➜ permissive This is the only moderation input that matters at the BabySea layer. Everything else becomes derived behavior. That choice is important. The goal is not to expose every moderation knob a model happens to have. The goal is to define one stable contract for the user, then translate it into model-specific configuration behind the scenes. The most obvious inconsistency is polarity. Some models represent moderation through a disabling field. In that case, strict moderation must invert the value: export function moderationToDisableBoolean input: SharedInputSchema : boolean | undefined { const val = input.generation moderation as boolean | undefined; if val === undefined return undefined; return val; } Other models represent moderation through an enabling field. In that case, the mapping is direct: export function moderationToEnableBoolean input: SharedInputSchema : boolean | undefined { return input.generation moderation as boolean | undefined; } This looks trivial, but it is exactly the kind of inconsistency that creates subtle bugs when raw fields are exposed directly. A user should not need to know whether a model thinks in terms of enabling safety or disabling it. The harder problem is that moderation often cannot be expressed through one value alone. A single strict or permissive intent may need to drive several fields at once. In BabySea, the same generation moderation input can map into: { disable safety checker: moderationToDisableBoolean input , safety tolerance: moderationToSafetyTolerance input, rawField , safety filter level: moderationToSafetyFilterLevel input , moderation: moderationToModerationString input , } Or, for another model surface: { enable safety checker: moderationToEnableBoolean input , safety tolerance: moderationToSafetyToleranceString input, rawField , } This is the key point: moderation is not normalized by renaming one field. It is normalized by coordinating several unrelated fields so they all represent the same user intent. If moderation is strict, all derived values must point in the strict direction. If moderation is permissive, all derived values must point in the permissive direction. That coordination is the actual complexity of moderation. Tolerance is where many implementations become fragile. It is tempting to hardcode something like "strict means 1, permissive means 6." That only works until a model uses a different range, or exposes tolerance as an enum instead of a number. BabySea avoids that by deriving bounds from the schema itself: function extractSafetyBounds schema: z.ZodTypeAny : { min: number; max: number } { let inner: z.ZodTypeAny = schema; while inner instanceof z.ZodOptional || inner instanceof z.ZodDefault { inner = inner instanceof z.ZodOptional ? inner.unwrap : inner as z.ZodDefault