← List Animation Generator
Your token

List Animation Generator API

The list, the preview, the check against the timing rules and every copy and download run free in the browser and need no API. The API is for the one metered step: send the current list's settings and a description of where it sits, and get back, as JSON, advice for that place: keep or change, a summary, how items arrive (effect, time, curve, stagger, stagger limit), how fast a removed item leaves, how fast items slide to a new place, the animation principles at work and what to avoid. The page builds this input for you, checks the reply against the rules and draws the list.

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

This app has one task. Always send "task": "advise".

taskWhat it doesReply
adviseReads one list's settings, the page's check and your description of where the list sits, and returns keep or change, a summary, the entrance (effect, time, curve, stagger, limit), the exit time, the reorder time, principles and things to avoid.One JSON object

Input fields

Every field is a string; page_check holds JSON text. task, items and description are required.

FieldMeaning
task"advise"
itemsThe first 12 items, one per line, plus a line like (and 8 more) when there are more. The advice keeps them.
item_countHow many items the list has.
layoutlist or grid.
effectfade-up, fade, scale or slide.
distance_pxHow far a fade-up or slide item travels.
enter_msHow long one item takes to arrive.
easingease-out, smooth, spring, ease-in-out or linear.
stagger_msThe delay between one item starting and the next ("0" = all at once).
cap_msWhen the stagger stops growing.
exit_msHow long a removed item takes to leave (ease-in).
move_msHow long items take to slide to a new place (ease-in-out).
color, backgroundHex colours of the items and the page, e.g. "#eef2ff". The advice keeps them.
page_check{stagger_range_ms, enter_range_ms, exit_range_ms, move_range_ms, total_range_ms, total_stagger_ms, last_in_place_ms, arrive_together, text_contrast, verdict, notes}, from the page.
descriptionWhere the list sits, what it holds, how people use it and the brand's character (at most 1,200 characters).
clipped_noteEmpty, or a sentence saying the description was cut.

The reply

job.output.output is text holding one JSON object: verdict (keep or change), summary, enter ({effect, ms, easing, stagger, cap, why}), exit ({ms, why}), move ({ms, why}), principles ([{name, how}], names from the 12 principles of animation) and avoid. Before using it, check the values as the page does: a stagger of 30-75 ms (0 only when asked for), an entrance of 200-300 ms on ease-out, smooth or spring (never linear), a stagger limit of 500-800 ms, an exit of 150-200 ms and a reorder of 250-350 ms. If the balance ran low, truncated is true and the object may stop early; the page keeps every part that arrived whole.

Worked example

Input (input.json), from the page's "To-do list" example:

{
  "task": "advise",
  "items": "Buy oat milk\nBook the dentist\nReply to Sam about Friday\nWater the plants\nPay the electricity bill\nPick up the dry cleaning",
  "item_count": "6",
  "layout": "list",
  "effect": "fade-up",
  "distance_px": "16",
  "enter_ms": "250",
  "easing": "ease-out",
  "stagger_ms": "50",
  "cap_ms": "600",
  "exit_ms": "175",
  "move_ms": "300",
  "color": "#f0fdf4",
  "background": "#ffffff",
  "page_check": "{\"stagger_range_ms\":[30,75],\"enter_range_ms\":[200,300],\"exit_range_ms\":[150,200],\"move_range_ms\":[250,350],\"total_range_ms\":[500,800],\"total_stagger_ms\":250,\"last_in_place_ms\":500,\"arrive_together\":0,\"text_contrast\":16.95,\"verdict\":\"good\",\"notes\":[]}",
  "description": "Task list in a personal to-do app, used on phones many times a day. People tick tasks off, which removes them, add new ones at the top and drag to reorder. Calm, tidy brand.",
  "clipped_note": ""
}

Reply:

{"verdict":"change","summary":"This to-do list is opened many times a day on phones, so it should feel quick and quiet: tasks rise in gently with a tighter stagger and a lower cap so nothing makes people wait. Exits and moves stay brisk so ticking off, adding and dragging tasks feel immediate and tidy.","enter":{"effect":"fade-up","ms":250,"easing":"ease-out","stagger":40,"cap":500,"why":"A fade-up with a plain ease-out suits a calm list, and the lower end of the stagger and cap keeps a list people open constantly from feeling slow."},"exit":{"ms":175,"why":"A ticked-off task leaves a little quicker than it arrived, so completing it feels satisfying and instant."},"move":{"ms":300,"why":"Dragging to reorder or adding a task at the top needs a smooth, readable slide, and the middle of the range keeps the other tasks easy to follow."},"principles":[{"name":"Follow Through & Overlapping Action","how":"Tasks arrive one after another in a short wave, with the first leading and the rest following closely because this list is opened many times a day."},{"name":"Timing","how":"Arrivals, exits and moves all sit inside quick ranges so ticking off or adding a task never makes anyone wait."},{"name":"Ease In & Ease Out","how":"Tasks decelerate into place with ease-out, which suits a calm, tidy brand better than a bouncy overshoot."},{"name":"Staging","how":"Fade-up draws the eye to a new task added at the top without making the other tasks jump around."}],"avoid":["Do not use a spring overshoot, which is too playful for a calm, tidy brand.","Do not raise the stagger or cap, since people open this list many times a day.","Do not make exits slower than arrivals when a task is ticked 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, or a required field is missing or empty.
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://list-animation-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":"list-animation-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": "advise", "items": "Buy oat milk\nBook the dentist\nReply to Sam about Friday\nWater the plants\nPay the electricity bill\nPick up the dry cleaning", "item_count": "6", "layout": "list", "effect": "fade-up", "distance_px": "16", "enter_ms": "250", "easing": "ease-out", "stagger_ms": "50", "cap_ms": "600", "exit_ms": "175", "move_ms": "300", "color": "#f0fdf4", "background": "#ffffff", "page_check": "{...}", "description": "Task list in a personal to-do app, used on phones many times a day. People tick tasks off, which removes them, add new ones at the top and drag to reorder. Calm, tidy brand.", "clipped_note": ""}
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="list-animation-generator:advise:$(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: verdict, summary, enter, exit, move, principles, avoid
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: list-animation-generator:advise:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json