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 forrating on generate requests.
Standalone rating via /image/rate is billed separately — see Rate Image Content.
Enable default rating
The simplest form israting: true, which uses the built-in sfw / nsfw scale:
mode: "nsfw_sfw" — same scale, same result:
Default levels
| Level | Meaning |
|---|---|
sfw | Safe for work. No nudity, violence, or other explicit content. Non-erotic lingerie and bikini are allowed. |
nsfw | Not safe for work. Contains nudity, violence, or other explicit content. |
Read the rating on the result
When rating is requested, each successful image includes arating object.
Success:
rating is:
FETCH_FAILED, RATING_FAILED, UNKNOWN_ERROR.
Use custom rating levels
Providemode: "custom" with your own levels to replace the default scale:
| Constraint | Limit |
|---|---|
| Number of levels | 2 to 7 |
value length | 1 to 24 characters |
description length | 1 to 150 characters |
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/nsfwsafe/suggestive/explicitsafe-for-children/safe-for-adults/nsfwblood/no-blood
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
rating as shown above.
How rating fits generation
- Mynth generates and uploads each image to the Mynth CDN.
- If
ratingwas set, Mynth classifies the image from the CDN URL. - The result attaches
ratingwithstatus: "success"andlevel, orstatus: "failed"anderror.
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 arbitrary image URLs (up to 10 per request), usePOST /image/rate or mynth.image.rate(). That path supports sync responses, per-URL success/failure, and separate billing.
See Rate Image Content.