← Use Case Page Generator
Your token

Use Case Page Generator API

Reading your list, sorting it, checking it and writing the use case HTML, the CSS, the head tags with ItemList JSON-LD, Markdown and the page plan all run free in the browser and need no API. The API is for the one metered step: send your use cases, numbered, with their kind, problem, how the product helps, the features they use and the proof, and get back, as JSON, a kind for each use case the page could not sort, “how it helps” lines to reword with an optional rewrite of each, and one headline per use case. The page checks every id and kind, and refuses any rewrite or headline that adds a number, a name or a claim your list does not contain.

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": "refine".

taskWhat it doesReply
refineGives each use case with no kind a kind (scenario, role, goal, industry), points out “how it helps” lines to reword (feature_list, not_outcome, vague, needs_source) with a rewrite from that use case's own words or an empty one, and writes at most one headline per use case.One JSON object

Input fields

All values are strings. task and use_cases are required.

FieldMeaning
task"refine"
productYour product name, or "".
headingYour page heading, or "".
use_casesJSON text: [{id, name, kind, problem, helps, features, proof}] in list order, ids like u4. kind is scenario, role, goal, industry or ""; features separates items with ; . Every value may be "". At most 40.
items_noteEmpty, or a sentence saying what was cut.

The reply

job.output.output is text holding one JSON object (sometimes inside a ```json fence) with three keys: kind, a list of {id, kind} for use cases that had no kind; flag, a list of {id, why, text} where why is feature_list, not_outcome, vague or needs_source and text is a suggested rewrite of the “how it helps” line or ""; and headlines, a list of {id, text}. Before using it, check every id, that no sorted use case is re-sorted, and that a rewrite or headline adds no number, name or claim; the page does all of this and lists what it refused. If the balance ran low, truncated is true and the object may stop early; the page keeps every choice that arrived whole.

Worked example

Input (input.json), the spreadsheet sample on the page:

{
  "task": "refine",
  "product": "Slotwise",
  "heading": "",
  "use_cases": "[{\"id\":\"u1\",\"name\":\"Patient scheduling\",\"kind\":\"scenario\",\"problem\":\"Your front desk spends every morning on the phone moving appointments.\",\"helps\":\"Patients book and move their own visits online, and open slots fill from the waitlist.\",\"features\":\"Online booking; Waitlist; Text reminders\",\"proof\":\"Harbor Dental cut no-shows from 14% to 5% in 3 months\"},{\"id\":\"u2\",\"name\":\"Event marketing and lead nurturing\",\"kind\":\"scenario\",\"problem\":\"Sign-ups for your demo days live in one sheet and follow-up calls in another.\",\"helps\":\"Every attendee books a follow-up call from the thank-you page, and you see who booked.\",\"features\":\"Booking pages; Forms\",\"proof\":\"\"},{\"id\":\"u3\",\"name\":\"Sales reps\",\"kind\":\"role\",\"problem\":\"Reps lose hours a week to emails about meeting times.\",\"helps\":\"Send one link: prospects pick a time you are free and the meeting lands in your CRM.\",\"features\":\"Booking links; CRM sync\",\"proof\":\"I got Friday afternoons back. - Dana Ortiz, Account Executive, Brightpath\"},{\"id\":\"u4\",\"name\":\"Recruiters\",\"kind\":\"role\",\"problem\":\"Interview loops take a week of emails to line up.\",\"helps\":\"Booking links, calendar sync, reminders, round robin\",\"features\":\"Round robin; Calendar sync\",\"proof\":\"\"},{\"id\":\"u5\",\"name\":\"Customer retention\",\"kind\":\"goal\",\"problem\":\"Customers who skip their check-in call are the ones who leave.\",\"helps\":\"Powerful, seamless scheduling for every account.\",\"features\":\"Recurring bookings; Text reminders\",\"proof\":\"Customers love it\"},{\"id\":\"u6\",\"name\":\"Healthcare\",\"kind\":\"industry\",\"problem\":\"Clinics juggle rooms, staff and patients.\",\"helps\":\"Book by room and by clinician on one calendar.\",\"features\":\"Resources\",\"proof\":\"\"},{\"id\":\"u7\",\"name\":\"Customer onboarding\",\"kind\":\"scenario\",\"problem\":\"New customers wait days for a kickoff call.\",\"helps\":\"The best onboarding scheduler on the market.\",\"features\":\"Booking pages\",\"proof\":\"\"},{\"id\":\"u8\",\"name\":\"Office hours\",\"kind\":\"\",\"problem\":\"\",\"helps\":\"Students book a 15-minute slot instead of queuing outside your door.\",\"features\":\"Group slots\",\"proof\":\"\"}]",
  "items_note": ""
}

Reply:

{"kind":[{"id":"u8","kind":"scenario"}],"flag":[{"id":"u4","why":"feature_list","text":"You send booking links, and calendar sync and reminders line up interview loops without a week of emails."},{"id":"u5","why":"vague","text":"Recurring bookings and text reminders help your customers keep their check-in call."},{"id":"u7","why":"needs_source","text":"New customers book their kickoff call from a booking page instead of waiting days."}],"headlines":[{"id":"u1","text":"Patients move their own visits, without front desk phone calls"},{"id":"u2","text":"Every attendee books a follow-up call from your thank-you page"},{"id":"u3","text":"For sales reps: send one link, skip the meeting-time emails"},{"id":"u4","text":"For recruiters: line up interview loops without a week of emails"},{"id":"u5","text":"Keep check-in calls booked with recurring bookings and text reminders"},{"id":"u7","text":"New customers book their kickoff call, instead of waiting days"},{"id":"u8","text":"Students book a slot, instead of queuing outside your door"}]}

On the page, Office hours is sorted as a scenario, the Recruiters, Customer retention and Customer onboarding lines are rewritten (the feature list, the filler words and the “best” claim are gone), and each use case except Healthcare gets a headline, which also becomes the H1 in the page plan.

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://use-case-page-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":"use-case-page-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": "refine", "product": "Slotwise", "heading": "", "use_cases": "[...]", "items_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="use-case-page-generator:refine:$(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: kind, flag, headlines
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: use-case-page-generator:refine:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json