Public API

Documentation for MixBlob’s color and palette endpoints.

Use the public API to convert colors, extract palettes, generate gradients, and bring MixBlob’s color workflow into your own products.

MixBlob Public API

Base URL: https://api.mixblob.com/v1

All endpoints require an API key in the x-api-key header. Generate the key from your profile, then start with a low-friction colors endpoint before moving into palettes or image extraction.

Colors

Convert, compare, mix, and discover nearby colors with direct JSON inputs.

Palettes

Generate or suggest structured palettes from seed colors, rules, or uploaded imagery.

Images

Extract dominant colors and palette-ready signals from source images.

Getting Started

  1. Generate an API key from your profile.
  2. Send it in the x-api-key header.
  3. Start with /colors/contrast to verify access.

Authentication example

curl -X POST https://api.mixblob.com/v1/colors/contrast \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"fg":"#000000","bg":"#ffffff"}'

Endpoints

Colors

  • POST /colors/convert — Convert color formats. Body: { value, to }
  • POST /colors/contrast — WCAG contrast ratio. Body: { fg, bg }
  • POST /colors/mix — Interpolate between colors. Body: { colors, mode, steps }
  • POST /colors/similar — Suggest nearby colors. Body: { color, count }

Palettes

  • POST /palettes/generate — Generate from seed colors. Body: { seed, strategy, count }
  • POST /palettes/suggest — Harmony suggestions. Body: { colors, rules }
  • POST /palettes/from-image — Extract a palette from an image URL or S3 key. Body: { imageUrl?, s3Key?, count }

Images

  • POST /images/extract-colors — Dominant colors. Body: { imageUrl?, s3Key?, count }

Gradients

  • POST /gradients/generate — CSS gradient. Body: { colors, type, angle }
  • POST /gradients/suggest — Gradient suggestions from seed. Body: { seed, mood, count }

Meta

  • GET /meta — API status and timestamp.

Usage limits

API keys are assigned to a usage plan. Basic includes rate and monthly limits. Pro provides more room for production traffic.

Errors

Errors return JSON with an error field and a 4xx or 5xx status. Validate inputs and ensure your key is included.

OpenAPI

Coming soon: a JSON spec and interactive explorer.