← Step Progress Bar Generator
Your token

Step Progress Bar Generator API

The step bar, 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 step bar's settings and step names and a description of what the flow is for, and get back, as JSON, advice for that flow: keep or change, a summary, the look of the bar, how long the old step takes to leave, how the new one arrives (motion, time, curve, distance), how the two moves overlap and how the content follows (overlap, stagger, total time), 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 steps.

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 step bar's settings and step names, the page's check and your description of what the flow is for, and returns keep or change, a summary, the look, the exit time, the arrival (motion, time, curve, distance), the sequence (overlap, stagger, total time), principles and things to avoid.One JSON object

Input fields

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

FieldMeaning
task"advise"
stylenumbers, dots or bar.
motionslide, fade or lift.
step_countHow many steps, 2-7.
stepsThe step names, separated by | . The advice keeps them.
exit_msHow long the old step takes to leave (ease-in).
enter_msHow long the new step takes to arrive.
overlap_percentHow much of the exit is still running when the new step starts, 0-100.
easingease-out, smooth (cubic-bezier(0.16, 1, 0.3, 1)), ease-in-out or linear.
stagger_msThe gap between the new step's title, text and fields ("0" = together).
distance_pxHow far a step moves in a slide or a lift.
page_check{overlap_range_percent, wizard_step_ms, total_range_ms, total_max_ms, stagger_range_ms, skip_over_ms, subtle_range_px, enter_starts_ms, item_ms, sequence_ms, text_contrast, accent_contrast, button_contrast, verdict, notes}, from the page.
descriptionWhat the flow is for, who goes through it, how often and on which devices, 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, indicator ({style, why}), exit ({ms, why}), enter ({motion, ms, easing, distance, why}), sequence ({overlap, stagger, total_ms, why}), principles ([{name, how}], names from the 12 principles of animation) and avoid. Before using it, check the values as the page does: an overlap of 30-50%, a whole step change of 300-500 ms (the new step starts at exit * (1 - overlap / 100) and is in place after the longer of enter and 2 * stagger + 0.7 * enter), a stagger of 50-100 ms (0 only when asked for), a curve that is not linear and a move of 8-60 px. 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 "Checkout" example:

{
  "task": "advise",
  "style": "numbers",
  "motion": "slide",
  "step_count": "4",
  "steps": "Cart | Shipping | Payment | Review",
  "exit_ms": "200",
  "enter_ms": "300",
  "overlap_percent": "50",
  "easing": "ease-out",
  "stagger_ms": "60",
  "distance_px": "30",
  "page_check": "{\"overlap_range_percent\":[30,50],\"wizard_step_ms\":400,\"total_range_ms\":[300,500],\"total_max_ms\":800,\"stagger_range_ms\":[50,100],\"skip_over_ms\":500,\"subtle_range_px\":[8,60],\"enter_starts_ms\":100,\"item_ms\":210,\"sequence_ms\":430,\"text_contrast\":17.74,\"accent_contrast\":6.29,\"button_contrast\":6.29,\"verdict\":\"good\",\"notes\":[]}",
  "description": "Checkout for a small online shop selling homeware, mostly on phones. People move through it once per order and often go back to fix the address. Clean, trustworthy brand; it should feel quick and calm.",
  "clipped_note": ""
}

Reply:

{"verdict":"keep","summary":"Keep the current motion: numbered circles, a short sideways slide and a gentle cascade suit a phone checkout that people pass through once and want to feel quick and calm. The whole step change takes 430 ms, well inside the comfortable range, and a Back tap to fix the address plays the same sequence mirrored.","indicator":{"style":"numbers","why":"Numbered circles tell shoppers exactly where they are in Cart, Shipping, Payment and Review, which builds trust at checkout."},"exit":{"ms":200,"why":"A 200 ms ease-in departure is quick enough for people who often tap Back to fix the address, without feeling abrupt."},"enter":{"motion":"slide","ms":300,"easing":"ease-out","distance":30,"why":"A 30 px sideways slide that settles on ease-out matches the row of steps in the bar and stays subtle on a small phone screen."},"sequence":{"overlap":50,"stagger":60,"total_ms":430,"why":"The new step begins at 100 ms, the last field finishes at 330 ms after that, so the change lands at 430 ms: quick and calm, with no pause between moves."},"principles":[{"name":"Timing","how":"A 430 ms step change keeps a one-time checkout on phones feeling quick without rushing the shopper."},{"name":"Follow Through & Overlapping Action","how":"The Shipping title, its line of text and then the address fields start 60 ms apart so the panel settles in a calm cascade."},{"name":"Staging","how":"The title leads and the form fields arrive last, so attention flows to what the shopper has to fill in."},{"name":"Ease In & Ease Out","how":"The old step leaves on ease-in and the new one settles on ease-out, which keeps the brand's calm, trustworthy feel."}],"avoid":["Do not slow the slide beyond what a quick checkout needs, since people often go back to fix the address.","Do not make the panels travel far on a phone screen.","Do not use a linear curve, which would feel mechanical."]}

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://step-progress-bar-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":"step-progress-bar-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", "style": "numbers", "motion": "slide", "step_count": "4", "steps": "Cart | Shipping | Payment | Review", "exit_ms": "200", "enter_ms": "300", "overlap_percent": "50", "easing": "ease-out", "stagger_ms": "60", "distance_px": "30", "page_check": "{...}", "description": "Checkout for a small online shop selling homeware, mostly on phones. People move through it once per order and often go back to fix the address. Clean, trustworthy brand; it should feel quick and calm.", "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="step-progress-bar-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, indicator, exit, enter, sequence, 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: step-progress-bar-generator:advise:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json