← Resource Page Generator
Your token

Resource Page Generator API

Reading your list, sorting it, checking it and writing the resource center HTML with its filters, the CSS, the head tags with CollectionPage JSON-LD, Markdown and the resource list all run free in the browser and need no API. The API is for the one metered step: send your resources, numbered, with their title, format, topic, description, date and link, and get back, as JSON, a format and topic for each resource the page could not sort, up to three resources to feature when you featured none, and a one-line description for resources that have none or whose description is filler. The page checks every id, format and topic, and refuses any topic or description 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 resource with no format or no topic a format (guide, article, ebook, webinar, video, podcast, template, checklist, case_study, report, tool, course) and a topic, picks up to three to feature (helps_buyers_decide, helps_users_succeed, best_start) when none is featured, and writes a one-line description for resources with none or with filler.One JSON object

Input fields

All values are strings. task and resources are required.

FieldMeaning
task"refine"
companyYour company or product name, or "".
headingYour page heading, or "".
topicsThe topics your list already uses, separated by ; , or "".
resourcesJSON text: [{id, title, format, topic, desc, desc_issue, date, link, featured}] in list order, ids like r4. format is one of the formats above or ""; desc_issue is filler, claim or ""; link is the path of the address; featured is a boolean. At most 60.
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: sort, a list of {id, format, topic} for resources that had no format or no topic (an empty string leaves that part as it was); featured, a list of {id, why}; and blurbs, a list of {id, text}. Before using it, check every id, that no sorted resource is re-sorted, that a new topic uses only words from your list, and that a description 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",
  "company": "Ledgerly",
  "heading": "",
  "topics": "Payroll; Taxes; Hiring",
  "resources": "[{\"id\":\"r1\",\"title\":\"How to run payroll for the first time\",\"format\":\"guide\",\"topic\":\"Payroll\",\"desc\":\"Set up pay schedules, tax withholding and your first pay run, step by step.\",\"desc_issue\":\"\",\"date\":\"2025-09-12\",\"link\":\"/guides/run-payroll-first-time\",\"featured\":true},{\"id\":\"r2\",\"title\":\"Payroll checklist for small businesses\",\"format\":\"checklist\",\"topic\":\"Payroll\",\"desc\":\"Every date and form for a monthly pay run, on one page.\",\"desc_issue\":\"\",\"date\":\"2025-06-03\",\"link\":\"/checklists/payroll\",\"featured\":false},{\"id\":\"r3\",\"title\":\"Payroll cost calculator\",\"format\":\"tool\",\"topic\":\"Payroll\",\"desc\":\"Enter a salary and a state and see what an employee costs you, taxes included.\",\"desc_issue\":\"\",\"date\":\"2024-11-20\",\"link\":\"/tools/payroll-cost-calculator\",\"featured\":false},{\"id\":\"r4\",\"title\":\"How Harbor Bakery cut payroll from 6 hours to 1\",\"format\":\"case_study\",\"topic\":\"Payroll\",\"desc\":\"Harbor Bakery moved 14 staff to Ledgerly and now runs payroll in one hour a month.\",\"desc_issue\":\"\",\"date\":\"2025-02-18\",\"link\":\"/customers/harbor-bakery\",\"featured\":true},{\"id\":\"r5\",\"title\":\"Quarterly tax deadlines explained\",\"format\":\"guide\",\"topic\":\"Taxes\",\"desc\":\"The 4 estimated tax dates, what is due on each and how to avoid a late penalty.\",\"desc_issue\":\"\",\"date\":\"2025-01-08\",\"link\":\"/guides/quarterly-tax-deadlines\",\"featured\":false},{\"id\":\"r6\",\"title\":\"The ultimate guide to small business deductions\",\"format\":\"ebook\",\"topic\":\"Taxes\",\"desc\":\"A comprehensive look at every deduction.\",\"desc_issue\":\"filler\",\"date\":\"2021-03-15\",\"link\":\"/ebooks/small-business-deductions\",\"featured\":false},{\"id\":\"r7\",\"title\":\"Year-end close webinar\",\"format\":\"webinar\",\"topic\":\"Taxes\",\"desc\":\"A 45-minute walkthrough of closing your books for the year, with a CPA.\",\"desc_issue\":\"\",\"date\":\"2024-12-04\",\"link\":\"/webinars/year-end-close\",\"featured\":true},{\"id\":\"r8\",\"title\":\"1099 vs W-2: hiring a contractor or an employee\",\"format\":\"article\",\"topic\":\"Hiring\",\"desc\":\"\",\"desc_issue\":\"\",\"date\":\"2024-07-22\",\"link\":\"/blog/1099-vs-w2\",\"featured\":false},{\"id\":\"r9\",\"title\":\"Offer letter template\",\"format\":\"template\",\"topic\":\"Hiring\",\"desc\":\"An editable offer letter with salary, start date and benefits.\",\"desc_issue\":\"\",\"date\":\"2025-04-30\",\"link\":\"/templates/offer-letter\",\"featured\":false},{\"id\":\"r10\",\"title\":\"Onboarding a new hire in Ledgerly\",\"format\":\"video\",\"topic\":\"Hiring\",\"desc\":\"Add a new employee, collect their tax forms and set up direct deposit.\",\"desc_issue\":\"\",\"date\":\"2025-08-14\",\"link\":\"/videos/onboarding-new-hire\",\"featured\":false},{\"id\":\"r11\",\"title\":\"State of small business payroll 2025\",\"format\":\"report\",\"topic\":\"\",\"desc\":\"A survey of 1,200 owners on pay schedules, overtime and payroll mistakes.\",\"desc_issue\":\"\",\"date\":\"2025-05-20\",\"link\":\"/reports/state-of-payroll-2025\",\"featured\":false},{\"id\":\"r12\",\"title\":\"Bookkeeping basics\",\"format\":\"course\",\"topic\":\"\",\"desc\":\"Six short lessons on sorting transactions and reconciling your bank account.\",\"desc_issue\":\"\",\"date\":\"2023-10-02\",\"link\":\"/academy/bookkeeping-basics\",\"featured\":false}]",
  "items_note": ""
}

Reply:

{"sort":[{"id":"r11","format":"","topic":"Payroll"},{"id":"r12","format":"","topic":"Bookkeeping"}],"featured":[],"blurbs":[{"id":"r6","text":"An ebook that walks you through the deductions available to your small business taxes."},{"id":"r8","text":"How a 1099 contractor differs from a W-2 employee, so you can decide which to hire."}]}

On the page, the payroll report is sorted under Payroll and the bookkeeping course under a new Bookkeeping topic, the contractor-or-employee article gets a description, and the “ultimate” ebook’s filler description is rewritten. Nothing is featured by AI because the list already marks three resources.

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://resource-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":"resource-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", "company": "Ledgerly", "heading": "", "topics": "Payroll; Taxes; Hiring", "resources": "[...]", "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="resource-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: sort, featured, blurbs
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: resource-page-generator:refine:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json