# Image Dominant Color Extractor

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

Extracts the top N dominant colors from an image URL using 64x64 downsampling and 3-bit-per-channel quantization, returning hex/rgb values with frequency data.

## Facts

- Endpoint: GET https://api.x402node.dev/image/colors
- Price: $0.01/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-4836e881
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sBERrEP8gfKv-F7quYABV

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-4836e881
```

Example prompt: Can you pull the top 5 dominant colors from this image — https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/280px-PNG_transparency_demonstration_1.png — and give me the hex codes and how frequently each color appears?

## When to prefer this

Use this endpoint when you need fast, lightweight dominant color extraction from a remote image URL without requiring a full computer vision API. Ideal for AI agents doing theme generation, brand palette extraction, or content categorization where exact pixel-perfect analysis is less important than speed and cost ($0.01 USDC per call). Prefer over heavy vision APIs when you just need the top N palette colors in hex/RGB format.

## Known failure modes

- Invalid or unreachable image URL returns an error
- Unsupported image format (e.g. SVG, AVIF) may fail to decode
- count parameter exceeding 10 is clamped or rejected
- Very small or single-color images may return fewer colors than requested
- Network timeout if the remote image URL is slow to respond

## How this service works

Extract dominant colors from an image URL via 64x64 downsample + 3-bit-per-channel quantization. Returns top N colors as hex/rgb plus frequency. Use url param (default 5, max 10). Built for AI agents picking theme colors, content categorization, brand palette extraction.

## Output

Returns an ordered list of up to N dominant colors (default 5, max 10), each with its hex code, RGB components, and frequency/proportion within the image. Derived via 64x64 pixel downsampling and 3-bit-per-channel quantization.

## 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)"
      },
      "count": {
       "type": "string",
       "description": "Count (optional)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-4836e881/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)
