I need to detect AI-generated vs human-written text in a Laravel application. Most AI detectors I've tried (including SuperAnnotate's Hugging Face model) produce too many false positives: scoring clearly human-written text as 99% AI.
What I've Tried:
SuperAnnotate AI detector (self-hosted): poor performance on newer models and high false positives.
Several other online and open-source tools(BerT etc): consistently unreliable on edited or natural human text.
I'm looking for self-hosted, free, open-source solutions that I can run locally or on my server(VPS).
Working: In my laravel project, /detect api will be called which results in the response of the is_ai, score.
Requirements
Open source
Good balance of accuracy with low false positive rate on human-written content
Usable via API or callable from PHP
Main Question
What is the best way to integrate an open-source AI text detector into Laravel?
Possible approaches I'm considering:
Running a Python-based model (Hugging Face Transformers, DetectGPT, ZipPy, etc.) via a separate service and calling it from Laravel
Using Laravel queues + shell execution
Any PHP-native or Laravel packages for this purpose
Recommended architecture for production use (performance, scaling, etc.)
If you've successfully implemented something similar, please share:
Which open-source detector/model you used
How you set up the integration (code examples, especially controller/service setup, queuing, etc.)
Any tips for reducing false positives
Any guidance or working examples would be very helpful. Thank you!