# JPEG File Format Inspector

> JPEG File Format 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 bytes of a JPEG file (as hex) to extract width, height, color components, baseline/progressive mode, and detect JFIF/Exif/Adobe markers.

## Facts

- Endpoint: GET https://file-formats.x402tookit.com/jpeg-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/jpeg-file-format-inspector-6292bd17
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UZkGICC_JqdgY45E8rPVY

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 jpeg-file-format-inspector-6292bd17
```

Example prompt: Can you inspect this JPEG's header and tell me its width, height, number of color components, and whether it's progressive or baseline — here are the first 512 bytes in hex: FFD8FFE000104A464946...

## When to prefer this

Use this endpoint when you need to extract JPEG image metadata (dimensions, mode, color info, marker flags) from raw file bytes without a full image processing library or full file download. Ideal for lightweight server-side validation, privacy audits (Exif detection), web optimization checks (progressive detection), or CI pipelines that inspect image uploads. Prefer this over general file-type detection when you specifically need JPEG-internal structural data beyond just format identification.

## Known failure modes

- Insufficient hex bytes provided — frame header not found within first 512 bytes returns null dimensions
- Invalid or non-JPEG hex input causes parsing failure with error reasons in the reasons array
- Truncated or corrupted JPEG header results in degraded=true with partial results
- Hex string malformed or not valid hexadecimal causes bad request error
- Missing required 'hex' query parameter returns validation error

## How this service works

Read a JPEG's width, height, components and baseline/progressive mode by walking its markers; flags JFIF and Exif.

## Output

Returns a structured object containing the image width, height, number of color components, precision bits, progressive or baseline mode flag, frame marker identifier, list of JPEG markers seen, JFIF/Exif/Adobe presence flags, a human-readable summary and verdict, number of bytes examined, and any degraded or error reasons if parsing was incomplete.

## 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 bytes of the JPEG as hex, up to 512 bytes; the frame header usually appears within the first few hundred"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "mode": {
       "type": [
        "null",
        "string"
       ]
      },
      "width": {
       "type": [
        "null",
        "number"
       ]
      },
      "height": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "hasExif": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "hasJfif": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ]
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "hasAdobe": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "components": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "frameMarker": {
       "type": [
        "null",
        "string"
       ]
      },
      "markersSeen": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
     
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/jpeg-file-format-inspector-6292bd17/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)
