@sharpapi/sharpapi-node-detect-ai
v1.0.1
Published
SharpAPI.com Node.js SDK for detecting AI-generated content in text
Maintainers
Readme

AI Content Detector API for Node.js
Detect AI-generated content in text — powered by SharpAPI AI.
SharpAPI AI Content Detector analyzes text to determine if it was generated by AI (ChatGPT, Claude, etc.). Returns likelihood percentage, assessment, detailed reasoning, and flagged portions of text with specific patterns detected.
Table of Contents
- Requirements
- Installation
- Usage
- API Documentation
- Response Format
- Examples
- Use Cases
- API Endpoint
- Related Packages
- License
Requirements
- Node.js >= 16.x
- npm or yarn
Installation
Step 1. Install the package via npm:
npm install @sharpapi/sharpapi-node-detect-aiStep 2. Get your API key
Visit SharpAPI.com to get your API key.
Usage
const { SharpApiDetectAiService } = require('@sharpapi/sharpapi-node-detect-ai');
const apiKey = process.env.SHARP_API_KEY; // Store your API key in environment variables
const service = new SharpApiDetectAiService(apiKey);
const text = `In conclusion, this comprehensive analysis delves into the multifaceted
aspects of modern technology. Furthermore, it is crucial to leverage these innovative
solutions to foster growth and streamline operations.`;
async function analyzeText() {
try {
// Submit processing job
const statusUrl = await service.detectAiContent(text);
console.log('Job submitted. Status URL:', statusUrl);
// Fetch results (polls automatically until complete)
const result = await service.fetchResults(statusUrl);
console.log('Result:', result.getResultJson());
} catch (error) {
console.error('Error:', error.message);
}
}
analyzeText();API Documentation
Methods
detectAiContent(text)
Analyzes the provided text to detect if it was generated by AI.
Parameters:
text(string, required): The text content to analyze
Returns: Promise - Status URL for polling results
Use Cases
- Academic Integrity: Detect AI-generated essays and assignments
- Content Verification: Verify authenticity of submitted articles and blog posts
- Publishing: Screen manuscripts for AI-generated content
- Hiring: Analyze cover letters and writing samples
- SEO/Content Marketing: Ensure content meets quality and originality standards
- Social Media: Identify AI-generated comments or posts
- Legal/Compliance: Verify document authenticity
License
This project is licensed under the MIT License. See the LICENSE.md file for details.
Support
- Documentation: SharpAPI.com Documentation
- Issues: GitHub Issues
- Email: [email protected]
