{"success":true,"data":{"ext":"ai","name":"Adobe Portable Document Format","description":"Adobe Illustrator Artwork (AI) is a vector graphics file format created and maintained by Adobe for use in Illustrator. It is commonly used for logos, illustrations, print layouts, and other editable graphic assets, and may also be embedded in publishing and design workflows. AI files can contain PostScript or PDF data, so files from untrusted sources should be opened with current software and caution.","mime":["application/postscript","application/illustrator"],"risk_level":"Safe","signatures":[{"hex":"25 50 44 46","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["eps","epsf","cdr","vsd","vsdx","cgm"],"usage":{"python":"def is_ai(file_path: str) -> bool:\n    \"\"\"Check if file is a valid AI by magic bytes.\"\"\"\n    signature = bytes([0x25, 0x50, 0x44, 0x46])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isAI(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x25, 0x50, 0x44, 0x46]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsAI(data []byte) bool {\n    signature := []byte{0x25, 0x50, 0x44, 0x46}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"},"category":"Images"}}