POST /image/rate or mynth.image.rate() to classify a single existing image URL. The API creates an async task and returns a taskId. The SDK waits for completion by default; use rateAsync() when you want to poll yourself.
For images you generate with Mynth, prefer the rating option on POST /image/generate instead — see Use Content Rating. That path is free with generation and attaches ratings to each image.
Pricing
Standalone rating is billed at $0.0002 per image. You are charged only when the task completes successfully. The cost is reserved up front. If the task fails, the reserve is released. Insufficient balance returns422 INSUFFICIENT_BALANCE.
Generation-time rating on /image/generate is not billed separately — see Use Content Rating.
Rate with the default scale
Mode defaults tonsfw_sfw and returns sfw or nsfw:
Default levels
Rating labels describe detected content. They do not override the Mynth Terms of Service.
Task failures
If the image cannot be rated, the task status isfailed (not a partial success). The SDK’s wait() throws TaskAsyncTaskFailedError. Common error codes: FETCH_FAILED, RATING_FAILED, UNKNOWN_ERROR.
Use custom rating levels
Providemode: "custom" with 2–7 levels to replace the default scale:
value is the string returned in 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
201):
/tasks/:id for the completed result:
Rate without waiting
UserateAsync() when you want to create the task now and wait later:
task.image.rate.completed / task.image.rate.failed webhooks — see Async and polling.
How standalone rating fits
- You submit one public image URL (or upload a file via the SDK, which converts it to a URL first).
- Mynth reserves cost and queues an
image.ratetask. - On success the result is
{ url, level }. On failure the task isfailed. - You are charged only for successful ratings.
image.rate task (unlike generate-time rating, which runs inside image.generate).
Rate during generation instead
If you want ratings on images Mynth generates, setrating on the generate request. That attaches rating to each successful image, is free with generation, and does not create a separate rate task.
See Use Content Rating.