← Services Page Generator
Your token

Services Page Generator API

Reading your list, checking it and writing the services HTML, the CSS, the head tags with Service JSON-LD, Markdown and CSV all run free in the browser and need no API. The API is for the one metered step: send your services, numbered, with their group, description, what is included, who each is for and the price, plus a list of groups to choose from, and get back, as JSON, a group for each service that has none, descriptions to reword with an optional outcome-first rewrite of each, and up to three headline ideas. The page checks every id, 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
refinePuts each service with no group into one of the groups sent (your own first), points out descriptions to reword (not_benefit, vague, needs_source, jargon) with a rewrite from that service's own words or an empty one, and offers up to 3 headlines.One JSON object

Input fields

All values are strings. task and services are required.

FieldMeaning
task"refine"
businessYour business name, or "".
headingYour current heading, or "".
locationWhere you work, or "".
industryThe kind of client you serve, or "".
servicesJSON text: [{id, name, category, desc, includes, for, price}] in list order, ids like s4. Every value is a string and may be ""; includes separates items with ; . At most 60.
categoriesJSON text: [{id, name, yours}]. Your own groups as c1, c2 ... with yours: true, then standard ones as g1, g2 ... with yours: false.
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: assign, a list of {id, category} for services that had no group; flag, a list of {id, why, text} where why is not_benefit, vague, needs_source or jargon and text is a suggested rewrite or ""; and headlines, up to 3 strings. Before using it, check every id, that no grouped service is regrouped, and that a rewrite 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",
  "business": "Northlight Studio",
  "heading": "",
  "location": "Leeds",
  "industry": "",
  "services": "[{\"id\":\"s1\",\"name\":\"Brand identity\",\"category\":\"Design\",\"desc\":\"A logo, colours and type that look the same on your van, your site and your invoices.\",\"includes\":\"Logo in 3 formats; Colour palette; Type pairing; One-page brand guide\",\"for\":\"New and rebranding businesses\",\"price\":\"From £1,800\"},{\"id\":\"s2\",\"name\":\"Website design\",\"category\":\"Design\",\"desc\":\"Website design\",\"includes\":\"Homepage and 5 inner pages; Mobile layouts; 2 rounds of changes\",\"for\":\"\",\"price\":\"From £3,500\"},{\"id\":\"s3\",\"name\":\"Website build\",\"category\":\"Build\",\"desc\":\"We build your site on WordPress so your team can edit every page without calling us.\",\"includes\":\"WordPress build; Editor training; Speed and accessibility checks\",\"for\":\"Teams who update their own site\",\"price\":\"From £4,000\"},{\"id\":\"s4\",\"name\":\"Online shop\",\"category\":\"Build\",\"desc\":\"Powerful, seamless e-commerce solutions.\",\"includes\":\"Shopify setup; Product import up to 200 items; Payments and shipping\",\"for\":\"Shops selling online for the first time\",\"price\":\"From £5,500\"},{\"id\":\"s5\",\"name\":\"SEO audit\",\"category\":\"Growth\",\"desc\":\"The best SEO audit in Yorkshire.\",\"includes\":\"Technical crawl; Keyword gaps; A prioritised fix list\",\"for\":\"\",\"price\":\"£950\"},{\"id\":\"s6\",\"name\":\"Copywriting\",\"category\":\"\",\"desc\":\"Pages that say what you do in your customers' words, written after a call with you.\",\"includes\":\"Up to 6 pages; One interview; 2 rounds of edits\",\"for\":\"\",\"price\":\"From £600\"},{\"id\":\"s7\",\"name\":\"Care plan\",\"category\":\"\",\"desc\":\"Updates, backups and small edits every month, so the site keeps working after launch.\",\"includes\":\"Monthly updates; Daily backups; 2 hours of edits\",\"for\":\"Sites we built\",\"price\":\"£95/month\"},{\"id\":\"s8\",\"name\":\"Hosting\",\"category\":\"\",\"desc\":\"Hosting\",\"includes\":\"\",\"for\":\"\",\"price\":\"£20/month\"}]",
  "categories": "[{\"id\":\"c1\",\"name\":\"Design\",\"yours\":true},{\"id\":\"c2\",\"name\":\"Build\",\"yours\":true},{\"id\":\"c3\",\"name\":\"Growth\",\"yours\":true},{\"id\":\"g1\",\"name\":\"Strategy and consulting\",\"yours\":false},{\"id\":\"g2\",\"name\":\"Research\",\"yours\":false},{\"id\":\"g3\",\"name\":\"Branding\",\"yours\":false},{\"id\":\"g4\",\"name\":\"Development\",\"yours\":false},{\"id\":\"g5\",\"name\":\"Content and copywriting\",\"yours\":false},{\"id\":\"g6\",\"name\":\"Marketing\",\"yours\":false},{\"id\":\"g7\",\"name\":\"SEO\",\"yours\":false},{\"id\":\"g8\",\"name\":\"Advertising\",\"yours\":false},{\"id\":\"g9\",\"name\":\"Social media\",\"yours\":false},{\"id\":\"g10\",\"name\":\"Training and workshops\",\"yours\":false},{\"id\":\"g11\",\"name\":\"Audits and reviews\",\"yours\":false},{\"id\":\"g12\",\"name\":\"Support and maintenance\",\"yours\":false},{\"id\":\"g13\",\"name\":\"Hosting\",\"yours\":false},{\"id\":\"g14\",\"name\":\"Data and analytics\",\"yours\":false},{\"id\":\"g15\",\"name\":\"Bookkeeping and accounting\",\"yours\":false},{\"id\":\"g16\",\"name\":\"Payroll\",\"yours\":false},{\"id\":\"g17\",\"name\":\"Tax\",\"yours\":false},{\"id\":\"g18\",\"name\":\"Legal\",\"yours\":false},{\"id\":\"g19\",\"name\":\"HR and recruiting\",\"yours\":false},{\"id\":\"g20\",\"name\":\"Photography and video\",\"yours\":false},{\"id\":\"g21\",\"name\":\"Events\",\"yours\":false},{\"id\":\"g22\",\"name\":\"Coaching\",\"yours\":false},{\"id\":\"g23\",\"name\":\"Installation\",\"yours\":false},{\"id\":\"g24\",\"name\":\"Repairs\",\"yours\":false},{\"id\":\"g25\",\"name\":\"Servicing and inspections\",\"yours\":false},{\"id\":\"g26\",\"name\":\"Emergency call-outs\",\"yours\":false},{\"id\":\"g27\",\"name\":\"Cleaning\",\"yours\":false},{\"id\":\"g28\",\"name\":\"Care\",\"yours\":false}]",
  "items_note": ""
}

Reply:

{
  "assign": [
    {"id": "s6", "category": "g5"},
    {"id": "s7", "category": "g12"},
    {"id": "s8", "category": "g13"}
  ],
  "flag": [
    {"id": "s2", "why": "not_benefit", "text": "You get a homepage and 5 inner pages with mobile layouts and 2 rounds of changes"},
    {"id": "s4", "why": "vague", "text": "You get a Shopify shop set up with up to 200 items imported, plus payments and shipping"},
    {"id": "s5", "why": "needs_source", "text": "You get a technical crawl, the keyword gaps and a prioritised fix list"},
    {"id": "s8", "why": "not_benefit", "text": ""}
  ],
  "headlines": ["A site your team can edit, built in Leeds", "A brand that looks the same on your site and invoices"]
}

On the page, Copywriting, Care plan and Hosting get groups, three descriptions are rewritten (“Website design” becomes a line about the homepage and 5 inner pages you get), Hosting is pointed out with no rewrite because its own text says nothing more, and the two headlines are offered as buttons.

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://services-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":"services-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", "business": "Northlight Studio", "heading": "", "location": "Leeds", "industry": "", "services": "[...]", "categories": "[...]", "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="services-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: assign, 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: services-page-generator:refine:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json