What it does
POST an image URL or base64 image and receive an NSFW confidence score (0–1). Optional threshold_advisory triggers a per-class flagged boolean. SSRF-hardened: private IP ranges blocked before any payment is attempted. Composes naturally with image-generation pipelines and ScrapePay — any agent that handles user-facing or scraped imagery should gate on ImageGuard before storing or displaying content. Currently NSFW-only; multi-class moderation (violence, weapons, hate, self-harm, gore, drugs) is on the roadmap.
When to use it
- Screen a generated image from an image-generation tool before storing in a user-facing gallery
- Validate scraped images from ScrapePay before displaying to users
- NSFW gate for a user-submitted-image pipeline
- Safety check on screenshots before including them in published reports
Request schema
{
"image_url": "https://example.com/photo.jpg",
"threshold_advisory": 0.7
} Response schema
{
"success": true,
"scores": {
"nsfw": 0.023
},
"flagged": {
"nsfw": false
},
"scored_at": "2026-05-15T13:48:46Z",
"model_version": "imageguard-v1.0",
"payment_hash": "0x..."
} Code example — TypeScript via MCP
Install the MCP server once; all 22 services become tool calls.
// Configure @melis-ai/x402-tools-mcp in your MCP client
// Then call the tool:
const result = await mcpClient.callTool("imageguard", {
"image_url": "https://example.com/photo.jpg",
"threshold_advisory": 0.7
});
console.log(result);
// ["success","scores","flagged","scored_at","model_version","p... → MCP setup guide Code example — Python via direct HTTP
import requests
# x402 payment header must be set by your wallet client
# See x402.org for client libraries
headers = {
"Content-Type": "application/json",
"x-payment": "<signed-x402-payment-header>",
}
resp = requests.post(
"https://imageguard.melis.ai/score",
json={
"image_url": "https://example.com/photo.jpg",
"threshold_advisory": 0.7
},
headers=headers,
)
print(resp.json()) Code example — curl with internal key bypass
For testing with an issued internal key (skips x402 payment flow):
curl -X POST https://imageguard.melis.ai/score \
-H "Content-Type: application/json" \
-H "x-internal-key: YOUR_KEY" \
-d '{"image_url":"https://example.com/photo.jpg","threshold_advisory":0.7}' How is this different from alternatives?
ImageGuard vs Sightengine
Sightengine has broader class coverage (violence, weapons, etc) but requires a $29/month subscription. ImageGuard is NSFW-only at $0.002 pay-per-call with no signup — the right fit when NSFW is the only check you need.
ImageGuard vs Hive Moderation
Hive has multi-class coverage and faster latency but requires an account and API key. ImageGuard is x402-native — no account, no API key, composable with any x402-aware agent.
FAQ
Does it work without an account?
Yes. x402 is account-less. Your agent's wallet signs the payment and retries automatically. No registration, no API key, no subscription.
What happens on failure?
Returns HTTP 403 for SSRF-blocked URLs, HTTP 415 for unsupported image formats, HTTP 413 for base64 images over 10MB. None of these settle payment. Returns HTTP 502 with no_settlement:true (no charge) if the upstream fetcher cannot reach the image URL — some hosts (notably Wikipedia, certain CDNs) may be unreachable. Use direct/CDN URLs from S3, R2, Cloudflare Images, or stable image hosts for reliable scoring.
What is the rate limit?
60 requests per minute per IP. 1000 requests per minute global.
Is this open-source?
The service code is closed-source for security reasons. The MCP wrapper that calls it is open-source and MIT-licensed: github.com/mizukaizen/x402-tools-mcp .
Who built this?
Part of the melis.ai agent infrastructure stack. Running on a dedicated Helsinki VPS since early 2026. Contact sean@melis.ai.