API Endpoint
- URL:
https://text-tad.droplinked.workers.dev/ - Method:
POST - Content-Type:
application/json
Authentication
An API key is required for access. Contact Droplinked support to obtain your API key. Include it in the request headers as follows:- Header:
api-key - Value:
<YOUR_API_KEY>(provided by Droplinked)
Request Format
The API accepts a JSON payload with the following fields:Request Body
| Field | Type | Required | Description |
|---|---|---|---|
command_name | String | Yes | Must be set to "NSFW_image_detector" for this functionality. |
ImageUrl | String | Yes | URL of the image to analyze for NSFW content. |
Example Request Body
Response Format
- Content-Type:
text/plain - Response: A plain boolean value (
trueorfalse) indicating the presence of NSFW content, with no additional text or formatting.
Example Responses
- For NSFW content:
true - For safe content:
false
Guidelines for NSFW Detection
The API follows these criteria based on an internally generated textual description of the image:- NSFW Indicators (returns
trueif detected):- Nudity or Partial Nudity: Exposed skin, breasts, genitals, or buttocks.
- Revealing or Transparent Clothing: Sheer lingerie, underwear, or excessive exposure.
- Sexually Suggestive Content: Provocative poses, intimate settings, or adult themes.
- Explicit Symbols or Contexts: Adult toys, suggestive gestures, or explicit imagery.
- Safe Content (returns
false):- Descriptions lacking the above indicators (e.g., fully clothed individuals, neutral settings).
- Rules:
- Analyzes only the generated description from the image.
- Avoids false positives by requiring clear NSFW elements.
- Returns a plain boolean (
trueorfalse) with no explanations.
Example Scenarios
- Generated Description: “A woman in a sheer bodysuit, partially exposing her chest in an intimate setting” → Output:
true - Generated Description: “A woman in a brick-colored cropped sweatshirt against a plain background” → Output:
false
JavaScript Example
Below is an example of how to use the NSFW Image Detector API in JavaScript with thefetch API:
Error Handling
- Invalid API Key: Returns an error message (e.g., “Unauthorized”).
- Missing Fields: If
command_nameorImageUrlis missing, the API may return an error or fail silently. - Invalid Image URL: If the URL is inaccessible or invalid, an error may occur.
- Network Issues: Handle errors in the
.catchblock of thefetchcall.
Example Error Output
Best Practices
- Image Quality: Use clear, high-resolution images for accurate description generation.
- URL Accessibility: Ensure the
ImageUrlis publicly accessible or properly authenticated. - Moderation Integration: Embed the API in workflows to filter NSFW images efficiently.
- Testing: Test with a variety of images to confirm detection aligns with your standards.