Skip to main content
Use 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 returns 422 INSUFFICIENT_BALANCE. Generation-time rating on /image/generate is not billed separately — see Use Content Rating.

Rate with the default scale

Mode defaults to nsfw_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 is failed (not a partial success). The SDK’s wait() throws TaskAsyncTaskFailedError. Common error codes: FETCH_FAILED, RATING_FAILED, UNKNOWN_ERROR.

Use custom rating levels

Provide mode: "custom" with 2–7 levels to replace the default scale:
Constraints (validated on the request): 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 / 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

Response (201):
Poll /tasks/:id for the completed result:

Rate without waiting

Use rateAsync() when you want to create the task now and wait later:
Poll task endpoints or listen for task.image.rate.completed / task.image.rate.failed webhooks — see Async and polling.

How standalone rating fits

  1. You submit one public image URL (or upload a file via the SDK, which converts it to a URL first).
  2. Mynth reserves cost and queues an image.rate task.
  3. On success the result is { url, level }. On failure the task is failed.
  4. You are charged only for successful ratings.
This creates a separate image.rate task (unlike generate-time rating, which runs inside image.generate).

Rate during generation instead

If you want ratings on images Mynth generates, set rating 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.