← Solutions Page Generator
Your token

Solutions Page Generator API

Reading your list, sorting it, checking it and writing the solutions 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 solutions, numbered, with their kind, challenge, how the product helps, outcome, the features they use and the proof, and get back, as JSON, a kind for each solution the page could not sort, “how we help” lines to reword with an optional rewrite of each, and one outcome-led headline per solution. 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 solution with no kind a kind (industry, size, team, outcome, usecase), points out “how we help” lines to reword (feature_list, not_outcome, vague, needs_source, generic) with a rewrite from that solution's own words or an empty one, and writes at most one outcome-led headline per solution.One JSON object

Input fields

All values are strings. task and solutions are required.

FieldMeaning
task"refine"
productYour product name, or "".
headingYour page heading, or "".
solutionsJSON text: [{id, name, kind, challenge, solution, outcome, features, proof}] in list order, ids like s4. kind is industry, size, team, outcome, usecase or ""; solution is the “how we help” line; 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 solutions that had no kind; flag, a list of {id, why, text} where why is feature_list, not_outcome, vague, needs_source or generic and text is a suggested rewrite of the “how we help” line or ""; and headlines, a list of {id, text}. Before using it, check every id, that no sorted solution 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": "Helpwell",
  "heading": "",
  "solutions": "[{\"id\":\"s1\",\"name\":\"Healthcare\",\"kind\":\"industry\",\"challenge\":\"Patient questions arrive by phone, email and portal, and nurses answer the same ones all day.\",\"solution\":\"Every patient message lands in one queue, and saved answers cover the routine questions so nurses handle the clinical ones.\",\"outcome\":\"Answer patients in hours, not days\",\"features\":\"Shared inbox; Saved replies; Audit log\",\"proof\":\"Riverside Clinic cut its reply time from 3 days to 6 hours\"},{\"id\":\"s2\",\"name\":\"Retail and e-commerce\",\"kind\":\"industry\",\"challenge\":\"Order questions spike every holiday and wait times double.\",\"solution\":\"Order status answers itself from your store data, and agents see the order next to the ticket.\",\"outcome\":\"Fewer where-is-my-order tickets\",\"features\":\"Order lookup; Self-service; Chat\",\"proof\":\"Northpine Outfitters handled Black Friday with 40% fewer tickets\"},{\"id\":\"s3\",\"name\":\"Financial services\",\"kind\":\"industry\",\"challenge\":\"Account questions need answers that pass compliance review.\",\"solution\":\"Powerful, seamless support for every bank.\",\"outcome\":\"\",\"features\":\"Approval workflows; Audit log\",\"proof\":\"Customers love it\"},{\"id\":\"s4\",\"name\":\"Education\",\"kind\":\"industry\",\"challenge\":\"Students email the same questions at the start of every term.\",\"solution\":\"Ticketing, macros, SLA timers, reports\",\"outcome\":\"Students get answers before class starts\",\"features\":\"Help center; Macros\",\"proof\":\"\"},{\"id\":\"s5\",\"name\":\"Public libraries\",\"kind\":\"\",\"challenge\":\"Patrons ask about holds, fines and opening hours across five branches.\",\"solution\":\"Every branch shares one inbox and one set of answers.\",\"outcome\":\"One answer for every branch\",\"features\":\"Shared inbox\",\"proof\":\"\"},{\"id\":\"s6\",\"name\":\"Startups\",\"kind\":\"size\",\"challenge\":\"You have no support team, just founders answering email.\",\"solution\":\"Set up in an afternoon: one inbox, a help center and a chat widget, free for 3 seats.\",\"outcome\":\"First reply in under an hour from day one\",\"features\":\"Shared inbox; Help center; Chat\",\"proof\":\"We set it up over lunch. - Priya Nair, CEO, Tinkerbox\"},{\"id\":\"s7\",\"name\":\"Enterprise\",\"kind\":\"size\",\"challenge\":\"Thousands of agents across regions use different tools.\",\"solution\":\"The best help desk for large teams.\",\"outcome\":\"One view of every customer across 40 countries\",\"features\":\"\",\"proof\":\"\"},{\"id\":\"s8\",\"name\":\"IT teams\",\"kind\":\"team\",\"challenge\":\"Employees ping IT in chat and requests get lost.\",\"solution\":\"Every chat request becomes a ticket with an owner, and employees see its status.\",\"outcome\":\"Every request has an owner\",\"features\":\"Chat to ticket; Status page\",\"proof\":\"Helix Labs closed 30% more requests a month\"},{\"id\":\"s9\",\"name\":\"For support agents\",\"kind\":\"usecase\",\"challenge\":\"Agents switch between five tabs to answer one question.\",\"solution\":\"Customer history, orders and past tickets sit next to every reply.\",\"outcome\":\"\",\"features\":\"Sidebar apps\",\"proof\":\"\"}]",
  "items_note": ""
}

Reply:

{
 "kind": [
  {
   "id": "s5",
   "kind": "industry"
  }
 ],
 "flag": [
  {
   "id": "s3",
   "why": "vague",
   "text": "Your team routes account answers through approval workflows for compliance review, and the audit log records each step"
  },
  {
   "id": "s4",
   "why": "feature_list",
   "text": "Students find answers in the help center, and macros cover the questions they email every term, so replies are ready before class starts"
  },
  {
   "id": "s7",
   "why": "needs_source",
   "text": "Your agents across regions work from one view of every customer instead of many different tools"
  }
 ],
 "headlines": [
  {
   "id": "s1",
   "text": "Answer patients in hours, not days"
  },
  {
   "id": "s2",
   "text": "Fewer where-is-my-order tickets"
  },
  {
   "id": "s4",
   "text": "Students get answers before class starts"
  },
  {
   "id": "s5",
   "text": "One answer for every branch with Helpwell"
  },
  {
   "id": "s6",
   "text": "First reply in under an hour from day one"
  },
  {
   "id": "s7",
   "text": "One view of every customer across 40 countries"
  },
  {
   "id": "s8",
   "text": "Every request has an owner"
  }
 ]
}

On the page, Public libraries is sorted as an industry, the Financial services, Education and Enterprise lines are rewritten (the filler words, the feature list and the “best” claim are gone), and seven solutions get an outcome-led headline (none for Financial services, which has no outcome yet, or the support agents use case), 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://solutions-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":"solutions-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": "Helpwell", "heading": "", "solutions": "[...]", "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="solutions-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: solutions-page-generator:refine:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json