# Grist Tools Color Palette Extractor

> Grist Tools Color Palette Extractor is a paid API for AI agents from grist.tools, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-02).

Extracts the dominant color palette from an image URL, returning the most common colors ranked by frequency.

## Facts

- Endpoint: POST https://grist.tools/v1/color-palette-extract?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/grist-tools-color-palette-extractor-d9e483c3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XraWUlajHVMRYnvX3-9Px

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 grist-tools-color-palette-extractor-d9e483c3 -d '<json body>'
```

Example prompt: Can you extract the top 5 dominant colors from this image — https://example.com/product-banner.jpg — and give me the palette?

## When to prefer this

Choose this endpoint when you need a fast, cheap, per-call color palette extraction from a publicly accessible image URL with no setup or API key required. Ideal for agents that need on-demand color analysis at scale, paying only $0.003 per successful call via x402 micropayment with no subscription overhead.

## Known failure modes

- Invalid or unreachable image URL returns an error
- Image format not detectable from bytes returns an error
- Requested color count outside 1–16 range returns a validation error
- Image too large or download timeout may cause failure
- Payment verification failure means the call is not charged and not executed

## How this service works

One endpoint does one thing, always the same way, for a fraction of a cent. Payment is verified before the handler runs and settled only after it succeeds, so a rejected or failed call is never a charged call.

## Output

An ordered list of the most dominant colors in the image, up to the requested maximum (default or specified count), ranked from most to least common. Each color is represented as a color value (e.g. hex code). Fewer colors are returned if the image contains fewer distinct color buckets than requested.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "url"
 ],
 "properties": {
  "url": {
   "type": "string",
   "description": "Absolute http(s) URL of the image, up to 2048 characters; redirects are followed and the format is detected from the bytes, not the content-type."
  },
  "colors": {
   "type": "integer",
   "description": "Maximum number of palette colours to return, 1 to 16, most common first; fewer come back when the image has fewer distinct colour buckets."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/grist-tools-color-palette-extractor-d9e483c3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from grist.tools](https://www.zero.xyz/host/grist.tools/llms.txt)
