---
title: "POST /nsfw/image"
method: POST
path: "/nsfw/image"
---

# POST /nsfw/image

`POST /nsfw/image`

Binary NSFW classification for image URLs or data URLs

## Request body

- NsfwImageRequest — NSFW image classification request payload
  - `image_urls` union — Primary input field. One URL or an array of URLs (only the first 10 are processed).
    - string, uri
    - string[]
  - `imageUrls` union — Alias for image_urls. One URL or an array of URLs (only the first 10 are processed).
    - string, uri
    - string[]
  - `imageUrl` string, uri — Alias for a single image URL
  - `imageDataUrl` string — Base64 data URL for a single image (format: data:image/[type];base64,[data])
  - `imageDataUrls` string[] — Base64 data URLs for multiple images (only the first 10 are processed)
  - `model` string — Only supported value is nsfw-classifier

## Response `200`

NSFW classification response

- NsfwImageResponse
  - `model` string — The classifier model used
  - `requestId` string — Request ID (if available; helpful for support)
  - `inputCount` integer — Number of images processed (max 10)
  - `cost` number — Final charged amount (after discounts and currency conversion)
  - `currency` string — Currency of the charge
  - `truncated` boolean — True if more than 10 images were provided
  - `has_nsfw_concepts` boolean[] — Per-image NSFW flags in input order
  - `is_nsfw` boolean — True if any image was flagged

## Other responses

- `400` — Bad Request - Invalid image URLs, JSON parsing error, or policy violation
- `401` — Unauthorized - Invalid session or API key
- `429` — Too Many Requests - Rate limit exceeded
- `500` — Internal Server Error - NSFW classification failed

---

[API](https://skmtc.dev/nano-gpt/apis/nanogpt-api.md) · [All operations](https://skmtc.dev/nano-gpt/apis/nanogpt-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nano-gpt/nanogpt-api/revisions/584e96d146b0/schema)
