Magika standard_v3_3
File type detection model for onnxruntime-web (fp32). Runs on WASM —
3.0 MB downloaded once from models.skillsafe.ai, then cached for every SkillSafe app that
uses it. Inference happens on your device; nothing you enter is uploaded to load it, and it never costs a credit.
Weights from GitHub · google/magika, pinned at 3f2cb8537dce.
Details
magika-standard-v3-3@3f2cb8533f2cb8537dce123587bfb3535a402145adcba2c7Files
Each file is served at an immutable URL; the canonical form is the SHA-256 itself. Tokenizer and config JSON are not here by design — they ship in your app bundle.
| Path | Format | Size | SHA-256 | |
|---|---|---|---|---|
model.onnx | onnx | 3.0 MB | fe2d2eb49c5f…69ec8c |
Signature
Graph inputs and outputs read from the ONNX bytes at vetting — the tensor names your session.run() call feeds and reads. Symbolic dimensions are shown by name.
Inputs
bytesint32 [unk__214, 2048]
Outputs
target_labelfloat32 [unk__215, 214]
Use it in an app declaration · SDK loader · onnxruntime-web · URLs — generated from this entry
Add to the body of POST /v1/apps/{slug}/releases (or a release session). An unknown or withdrawn model is refused with a 400 naming it; the app page then shows "downloads 3.0 MB · runs on your device" and /models.txt carries the attribution.
{
"models": [
{
"id": "magika-standard-v3-3",
"revision": "3f2cb853"
}
]
} Streams with progress, verifies the SHA-256 against the catalogue, keeps a durable copy in the app's Cache API and reports whether the bytes came from cache or the network.
<script src="/sdk.js"></script> <!-- vendored from https://skillsafe.ai/apps-sdk/v1.js -->
const ss = SkillSafe.init({ slug: "your-app" });
const caps = await ss.models.capabilities(); // { webgpu, wasm, wasmSimd, storage }
const bytes = await ss.models.load("magika-standard-v3-3@3f2cb853", "model.onnx", {
onProgress: (p) => (bar.style.width = Math.round(p.ratio * 100) + "%"),
}); // ArrayBuffer — SHA-256 verified, cached
// Later visits: await ss.models.status("magika-standard-v3-3@3f2cb853") → { cached: [...], missing: [] }
// Background prefetch on a landing page: ss.models.warm("magika-standard-v3-3@3f2cb853") The runtime itself ships in your bundle as a vetted {path, sha256} reference — only the weights come from the registry. Pass the bytes in; do not re-fetch by URL.
// onnxruntime-web 1.19.0 ships in your bundle as a vetted {path, sha256} reference —
// dist/ort.wasm.bundle.min.mjs + dist/ort-wasm-simd-threaded.wasm.
import * as ort from "./ort.wasm.bundle.min.mjs";
ort.env.wasm.wasmPaths = { wasm: "/ort-wasm-simd-threaded.wasm" }; // object form, never a prefix string
ort.env.wasm.numThreads = 1; // app hosts have no COOP/COEP
const bytes = await ss.models.load("magika-standard-v3-3@3f2cb853", "model.onnx", { onProgress });
const session = await ort.InferenceSession.create(new Uint8Array(bytes), {
executionProviders: ["wasm"],
});
// Feeds are named after the graph inputs (read from the file, see the signature above):
const feeds = {
"bytes": new ort.Tensor("int32", new Int32Array(n), [/* unk__214 */ 1, 2048]),
};
const out = await session.run(feeds);
const target_label = out["target_label"].data; // float32 [unk__215, 214] Immutable, credential-free, Access-Control-Allow-Origin: *, range requests honoured. The host refuses requests carrying a foreign Origin; a plain curl is fine.
https://models.skillsafe.ai/magika-standard-v3-3@3f2cb853/model.onnx curl -sSL -o model.onnx "https://models.skillsafe.ai/magika-standard-v3-3@3f2cb853/model.onnx"
shasum -a 256 model.onnx # fe2d2eb49c5f88a9e0a6c048e15d6ffdf86235519c2afc535044de433169ec8c Evaluation
onnx.checker + onnxruntime CPU smoke run with zero-filled inputs at the declared shapes; per-file SHA-256 pinned to the source — imported as published upstream, then checked. Evaluated Sep 22, 2026.
Runs under onnxruntime
Zero-filled inputs at the declared shapes, CPU execution provider on the converter host; the check is that the graph loads, runs, and emits the declared output shapes.
model.onnx: bytes[1,2048] → target_label[1,214] 5.5 ms
Toolchain: python 3.12.13 · platform Darwin 25.6.0 arm64 · torch 2.10.0 · onnx 1.23.0 · onnxruntime 1.30.0. Recipe models/recipes/magika-standard-v3-3.yaml (6ab250cd7767). Full manifest.json
Licence & attribution
Apache-2.0 · licence text · notice
Magika standard_v3_3 model and content-type knowledge base: Copyright 2024 Google LLC, licensed under the Apache License, Version 2.0. https://github.com/google/magika
Apps that declare this model get this text in their generated /models.txt, so a licence that requires a notice always carries one.
Every file here was approved by exact SHA-256 after a structural audit of the graph, fetched from a content-pinned source, and is served credential-free at an immutable URL. The SDK re-verifies the hash on your device before it caches or returns anything. Missing a variant? Request it — or read how the registry works.