REF.
API · V1
(DEVELOPERS · PUBLIC API)

THE
TASTE
LAYER.

Every REF is a callable style. Point any AI at the endpoint. Get a number and the fixes. One call, deterministic, under a second.

WHY

Any tool that generates something visual can call this to check the output against a style and get back a number and the fixes. This is how you keep AI output on-brand.

ENDPOINT
POST https://ref-steal-the-why.lovable.app/api/public/score
CURL
curl -X POST https://ref-steal-the-why.lovable.app/api/public/score \
  -H "Authorization: Bearer ref_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://your.host/screenshot.png",
    "ref": "loud-print",
    "threshold": 75
  }'
JAVASCRIPT
const res = await fetch("https://ref-steal-the-why.lovable.app/api/public/score", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.REF_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    image_url: "https://your.host/screenshot.png",
    ref: "loud-print",
    threshold: 75,
  }),
});
const { on_ref_score, pass, calls } = await res.json();
RESPONSE
{
  "ref": "loud-print",
  "on_ref_score": 82,
  "pass": true,
  "threshold": 75,
  "weakest": "contrast",
  "dimensions": {
    "palette": 91, "whitespace": 88,
    "contrast": 62, "flatness": 100, "aspect": 100
  },
  "calls": [
    {
      "dimension": "contrast",
      "lead": "Contrast is off the ref.",
      "detail": "Your image sits in a narrow value band. Push brights brighter and darks darker."
    }
  ],
  "verdict": "Close. Fixable in ten minutes.",
  "measured": {
    "palette": [{"hex":"#E04A47","usage":0.31}, ...],
    "whitespaceRatio": 0.14,
    "gradientLikelihood": 0.22
  }
}
RATE LIMITS

Free tier: 100 scores per rolling 24 hours per key owner. Above that returns 429 with resets_in_hours. Requests over 8MB or non-image content types are rejected before scoring.

GET YOUR KEY.
100 SCORES / 24H · FREE
OPEN THE APP →