google/magika

Fast and accurate AI powered file content types detection

82
/ 100
Verified

Employs a lightweight deep-learning model (~few MBs) trained on ~100M files across 200+ content types, achieving ~99% accuracy with near-constant 5ms inference regardless of file size. Features per-content-type confidence thresholds and adjustable prediction modes (high/medium/best-guess) to control error tolerance. Available as a Rust CLI, Python API, and bindings for JavaScript/TypeScript and Go, with production deployment at Google processing hundreds of billions of files weekly.

10,151 stars and 5,346,208 monthly downloads. Used by 3 other packages. Actively maintained with 11 commits in the last 30 days. Available on PyPI.

Maintenance 17 / 25
Adoption 23 / 25
Maturity 25 / 25
Community 17 / 25

How are scores calculated?

Stars

10,151

Forks

495

Language

Python

License

Apache-2.0

Last pushed

Mar 03, 2026

Monthly downloads

5,346,208

Commits (30d)

11

Dependencies

2

Reverse dependents

3

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/ml-frameworks/google/magika"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.