> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelslab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NSFW Image Check

> Used to check if an image is NSFW or not.

## Request

Send a `POST` request to below endpoint to check if an image is nsfw or not.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v3/nsfw_image_check' \
```

## Body

```json json theme={null}
{  
    "key": "your_api_key",  
    "init_image": "http://your-image-url.com",
    "threshold": 0.5
}
```

<Note>
  `threshold` is a float between 0 and 1 (default: 0.5).
</Note>


## OpenAPI

````yaml POST /nsfw_image_check
openapi: 3.1.0
info:
  title: ModelsLab General API
  description: >-
    General utility endpoints for ModelsLab API including subscription
    management, content moderation, and file handling
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api
    description: Main API server (for endpoints without version prefix)
  - url: https://modelslab.com/api/v3
    description: API v3 server
  - url: https://modelslab.com/api/v5
    description: API v5 server
  - url: https://modelslab.com/api/v6
    description: API v6 server
security: []
paths:
  /nsfw_image_check:
    post:
      summary: NSFW image check
      description: This endpoint is useful to check if an image is nsfw or not
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NSFWImageCheckRequest'
      responses:
        '200':
          description: NSFW image check response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NSFWImageCheckResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      servers:
        - url: https://modelslab.com/api/v3
components:
  schemas:
    NSFWImageCheckRequest:
      type: object
      required:
        - key
        - init_image
      properties:
        key:
          type: string
          description: Your enterprise API Key used for request authorization
        init_image:
          type: string
          format: uri
          description: The image you want to check
        threshold:
          type: number
          description: Floating-point threshold score for NSFW detection (image or video)
          minimum: 0
          maximum: 1
          default: 0.5
    NSFWImageCheckResponse:
      type: object
      properties:
        images:
          type: string
          format: uri
          description: The image URL that was checked
        has_nsfw_concept:
          type: array
          items:
            type: boolean
          description: Array indicating if the image has NSFW content
    Error:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message

````