Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Detector

FastAPI microservice that scores text content for AI-likelihood using perplexity analysis, burstiness measurement, and stylometric markers.

Build & Run

docker compose up --build -d

Test

# Health check
curl http://localhost:8000/health

# Detect AI content
curl -X POST http://localhost:8000/detect \
  -H "Content-Type: application/json" \
  -d '{"text": "Your text content here with at least fifty words so it passes the minimum word count threshold. Add more words to reach the minimum. The quick brown fox jumps over the lazy dog. This sentence adds more words. Another sentence for good measure. Keep going until we have enough words for the detector to analyze properly. Almost there now, just a few more words needed."}'

API

POST /detect

  • Body: { "text": "...", "min_words": 50 }
  • Returns: { "score", "label", "breakdown", "word_count" }
  • label: "AI" (score >= 60), "HUMAN" (score <= 35), "UNCERTAIN" (36-59)

GET /health

  • Returns: { "status": "ok" }

Claude Agent Tool Definition

{
  "name": "check_ai_score",
  "description": "Analyze text content to determine how likely it was written by AI. Returns a score from 0 (human) to 100 (AI), a label (AI/HUMAN/UNCERTAIN), and a breakdown of perplexity, burstiness, and stylometric sub-scores.",
  "input_schema": {
    "type": "object",
    "properties": {
      "text": {
        "type": "string",
        "description": "The text content to analyze for AI authorship."
      },
      "min_words": {
        "type": "integer",
        "description": "Minimum word count threshold. Returns an error if the text has fewer words.",
        "default": 50
      }
    },
    "required": ["text"]
  }
}

About

A FastAPI tool that can (try at least) detect if a text is written by a LLM and returns a score.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages