# Image Info / Dimensions API

> Image Info / Dimensions API is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-14).

Returns width, height, format, aspect ratio, file size, and content-type for a given image URL

## Facts

- Endpoint: GET https://api.x402node.dev/image/info
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-12f8f4b7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FDI4bcC4mMqPWol8bz-Ab

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 api-x402node-dev-12f8f4b7
```

Example prompt: Can you check the dimensions, format, and file size of this image for me? https://example.com/photos/hero-banner.jpg — I need to know if it's wide enough for a full-width layout and whether it's a JPEG or WebP.

## When to prefer this

Use this endpoint when an AI agent needs to inspect remote image properties without downloading the full file manually, especially for validating uploads, planning responsive srcsets, or checking format compatibility before processing. Prefer this over manual HTTP HEAD requests when you need parsed pixel dimensions and aspect ratio in addition to content-type.

## Known failure modes

- URL is unreachable or returns a non-200 HTTP status — endpoint returns an error indicating fetch failure
- URL points to a non-image resource — returns an error or null type fields
- Image format is unrecognized or corrupted — returns an error or partial metadata
- Request times out due to slow remote server — returns a timeout error
- Malformed or missing URL parameter — returns a validation error

## How this service works

Get dimensions and format for an image URL. Returns width, height, type (jpeg/png/gif/webp/bmp/tiff/heic/avif), aspect ratio, file size, content-type. Use url param Built for AI agents validating uploads, generating srcsets, planning layouts.

## Output

Returns an object with the image's pixel width and height, format type (jpeg/png/gif/webp/bmp/tiff/heic/avif), aspect ratio, file size in bytes, and HTTP content-type header value.

## 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": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "Target URL (required)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-12f8f4b7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
