← Hover Effect Generator
Your token

Hover Effect Generator API

Building the effect, writing the CSS, HTML and Tailwind classes, checking it, and reading pasted CSS all run free in the browser and need no API. The API is for the one metered step: send your element, its current effect and a description, and get back hover effects.

Base URL: https://api.skillsafe.ai/v1/app-api. Every response is {"data": ...} or {"error": {"code", "message"}}; read error.code and error.message rather than the HTTP status alone.

The task field

Send "task" first. There is one job today; the field is there so the reply shape is always named.

taskWhat it doesReply
suggestProposes two or three hover effects for your element that fit the description: an effect from the page's list, its hover-in and return timing, easing, and the distance, scale or shadow the effect uses.{"task":"suggest","variants":[{"name","why","effect","in_ms","out_ms","ease_in","distance?","scale?","shadow?"}],"summary"}

Input fields

FieldTypeMeaning
taskstring"suggest". Required.
briefstringOptional: the hover you want or your site, at most 300 characters.
elementstring"button", "card", "link" or "image". Required.
effectstringThe effect you have now, for example "lift". Required.
accentstringYour accent colour as #rrggbb. Required.
factsstringJSON text built by the page: the current effect (effect, in_ms, out_ms, ease_in, distance, scale, shadow, radius), the effects drawn for this element ({id, label, uses}), shadows, easings, flags, and pasted fixes and problems when you pasted CSS. Required.

Effects per element: button lift, grow, darken, fill, arrow, shine, ring; card lift, arrow, outline, zoom; link arrow, underline-center, underline-left, highlight, colour; image lift, zoom, caption.

The reply

job.output.output is JSON text in the shape above. The page uses an effect only when: its name is at most 40 characters and its reason at most 160, and neither names motion the page does not draw (bounce, tilt, glow, pulse, spin and similar); effect is drawn for your element; in_ms is a whole number from 80 to 300 and out_ms from 100 to 600; ease_in is one of ease-out, ease-in-out, ease, ease-in, linear, snappy; distance is 0 to 8 px (caption 0 to 16), scale 1 to 1.05, shadow one of none, soft, medium, strong; and the built effect passes the hover rules: hover-in at most 200 ms (300 for zoom and shine), a return no faster than the way in and no slower than 400 ms or twice the way in, no ease-in or linear on the way in, moves of 6 px or less, a shadow that grows 8 px or less, and at most three animated properties. If the balance ran low, truncated is true and the object may stop early; the effects that arrived whole are kept.

Worked examples

task: suggest - a sign-up button

Input (input.json):

{
  "task": "suggest",
  "brief": "Sign-up button on a calm personal finance site. Quick, not bouncy.",
  "element": "button",
  "effect": "lift",
  "accent": "#4f46e5",
  "facts": "{\"current\":{\"effect\":\"lift\",\"in_ms\":200,\"out_ms\":250,\"ease_in\":\"ease-out\",\"distance\":2,\"scale\":1,\"shadow\":\"soft\",\"radius\":10},\"effects\":[{\"id\":\"lift\",\"label\":\"Lift\",\"uses\":[\"distance\",\"scale\",\"shadow\"]},{\"id\":\"grow\",\"label\":\"Grow\",\"uses\":[\"scale\"]},{\"id\":\"darken\",\"label\":\"Colour shift\",\"uses\":[]},{\"id\":\"fill\",\"label\":\"Fill sweep\",\"uses\":[]},{\"id\":\"arrow\",\"label\":\"Arrow nudge\",\"uses\":[\"distance\"]},{\"id\":\"shine\",\"label\":\"Shine sweep\",\"uses\":[]},{\"id\":\"ring\",\"label\":\"Ring\",\"uses\":[]}],\"shadows\":[\"none\",\"soft\",\"medium\",\"strong\"],\"easings\":[\"ease-out\",\"ease-in-out\",\"ease\",\"ease-in\",\"linear\",\"snappy\"],\"flags\":[]}"
}

Reply:

{
  "task": "suggest",
  "variants": [
    {
      "name": "Gentle lift",
      "why": "A small rise with a soft shadow makes the sign-up button feel ready to press while staying calm and steady.",
      "effect": "lift",
      "in_ms": 160,
      "out_ms": 220,
      "ease_in": "ease-out",
      "distance": 2,
      "scale": 1,
      "shadow": "soft"
    },
    {
      "name": "Quick colour shift",
      "why": "A fast, quiet change of shade keeps a finance page composed, with no movement at all.",
      "effect": "darken",
      "in_ms": 150,
      "out_ms": 200,
      "ease_in": "snappy"
    },
    {
      "name": "Soft outline ring",
      "why": "A thin ring around the button signals it is clickable without moving it, which suits a calm money site.",
      "effect": "ring",
      "in_ms": 180,
      "out_ms": 240,
      "ease_in": "ease-out"
    }
  ],
  "summary": "Three calm, quick hover effects for a sign-up button: a gentle lift, a colour shift and a ring."
}

task: suggest - a photo grid

Input:

{
  "task": "suggest",
  "brief": "Photo grid for a wedding photographer portfolio. Slow and elegant, captions with the couple's names.",
  "element": "image",
  "effect": "caption",
  "accent": "#4f46e5",
  "facts": "{\"current\":{\"effect\":\"caption\",\"in_ms\":200,\"out_ms\":250,\"ease_in\":\"ease-out\",\"distance\":8,\"scale\":1,\"shadow\":\"soft\",\"radius\":12},\"effects\":[{\"id\":\"lift\",\"label\":\"Lift\",\"uses\":[\"distance\",\"scale\",\"shadow\"]},{\"id\":\"zoom\",\"label\":\"Image zoom\",\"uses\":[\"scale\"]},{\"id\":\"caption\",\"label\":\"Caption reveal\",\"uses\":[\"distance\"]}],\"shadows\":[\"none\",\"soft\",\"medium\",\"strong\"],\"easings\":[\"ease-out\",\"ease-in-out\",\"ease\",\"ease-in\",\"linear\",\"snappy\"],\"flags\":[]}"
}

Reply:

{
  "task": "suggest",
  "variants": [
    {
      "name": "Soft caption rise",
      "why": "A caption that rises gently over the photo shows the couple's names without hiding the portrait, and the unhurried return feels elegant.",
      "effect": "caption",
      "in_ms": 200,
      "out_ms": 300,
      "ease_in": "ease-out",
      "distance": 10
    },
    {
      "name": "Slow photo zoom",
      "why": "A very slight, unhurried zoom draws the eye into the wedding photo and suits a slow, refined portfolio.",
      "effect": "zoom",
      "in_ms": 300,
      "out_ms": 400,
      "ease_in": "ease-out",
      "scale": 1.04
    },
    {
      "name": "Quiet tile lift",
      "why": "A small rise with a soft shadow lets each photo in the grid feel gently raised while staying calm.",
      "effect": "lift",
      "in_ms": 180,
      "out_ms": 280,
      "ease_in": "ease-out",
      "distance": 2,
      "scale": 1,
      "shadow": "soft"
    }
  ],
  "summary": "Three slow, elegant hover effects for a wedding photo grid, led by a caption reveal for the couple's names."
}

On the page, the effects that pass are listed, the first one goes on your element, and Undo takes it off.

Errors

HTTPWhat to do
401The token is missing, expired or a guest token on a run. Get a personal token on the token page.
402The balance is below what the run reserves. Top up at skillsafe.ai/account/billing.
400The body is not a JSON object of the fields above.
429Wait and retry with the same Idempotency-Key.

Step 1 — a tiny client helper

One function that sends JSON and unwraps the {data, error} envelope.

BASE="https://api.skillsafe.ai/v1/app-api"
TOKEN="paste-your-token-here"   # from https://hover-effect-generator.skillsafe.ai/tokens.html
api() { # api METHOD PATH [JSON-BODY]
  curl -s -X "$1" "$BASE$2" -H "Content-Type: application/json" \
    ${TOKEN:+-H "Authorization: Bearer $TOKEN"} ${3:+--data "$3"}
}

Step 2 — a token

A guest token is enough for /me and /estimate. A run is metered, so it needs your personal token: sign in on the token page and copy it.

# a guest token (enough for /me and /estimate); a run needs your personal token from /tokens.html
TOKEN=$(curl -s -X POST "$BASE/guest" -H "Content-Type: application/json" -d '{"slug":"hover-effect-generator"}' | jq -r '.data.token')

Step 3 — who am I, and my balance

subject_type is guest or user; credits is the balance (1 credit = $0.0001).

api GET /me | jq '.data | {subject_type, credits}' 

Step 4 — price a run for free

/estimate charges nothing and starts no job. hold_credits is the amount reserved while a run is in flight, not the price; the run is charged what it uses.

# input.json: the run input object - {"task": "suggest", "brief": "...", "element": "button", "effect": "lift", "accent": "#4f46e5", "facts": "{...}"}
api POST /estimate "$(cat input.json)" | jq '.data | {hold_credits, min_credits, model, model_alias, markup_bps, warnings}' 

Step 5 — run it and wait for the job

Send an Idempotency-Key derived from the input: a retry with the same key is never billed twice.

KEY="hover-effect-generator:suggest:$(shasum -a 256 input.json | cut -c1-16):a1"
JOB=$(curl -s -X POST "$BASE/run" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: $KEY" --data @input.json | jq -r '.data.job_id')
while :; do
  J=$(api GET "/jobs/$JOB"); S=$(echo "$J" | jq -r '.data.status')
  case "$S" in succeeded|failed|cancelled) break;; esac; sleep 2
done
echo "$J" | jq -r '.data.output.output' > reply.json   # one JSON object: task, variants, summary
echo "$J" | jq '.data | {charged_credits, truncated}' 

Step 6 — or stream it

/run-stream sends Server-Sent Events while the job runs and the finished job at the end.

# Server-Sent Events: tick/delta events while the job runs, then a final event with the job
curl -N -s -X POST "$BASE/run-stream" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: hover-effect-generator:suggest:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json