Skip to main content
Endpoint:
POST https://api.mynth.io/image/rate
Authentication: API key required. Public Access Tokens are not accepted. The endpoint is synchronous — results are returned in the response body, not via a polling task.

Request body

{
  "urls": [
    "https://example.com/photo-1.webp",
    "https://example.com/photo-2.webp"
  ],
  "levels": [
    { "value": "safe",      "description": "Safe for all audiences" },
    { "value": "sensitive", "description": "Contains mature or suggestive content" },
    { "value": "explicit",  "description": "Explicit adult content" }
  ]
}

Fields

FieldTypeDefaultNotes
urlsarrayrequiredImage URLs to rate. Minimum 1, maximum 10.
levelsarrayCustom rating scale. When omitted, the default sfw/nsfw scale is used.

levels items

Each item in the levels array must have:
FieldTypeConstraintsNotes
valuestring1–24 charactersThe string returned in the result for images at this level.
descriptionstring1–150 charactersNatural-language description used by the rating model.
Constraints for the levels array:
  • Minimum 2 items
  • Maximum 7 items
How the rating model uses levels The description of each level is passed directly to a vision language model (LLM), which selects the best match for each image. Because LLM inference is non-deterministic, results for borderline images may occasionally vary between requests. This endpoint is optimised for speed and accuracy at a high level of abstraction. Broad, clearly separated scales such as safe / suggestive / explicit or safe-for-children / safe-for-adults / nsfw perform reliably. Scales that depend on subtle visual distinctions — for example distinguishing between artistic and explicit nudity — are outside the intended scope and may produce inconsistent results. Test thoroughly before using such scales in production.

Response body

{
  "taskId": "tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP",
  "results": [
    { "url": "https://example.com/photo-1.webp", "rating": "sfw" },
    { "error_code": "UNKNOWN_ERROR" }
  ]
}
FieldTypeNotes
taskIdstringID of the task record created for this request.
resultsarrayOne entry per submitted URL, in the same order. Each entry is a success or failure item.

Success item

{ "url": "https://example.com/photo-1.webp", "rating": "sfw" }
FieldTypeNotes
urlstringThe submitted image URL.
ratingstringThe assigned rating value from the active scale.
When using the default scale, rating is one of sfw or nsfw. When using custom levels, rating is the value of the chosen level.

Failure item

{ "error_code": "UNKNOWN_ERROR" }
A failure item means that one image could not be rated. Other images in the same request are unaffected.

Limits

ConstraintValue
URLs per request1–10
Custom levels2–7
Level value1–24 characters
Level description1–150 characters

Pricing

Each URL in the request costs $0.0002. The total cost is deducted from your account balance before processing begins. If your balance is insufficient, the request returns 422 INSUFFICIENT_BALANCE.

Error responses

StatusCodeCause
400validation_errorRequest body fails schema validation.
401unauthorizedMissing or invalid API key.
422INSUFFICIENT_BALANCEAccount balance is too low for this request.
See Errors and Limits for the full error reference.