# fastapi.online Color Palette Extractor

> fastapi.online Color Palette Extractor is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Extracts a dominant color palette from an uploaded image file, returning a set of representative colors.

## Facts

- Endpoint: POST https://api.fastapi.online/color-palette
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-color-palette-extractor-d0918648
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_r5ShZbgPeOoNaZCdBXMK_

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 fastapi-online-color-palette-extractor-d0918648 -d '<json body>'
```

Example prompt: Can you extract the 5 dominant colors from this product photo and give me their hex codes?

## When to prefer this

Choose this endpoint when you need a quick, affordable, per-call color palette extraction from an image without requiring a signup or subscription. It is especially useful for design automation pipelines, product catalog enrichment, or brand analysis tasks where you want dominant hex color codes extracted programmatically from image files.

## Known failure modes

- Unsupported image format (not PNG/JPEG/WebP) returns an error
- Image file too large may time out or be rejected
- Invalid or missing file input returns a 400 or validation error
- num_colors set to an unreasonably high number may produce degraded results
- Payment failure or missing x402 payment header blocks the request

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

Returns a list of dominant colors extracted from the uploaded image, likely as hex codes or RGB values, representing the most prominent colors present in the image. The number of colors returned corresponds to the num_colors parameter supplied.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "file": {
   "type": "string",
   "format": "binary",
   "description": "Image file (PNG/JPEG/WebP)"
  },
  "num_colors": {
   "type": "string"
  }
 }
}
```

## More

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