# GIF Header Parser

> GIF Header Parser 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-30).

Parses the first 13 bytes of a GIF file to extract version, dimensions, and global colour table metadata.

## Facts

- Endpoint: GET https://file-formats.x402tookit.com/gif-header?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gif-header-parser-375e948a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cn7PSz8g73jpEveqml29x

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 gif-header-parser-375e948a
```

Example prompt: Can you read the header of this GIF and tell me its version, width, height, and global colour table info? Here are the first 13 bytes in hex: 47494638396180007000f70000.

## When to prefer this

Use this endpoint when you specifically need to extract structured metadata from the GIF file format header — version, dimensions, and colour table details — without fully decoding the image. Prefer this over generic file-type detection endpoints when you already know the file is a GIF and need its specific header fields. It is faster and cheaper than full image decoding libraries for header-only inspection tasks.

## Known failure modes

- Fewer than 13 hex bytes provided — returns null or partial fields
- Invalid hex string causes parsing failure
- Non-GIF magic bytes result in version/fields returning null
- Truncated or corrupted header may set degraded flag and return partial data

## How this service works

Read a GIF's version, width, height and global colour table size from its first 13 bytes.

## Output

Returns a structured object including GIF version (e.g. GIF87a or GIF89a), image width and height in pixels, whether a global colour table is present, number of global colours, colour resolution bits, background colour index, pixel aspect ratio byte, and the number of bytes examined. May also include a summary, verdict, reasons, and degraded/disclaimer flags if the input is incomplete or 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 13 or more bytes of the GIF 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"
       ]
      },
      "sorted": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ]
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "version": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "globalColors": {
       "type": [
        "null",
        "number"
       ]
      },
      "bytesExamined": {
       "type": [
        "null",
        "number"
       ]
      },
      "backgroundIndex": {
       "type": [
        "null",
        "number"
       ]
      },
      "pixelAspectByte": {
       "type": [
        "null",
        "number"
       ]
      },
      "globalColorTable": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "pixelAspectRatio": {},
      "colorResolutionBits": {
       "type":
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gif-header-parser-375e948a/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)
