{"id":"image-jaii","mimeType":"image/jaii","name":"JPEG AI Image","shortName":"JPEG-AI","category":"Graphics \u0026 Learning-Based Compression","extensions":[".jaii"],"description":"The image/jaii MIME type represents a JPEG AI coded image. Standardized in 2025 as ISO/IEC 6048 (ITU-T T.840), JPEG AI is the first international image coding standard based entirely on an end-to-end deep learning (neural network) architecture. Rather than using traditional block-based transforms like the DCT, it uses a variational autoencoder with hyperpriors to achieve unprecedented compression efficiency. Uniquely, it provides a compact compressed-domain representation (latent tensors) designed to be directly consumed by computer vision algorithms without requiring full image reconstruction.","seo":{"title":"image/jaii MIME Type | Complete Developer Reference for JPEG AI","description":"Complete reference for the image/jaii MIME type: magic bytes, neural network-based compression architecture, developer snippets, and JPEG AI specifications.","faqs":[{"question":"What is the difference between standard JPEG and JPEG AI?","answer":"Standard JPEG uses hand-engineered, block-based Discrete Cosine Transforms (DCT) to compress images. JPEG AI replaces these with globally optimized deep neural networks (variational autoencoders), achieving up to a 30% reduction in file size at equivalent visual quality while natively supporting continuous variable-rate coding and machine vision tasks."},{"question":"Can I open image/jaii files in a web browser?","answer":"No. JPEG AI is a nascent standard (finalized in 2025) and currently lacks native support in modern web browsers. Viewing these files requires the official JPEG AI Reference Software or specialized viewer plugins."},{"question":"What are the magic bytes for a JPEG AI file?","answer":"JPEG AI utilizes the ISOBMFF/HEIF container structure. A valid file begins with the standard 'ftyp' box, typically featuring 'jaii' as the major brand. You will find the ASCII sequence 'ftypjaii' starting at byte offset 4."}]},"index":{"compression":["Lossy (Variational Autoencoder / Neural Network)"],"browserSupport":{"score":1,"label":"None"},"commonUses":["Machine Vision and AI Workflows","Cloud Storage Image Optimization","High-Efficiency Mobile Image Capture","Visual Surveillance"]},"technical":{"magicBytes":{"hex":".. .. .. .. 66 74 79 70 6A 61 69 69 (Size + ftypjaii)","ascii":"....ftypjaii"},"container":"ISOBMFF / HEIF","compressionAlgorithm":["Deep Neural Network (Variational Autoencoder with Hyperpriors)"],"colorDepth":["8-bit","10-bit","12-bit","16-bit","Wide-gamut \u0026 HDR"],"transparency":true,"animation":true,"metadata":{"exif":true,"xmp":true,"iccProfile":true},"alphaChannel":true,"progressiveLoading":true,"hdrSupport":true},"history":{"developer":"Joint Photographic Experts Group (ISO/IEC JTC 1 / ITU-T)","released":"2025","specification":"ISO/IEC 6048-5:2025 (File Format) / ITU-T T.840.1"},"browserSupport":{"chrome":false,"chromeVersion":"None","firefox":false,"firefoxVersion":"None","safari":false,"safariVersion":"None","edge":false,"edgeVersion":"None","internetExplorer":false},"softwareSupport":[{"name":"JPEG AI Reference Software (T.JPEG-AI-RS)","logo":""}],"conversion":{"convertTo":["jpeg","png","jxl"],"convertFrom":["jpeg","png","heic"]},"developer":{"httpHeaders":[{"header":"Content-Type","value":"image/jaii"}],"htmlAccept":"image/jaii, .jaii","fileDetection":["Check the standard ISOBMFF header. The first 4 bytes indicate the length of the 'ftyp' box.","Verify bytes 4-7 are exactly 'ftyp' (66 74 79 70).","Verify the major brand or one of the compatible brands within the 'ftyp' box contains the 'jaii' brand string (6A 61 69 69)."]},"prosCons":{"pros":["Provides state-of-the-art compression efficiency, dramatically outperforming traditional block-transform codecs like JPEG or HEIC [2.2.2]","Allows machine vision models to process the raw 'latent tensors' in the compressed stream natively, drastically reducing inference latency by bypassing image reconstruction","Supports 'multi-branch decoding', enabling a single codestream to be decoded at varying complexity levels depending on the target hardware's power (e.g., mobile NPU vs. cloud GPU)"],"cons":["Lacks native decoding support in current web browsers and legacy operating systems [3.2.1]","Decoding relies on neural network inference which can be heavily computationally demanding on hardware lacking dedicated AI accelerators (NPUs/GPUs)","Introduces new vectors for security and forensic analysis, as end-to-end learned structures react differently to adversarial attacks compared to traditional formats"]},"specifications":{"url":"https://jpeg.org/jpegai/","rfc":"","mimeAliases":[]},"developerSnippets":{"python":"import magic\n# Note: Due to its novelty, older versions of libmagic may just output 'video/mp4' or 'application/octet-stream' based on the ISOBMFF container.\nprint(magic.from_file('ai_image.jaii', mime=True))","nodejs":"const fs = require('fs');\n// Manually detecting the JPEG AI brand in the ISOBMFF ftyp box\nconst buffer = Buffer.alloc(12);\nconst fd = fs.openSync('ai_image.jaii', 'r');\nfs.readSync(fd, buffer, 0, 12, 0);\nfs.closeSync(fd);\nconst isFtyp = buffer.toString('ascii', 4, 8) === 'ftyp';\nconst isJaii = buffer.toString('ascii', 8, 12) === 'jaii';\nconsole.log(isFtyp \u0026\u0026 isJaii);","go":"import (\n    \"bytes\"\n    \"net/http\"\n)\n// Custom ISOBMFF detection for the JPEG AI brand\n// func isJPEG_AI(buf []byte) bool {\n//     return len(buf) \u003e 12 \u0026\u0026 string(buf[4:8]) == \"ftyp\" \u0026\u0026 string(buf[8:12]) == \"jaii\"\n// }","php":"// Standard PHP setups may default to identifying the ISOBMFF container.\n$mime = mime_content_type('ai_image.jaii');\necho $mime; // Depending on server updates, may need manual hex sniffing."},"relatedFormats":["jpeg","heic","jxl","avif"]}
