API Endpoint
- URL:
https://text-tad.droplinked.workers.dev/ - Method:
POST - Content-Type:
application/json
Authentication
Access to the API requires an API key. 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_detector" for this functionality. |
text | String | Yes | The text to be analyzed 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 clean or mildly affectionate text:
false
Guidelines for NSFW Detection
The API follows these rules:- Definition of NSFW: Flags text containing:
- Explicit language or strong sexual content.
- Graphic violence.
- Hate speech or inappropriate material.
- Exclusions: Does not flag:
- Mildly affectionate or romantic phrases (e.g., “I would like to kiss you”) unless explicitly inappropriate.
- General communication without NSFW elements.
- Output: Returns only:
trueif NSFW content is detected.falseif the text is clean or non-explicit.
- Restrictions:
- No explanations, labels, or additional text in the response.
- Strict boolean output.
Example Transformations
- Input: “This video is full of explicit adult scenes!” → Output:
true - Input: “Hey, let’s catch up later. I have some news!” → Output:
false - Input: “I would like to kiss you.” → Output:
false - Input: “I want to do explicit things to you.” → Output:
true
JavaScript Example
Below is an example of how to use the NSFW Detector API in JavaScript with thefetch API:
Error Handling
- Invalid API Key: Returns an error message (e.g., “Unauthorized”).
- Missing Fields: If
command_nameortextis missing, the API may return an error or fail silently. - Network Issues: Handle errors in the
.catchblock of thefetchcall.
Example Error Output
Best Practices
- Text Clarity: Provide clear, complete text inputs for accurate detection.
- Context Awareness: Understand that the API focuses on explicit content, not implied meanings.
- Moderation Workflow: Integrate the API into content pipelines to filter NSFW material efficiently.
- Testing: Test with various inputs to ensure alignment with your moderation standards.