Classify an image for safety
cloudcdn_ai_moderateClassify an image for unsafe content before publishing and get a safe verdict plus category scores for nudity, violence, drugs, hate symbols, and gore.
Instructions
Classify one image for unsafe content before publishing it. To describe an image instead use cloudcdn_ai_alt; to find images use cloudcdn_assets or cloudcdn_search. Calls GET /api/ai/moderate and returns its JSON: url (the path sent), safe (true only when verdict is "safe"), verdict ("safe", "borderline" or "unsafe"), categories (a score from 0 to 1 for each of nudity, violence, drugs, hateSymbols and gore), reasoning (one sentence from the model), model, source ("ai" or "cached"), degraded (true for a cached answer) and dateGenerated (ISO 8601). When the model's answer cannot be parsed, verdict is "borderline" with every score 0. Deciding what to block is left to the caller; nothing is removed, and the API caches the verdict per path for 24 hours. Fails: an absolute http(s) URL, or a path containing "..", is rejected (HTTP 400, exit code 69); an image the API cannot fetch, HTTP 404 (exit code 69); the vision model unavailable, HTTP 503 (exit code 75 after retries); no valid key, HTTP 401 (exit code 77).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "cloudcdn_ai_moderate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The image's path on the CDN, not an absolute URL: the path field from cloudcdn_assets or cloudcdn_search with a leading slash, e.g. "/acme/v1/hero.webp". |