ediq
v2.0.0
Published
Official JavaScript/TypeScript client for Ediq AI Detection API - Education & HR modes. Detect AI-generated content with 96% accuracy.
Maintainers
Readme
Ediq - AI Detection SDK
Official JavaScript/TypeScript client for Ediq AI Detection API by Wyzcon.
Detect AI-generated content in educational documents (essays, assignments) and HR documents (resumes, cover letters, LinkedIn profiles) with 96% accuracy.
Installation
npm install ediqOr via CDN:
<script type="module">
import Ediq from 'https://unpkg.com/[email protected]/ediq.js';
</script>Quick Start
import Ediq from 'ediq';
const client = new Ediq('wyz_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
// Education: Detect AI in student essays
const result = await client.detectEdu('Student essay text...');
console.log(`AI Probability: ${result.probability}%`);
// HR: Detect AI in resumes
const result = await client.detectHR('Resume text...', { context: 'resume' });
console.log(`AI Probability: ${result.probability}%`);Get Your API Key
- Sign up at wyzcon.com
- Get your free API key
- Start detecting AI content
Two Detection Modes
🎓 Education Mode
For essays, assignments, and student work. Supports student baselines for personalized detection.
💼 HR Mode
For resumes, cover letters, and LinkedIn profiles. Optimized for professional document patterns.
Features
- ✅ 96% accuracy on 10,000+ tested documents
- ✅ 9-layer detection system
- ✅ Student baselines - Protect good writers (Education)
- ✅ HR context awareness - Resume, cover letter, LinkedIn (HR)
- ✅ File upload support - PDF, DOCX, TXT
- ✅ Image OCR - Handwritten & typed text
- ✅ TypeScript support - Full type definitions
- ✅ Works everywhere - Node.js & Browser
Education Mode Examples
Basic Education Detection
import Ediq from 'ediq';
const client = new Ediq('your_api_key');
// Analyze student essay
const result = await client.detectEdu('The importance of renewable energy...');
console.log(`AI: ${result.probability}%`);
console.log(`Assessment: ${result.assessment}`);
console.log(`Mode: ${result.mode}`); // "education"With Student Baseline
Compare against a student's verified previous work:
const result = await client.detectEdu('Current submission...', {
studentId: 'john_doe',
baseline: 'Previous authentic work...'
});
console.log(`AI: ${result.probability}%`);
console.log(`Baseline Similarity: ${result.baselineSimilarity}`);Detect from File (Education)
// Browser
const file = document.querySelector('input[type="file"]').files[0];
const result = await client.detectEduFile(file);
console.log(`AI: ${result.probability}%`);Detect from Image (Handwritten)
const image = document.querySelector('input[type="file"]').files[0];
const result = await client.detectEduImage(image, { handwritten: true });
console.log(`AI: ${result.probability}%`);Formal Writing Mode
For academic papers and formal essays (reduces false positives):
const result = await client.detectEdu('Formal academic paper...', {
formalMode: true
});HR Mode Examples
Detect AI in Resume
import Ediq, { HRContextType } from 'ediq';
const client = new Ediq('your_api_key');
// Analyze resume text
const result = await client.detectHR(
'Experienced software engineer with 5+ years...',
{ context: 'resume' } // or HRContextType.RESUME
);
console.log(`AI: ${result.probability}%`);
console.log(`Assessment: ${result.assessment}`);
console.log(`Mode: ${result.mode}`); // "hr"Detect AI in Cover Letter
const result = await client.detectHR(
'I am writing to express my interest...',
{ context: 'cover_letter' }
);
console.log(`AI: ${result.probability}%`);Detect AI in LinkedIn Profile
const result = await client.detectHR(
'Passionate technology leader driving innovation...',
{ context: 'linkedin_profile' }
);
console.log(`AI: ${result.probability}%`);Detect from HR File
// Analyze resume PDF
const file = document.querySelector('input[type="file"]').files[0];
const result = await client.detectHRFile(file, { context: 'resume' });
console.log(`AI: ${result.probability}%`);With Comprehensive Report
const result = await client.detectHR(resumeText, {
context: 'resume',
includeReport: true
});
console.log(result.report); // Detailed writing analysisHR Context Types
| Context | Use For |
|---------|---------|
| resume | CV, resume documents |
| cover_letter | Job application cover letters |
| linkedin_profile | LinkedIn about/summary sections |
| other | Other professional documents |
Check Usage
const usage = await client.usage();
console.log(`Used: ${usage.used}/${usage.limit}`);
console.log(`Remaining: ${usage.remaining}`);
console.log(`Tier: ${usage.tier}`);DetectionResult Properties
| Property | Type | Description |
|----------|------|-------------|
| probability | number | AI probability (0-100) |
| assessment | string | Category: likely_human, borderline, suspicious, likely_ai, highly_likely_ai |
| confidence | number | Confidence score (0-100) |
| wordCount | number | Words analyzed |
| mode | string | Detection mode: "education" or "hr" |
| scanId | number | Saved scan ID |
| baselineSimilarity | number | Baseline match (Education only) |
| hrContext | string | Document context (HR only) |
| report | object | Full writing analysis (if requested) |
| layers | object | Layer-by-layer breakdown |
Error Handling
import Ediq, { EdiqError, RateLimitError, AuthenticationError } from 'ediq';
const client = new Ediq('your_api_key');
try {
const result = await client.detectEdu('Text...');
} catch (error) {
if (error instanceof AuthenticationError) {
console.log('Invalid API key');
} else if (error instanceof RateLimitError) {
console.log('Rate limit exceeded - wait and retry');
} else if (error instanceof EdiqError) {
console.log(`API error: ${error.message}`);
}
}TypeScript
Full TypeScript support with type definitions:
import Ediq, { DetectionResult, HRContextType } from 'ediq';
const client = new Ediq('your_api_key');
const result: DetectionResult = await client.detectHR(text, {
context: HRContextType.RESUME
});Migration from v1.x
The old methods still work but are deprecated:
// Old (still works, defaults to education mode)
const result = await client.detect('Text...');
const result = await client.detectFile(file);
const result = await client.detectImage(image);
// New (explicit mode selection)
const result = await client.detectEdu('Text...');
const result = await client.detectHR('Text...', { context: 'resume' });Browser Usage
<!DOCTYPE html>
<html>
<head>
<title>Ediq Detection</title>
</head>
<body>
<textarea id="text"></textarea>
<button onclick="detect()">Detect AI</button>
<div id="result"></div>
<script type="module">
import Ediq from 'https://unpkg.com/[email protected]/ediq.js';
window.detect = async function() {
const client = new Ediq('your_api_key');
const text = document.getElementById('text').value;
const result = await client.detectEdu(text);
document.getElementById('result').textContent =
`AI: ${result.probability}% (${result.assessment})`;
};
</script>
</body>
</html>Documentation
Full documentation at docs.wyzcon.com
License
MIT License
