Skip to main content
Use the rating option on POST /image/generate when you want each successful image to include a content classification. Rating is optional and omitted by default. For images that already exist (including ones not generated by Mynth), use Rate Image Content instead (POST /image/rate).

Pricing

Generation-time rating is included with image generation. Mynth does not charge an extra fee for rating on generate requests. Standalone rating via /image/rate is billed separately — see Rate Image Content.

Enable default rating

The simplest form is rating: true, which uses the built-in sfw / nsfw scale:
You can also be explicit with mode: "nsfw_sfw" — same scale, same result:

Default levels

Rating labels describe detected content. They do not override the Mynth Terms of Service or permit otherwise prohibited generation.

Read the rating on the result

When rating is requested, each successful image includes a rating object. Success:
If classification fails, the image is still returned and rating is:
Error codes: FETCH_FAILED, RATING_FAILED, UNKNOWN_ERROR.

Use custom rating levels

Provide mode: "custom" with your own levels to replace the default scale:
Constraints (validated on the request): value is the string returned in rating.level. description is what the rating model uses to choose a level.

Choosing effective levels

Content rating is performed by a vision language model. Results for borderline images may vary between requests. This feature is for high-level, coarse classification — not fine-grained tagging. Broad, clearly separated categories work best:
  • 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 and may produce inconsistent results. Test thoroughly before relying on custom levels in production.

REST example

Creating a task does not return images immediately. Wait in the SDK, poll task endpoints, or use webhooks — see Async and polling. When the generate task completes, each successful image may include rating as shown above.

How rating fits generation

  1. Mynth generates and uploads each image to the Mynth CDN.
  2. If rating was set, Mynth classifies the image from the CDN URL.
  3. The result attaches rating with status: "success" and level, or status: "failed" and error.
Rating runs once per successfully generated image in the same image.generate task. It is not a separate image.rate task and does not emit task.image.rate.* webhooks. Completed generate webhooks include per-image rating when rating was requested.

Rate existing images instead

To classify an arbitrary image URL, use POST /image/rate or mynth.image.rate(). That path creates an async image.rate task and is billed separately. See Rate Image Content.