Skip to main content
Use content_rating when you want generated images to include a classification result.

Enable default rating

const task = await mynth.image.generate({
  prompt: "Fantasy character concept art",
  model: "google/gemini-3.1-flash-image",
  content_rating: {
    enabled: true,
  },
});
When enabled, successful images may include:
{
  "content_rating": {
    "mode": "default",
    "level": "sfw"
  }
}

Use custom rating levels

content_rating: {
  enabled: true,
  levels: [
    { value: "safe", description: "Safe for all audiences" },
    { value: "sensitive", description: "Contains mature or suggestive content" }
  ]
}
Constraints:
  • 2 to 7 levels
  • value length: 1 to 24 characters
  • description length: 1 to 150 characters
When you provide custom levels, Mynth returns mode: "custom" and the chosen custom 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 / nsfw
  • safe / suggestive / explicit
  • safe-for-children / safe-for-adults / nsfw
  • blood / no-blood
Scales that rely on subtle visual distinctions — for example 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.