jevgram
jevgram is a command-line tool that checks if a document is AI-generated. Similar to pangram but a lot cheaper (you'll need API key from https://console.typesafe.ai/login - free, super easy, couple of clicks)
Supported inputs
- Plain text and source-like text files, such as
.txt,.md,.tex, and similar files - PDF files
- DOCX files
Minimal example:
Go to https://console.typesafe.ai/login and create an API key. Copy the key
$ export TYPESAFE_API_KEY=apikey_...
$ pipx install jevgram
$ jevgram README.md # try jevgram on this document
File: README.md
Type: text
Characters extracted: 3044
Characters sent to JEV: 3044
Model: jev-1.13.0
Prediction: AI
Probability AI: 79.00%
Probability human: 21.00%
Confidence: 58.00%
PDF extraction uses pypdf. DOCX extraction is handled directly from the Word XML contained in the .docx file.
Image-heavy PDFs
If a PDF has very little extractable text and images on most pages, jevgram
stops before calling JEV and asks you to rerun with --ocr. OCR is optional;
it uses the locally installed OCRmyPDF and Tesseract tools, and leaves the
original PDF unchanged.
Install OCRmyPDF on Ubuntu/Debian with sudo apt install ocrmypdf, or on macOS
with brew install ocrmypdf. English OCR is available by default. For other
languages, install the corresponding Tesseract language data (for example,
sudo apt install tesseract-ocr-hrv on Ubuntu/Debian, or
brew install tesseract-lang on macOS).
jevgram scanned.pdf --ocr
jevgram croatian.pdf --ocr --ocr-language hrv
On Windows, --ocr can use a native OCRmyPDF installation if it is on PATH;
see the OCRmyPDF Windows installation guide.
Detailed instructions
Install (MacOS, Linux; Windows coming up)
pipx install jevgram
Get a TypeSafe API key
jevgram needs a TypeSafe API key to call JEV.
-
Login to TypeSafe: https://console.typesafe.ai/login
(if you don't have an account, create one, for example just clicking on "Login with Google")
-
Click API Keys on the left, then Create API key on the right
-
Copy the key and save it somewhere private.
-
Set the key in your terminal:
export TYPESAFE_API_KEY="paste-your-key-here"
To avoid setting the key every time, add the export TYPESAFE_API_KEY=... line to your shell profile, such as ~/.bashrc or ~/.zshrc.
You can also pass a key directly with --api-key, but environment variables are safer/easier.
Usage
jevgram document.txt
jevgram paper.pdf
jevgram manuscript.docx --json
By default, long files are sampled down to 32,000 characters using the beginning, middle, and end of the extracted text. To send the whole extracted document, use:
jevgram document.txt --max-chars 0
To inspect extraction without calling JEV:
jevgram document.pdf --extract-only
To inspect the request body without calling JEV:
jevgram document.txt --dump-request
Output
Human-readable output includes the predicted class, AI probability, human probability, confidence when provided by JEV, and whether the input was truncated. --json produces machine-readable output for scripts.
Cost
This app is open-source/free on my end, but it uses JEV API, which is not free. Works like this: once you create a TypeSafe account and API key, you may get a credit for $5 free usage. jevgram is intended for personal use, and you can check a lot of documents for $5 (I tried dozens so far, I have yet to spend 1 cent). Once you use up the free credit, jevgram will fail and politely tell you to add credit card number to TypeSafe (to be fair, this is untested because I have not reached that point yet)
Notes
Authorship detection is probabilistic, so if you run jevgram multiple times on the same document, you'll get different (though pretty similar) probablities
Metadata
Release files for jevgram 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| jevgram-0.1.7.tar.gz | 11.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jevgram-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.7 kB
Release files / jevgram-0.1.7.tar.gz
| Download URL | jevgram-0.1.7.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6248dc5ab03db824fa4f8d77a4313c0c636405f9a0d003fd1cedf87e5d7f916d
|
|
BLAKE2b-256 checksum How to use checksums |
711d89a55de7feb1fd227032ff921406bec65fe4088c2a8b53742fed66cfd1ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.4
|
Release files / jevgram-0.1.7-py3-none-any.whl
| Download URL | jevgram-0.1.7-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ecaad8ec16c8c5cd93c6883a75e7e7e13494e3c55c98627786d5fd32c139289
|
|
BLAKE2b-256 checksum How to use checksums |
7cd28a509f5fee429f9b09f3631a175a0c5da07d2b3c2e61631d415240256428
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.4
|
Security for jevgram 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.