# WebP Header Inspector

> WebP 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 30 bytes of a WebP file (provided as hex) to extract width, height, format variant (lossy/lossless/extended), and alpha/animation flags.

## Facts

- Endpoint: GET https://file-formats.x402tookit.com/webp-info?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/webp-header-inspector-5f724758
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ldUEIA1--b0pf3e6MhPeh

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 webp-header-inspector-5f724758
```

Example prompt: Can you inspect the first 30 bytes of this WebP file for me — here's the hex: 52494646... — and tell me the image dimensions, whether it's lossy or lossless, and if it has an alpha channel or animation?

## When to prefer this

Use this endpoint when you need lightweight, fast WebP header metadata (dimensions, format, alpha, animation) without decoding or uploading the full image. Ideal for pre-validation pipelines, content moderation checks, or asset auditing where only the file's first bytes are available. Prefer over full image decoders when bandwidth or latency is a concern and only structural metadata is needed.

## Known failure modes

- Insufficient hex bytes provided (fewer than 30 bytes) — returns error or null fields
- Invalid or non-WebP hex input — verdict indicates invalid or unrecognized format
- Hex string contains non-hex characters — parse error returned
- Extended WebP features beyond inspected bytes cannot be confirmed — notChecked array populated
- Truncated or corrupted header — width/height may be null with explanatory reasons

## How this service works

Read a WebP's width, height, lossy/lossless/extended format, alpha and animation flags from its first 30 bytes.

## Output

Returns a structured object with image width and height, the WebP format variant (lossy, lossless, or extended), boolean alpha and animation flags, RIFF size, number of bytes examined, a human-readable summary and verdict, and any reasons or warnings flagged during parsing.

## 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 30 or more bytes of the WebP 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"
       ]
      },
      "alpha": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "width": {
       "type": [
        "null",
        "number"
       ]
      },
      "format": {
       "type": [
        "null",
        "string"
       ]
      },
      "height": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ]
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "riffSize": {
       "type": [
        "null",
        "number"
       ]
      },
      "animation": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "bytesExamined": {
       "type": [
        "null",
        "number"
       ]
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/webp-header-inspector-5f724758/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)
