Content rating
Your scale.One value.
Rate an image you already have, or rate one while you generate it. The default answers sfw or nsfw. Describe two to seven levels and the answer is one of them.
Scale
- url
- https://example.com/photo.webp
Sending a URL is enough. It defaults to sfw or nsfw.
Comes back as
sfw
Content is safe for work. No nudity, violence, or other explicit content. Non-erotic lingerie and bikini are allowed.
nsfw
Content is not safe for work. Contains nudity, violence, or other explicit content.
SDK
const result = await mynth.image.rate({
url: "https://example.com/photo.webp",
});
result.level; // "sfw" | "nsfw"On generate, rating: true is this scale. Use content rating is the generate path.
Where it runs
A URL, or an image you are generating
Same levels either way. The task and the price differ.
- POST /image/rate
- One
httporhttpsURL. Creates animage.ratetask and returns201with ataskId. PollGET /tasks/:id, or listen fortask.image.rate.completed. The result is{ "level" }. - $0.0002
- Reserved at creation, charged when the task succeeds. A failed task releases the reserve. 5,000 ratings to the dollar. When the balance cannot cover the reserve, the call returns
402 INSUFFICIENT_BALANCE. - rating
- On
image.generate.trueis the sfw / nsfw scale. An object takes the samemodeandlevelsasPOST /image/rate. A successful image includesratingwithstatus"success"andlevel. When rating fails, the image still comes back andratinghasstatus"failed"and an error code. Included with generation, so the generation price is the whole charge. - Webhooks
task.image.rate.completedandtask.image.rate.failedfire forPOST /image/rate. Rating on generate stays on that generate task, and the generate webhook includes it.- SDK
image.ratewaits, andlevelnarrows to your values.as conston the levels array keeps the strings as literals.image.rateAsyncreturns the task if you want to poll. Pass a file and the SDK uploads it, then rates the URL.
Rate an image is the URL call. Use content rating is rating on generate. The field table is Image rate request.
The scale
Levels a model can tell apart
A vision model reads each description and picks one value.
- Default
- Omit
mode, or sendnsfw_sfw.sfwis no nudity, violence, or other explicit content, and non-erotic lingerie and bikini are allowed.nsfwis nudity, violence, or other explicit content. - value
- 1 to 24 characters. This is the string in
level. - description
- 1 to 150 characters. This is the sentence the model reads.
- Count
- 2 to 7 levels when
modeiscustom. - Borderline images
- The same image can come back on different levels when it sits between two descriptions. Run it more than once before you trust a close call.
- Fine distinctions
- Broad separations stay reliable. safe / suggestive / explicit, and safe-for-children / safe-for-adults / nsfw, are the kind to write. A fine visual call, such as artistic nudity against explicit nudity, drifts between requests.
A rating describes the image. The Terms of Service still apply.