rating option when you want generated images to include a classification result. It is optional and omitted by default.
Enable default rating
The simplest form israting: true, which enables the built-in sfw / nsfw scale:
mode: "nsfw_sfw":
rating object:
rating field is simply omitted from the image — the image is still returned normally.
Use custom rating levels
Providemode: "custom" with your own levels to replace the default scale:
- 2 to 7 levels
valuelength: 1 to 24 charactersdescriptionlength: 1 to 150 characters
level.
Choosing effective levels
Content rating is performed by a vision language model (LLM). Because LLM inference is non-deterministic, results for borderline images may occasionally vary between requests. This feature is designed for high-level, coarse-grained content classification — not fine-grained tagging. Scales with broad, clearly separated categories perform reliably:sfw/nsfwsafe/suggestive/explicitsafe-for-children/safe-for-adults/nsfwblood/no-blood
subtle-nudity vs artistic-nudity vs explicit-nudity — are outside the intended scope of this feature and may produce inconsistent results. If you need that level of granularity, test thoroughly before relying on the output in production.