Brand Palette Extraction

Builds a usable palette from an image — primary, secondary, accent, neutral — with WCAG contrast ratios between every pair.

POST /v1/image/palette $0.02 per call

Specification

Endpoint
POST /v1/image/palette
Price
$0.02 per call · tier advanced_analysis
Payment
x402 on X Layer (chain 196) · settled in USDG or USDT0 · scheme exact
Data source
Local sandboxed processing of the uploaded image
Timeout
60 seconds
Max request
20 MB
Version
1.0.0

Calling it

The first call returns a 402 with the payment challenge. Retry with a signed authorisation in the X-PAYMENT header — see the payment guide for the exact shape.

curl -i -X POST "https://api.dana-edu.pp.ua/v1/image/palette" \
  -H "content-type: application/json" \
  -d '{ ... }'

Response

Real output, captured by running this endpoint at build time — not written by hand. Volatile fields such as timestamps are elided. Captured 2026-07-30.

{
  "palette": {
    "primary": {
      "hex": "#2b3a55",
      "rgb": [
        43,
        58,
        85
      ],
      "hsl": {
        "h": 218.6,
        "s": 32.8,
        "l": 25.1
      },
      "share_percent": 25.15,
      "relative_luminance": 0.042
    },
    "secondary": {
      "hex": "#f0f0eb",
      "rgb": [
        240,
        240,
        235
      ],
      "hsl": {
        "h": 60,
        "s": 14.3,
        "l": 93.1
      },
      "share_percent": 25,
      "relative_luminance": 0.8684
    },
    "accent": {
      "hex": "#c9a227",
      "rgb": [
        201,
        162,
        39
      ],
      "hsl": {
        "h": 45.6,
        "s": 67.5,
        "l": 47.1
      },
      "share_percent": 25,
      "relative_luminance": 0.384
    },
    "darkest": {
      "hex": "#2b3a55",
      "rgb": [
        43,
        58,
        85
      ],
      "hsl": {
        "h": 218.6,
        "s": 32.8,
        "l": 25.1
      },
      "share_percent": 25.15,
  … truncated for display

Trimmed for display. The full body is returned by the endpoint and described by its schema.

Every response is wrapped in the same envelope: data plus warnings, sources, confidence, informational_only and a measured processing_ms. See the envelope reference.

Related endpoints