# PNG Header Inspector

> PNG Header Inspector is a paid API for AI agents from file-formats.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Parses the first 33 bytes of a PNG file to extract width, height, bit depth, colour type, and interlace method, and validates the IHDR CRC checksum.

## Facts

- Endpoint: GET https://file-formats.x402tookit.com/png-header?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/png-header-inspector-842a2faf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_x9tfEHtMM2st-V0vvnLWH

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability png-header-inspector-842a2faf
```

Example prompt: Can you inspect this PNG's header and tell me its dimensions, colour type, bit depth, and whether the IHDR CRC is valid? Here are the first 33 bytes as hex: 89504e470d0a1a0a0000000d49484452000003200000025800080200000034.

## When to prefer this

Use this endpoint when you need to quickly extract PNG image metadata (dimensions, colour mode, interlace) and verify header integrity from raw bytes without downloading or fully decoding the image. It is ideal for file validation pipelines, upload sanitisation, or forensic inspection where only the first bytes are available. Prefer it over general file-type detectors when you specifically need IHDR-level PNG details and CRC validation.

## Known failure modes

- Fewer than 33 bytes provided in hex — fields may be null or partial
- Invalid hex string — parse error returned
- PNG magic bytes missing — IHDR not found, fields null
- CRC mismatch — ihdrCrcValid returns false with reasons
- Hex string exceeds 512 byte cap — truncated or rejected input

## How this service works

Read a PNG's width, height, bit depth, colour type and interlace from its first 33 bytes, and verify the IHDR CRC.

## Output

Returns a structured object containing width, height, bit depth, colour type (numeric and named), interlace method, megapixels, bits per pixel, raw bytes estimate, IHDR CRC validity flag, number of bytes examined, and optional summary, reasons, and disclaimer fields. Returns null for fields that cannot be determined if the input is malformed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "hex"
     ],
     "properties": {
      "hex": {
       "type": "string",
       "description": "First 33 or more bytes of the PNG as hex (up to 512 bytes)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "width": {
       "type": [
        "null",
        "number"
       ]
      },
      "height": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ]
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "bitDepth": {
       "type": [
        "null",
        "number"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "colorType": {
       "type": [
        "null",
        "number"
       ]
      },
      "interlace": {
       "type": [
        "null",
        "string"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "megapixels": {
       "type": [
        "null",
        "number"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "bitsPerPixel": {
       "type": [
        "null",
        "number"
       ]
      },
      "ihdrCrcValid": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "bytesExamined": {
       "type": [
        "null",
        "number"
       ]
      },
      "colorTypeName": {
       "type": [
        "null",
        "string"
       ]
   
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/png-header-inspector-842a2faf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from file-formats.x402tookit.com](https://www.zero.xyz/host/file-formats.x402tookit.com/llms.txt)
