← Tools Page Generator
Your token

Tools Page Generator API

Reading your tool list, checking it and writing the hub HTML, the CSS, the head tags with JSON-LD, Markdown and the tool list CSV all run free in the browser and need no API. The API is for the one metered step: send your product name, heading, description, categories and tool list and get back, as JSON, a short description for the top of the hub, a one-line benefit for each tool whose line is missing or weak, a category for each tool that has none, and a search title and meta description. The page checks every suggestion and refuses any that adds a number, a name or a claim your list does not contain; do the same if you call the API yourself.

Base URL: https://api.skillsafe.ai/v1/app-api. Every response is an envelope {"data": ..., "error": null} or {"data": null, "error": {"code", "message"}}.

The task field

This app has one task. Always send "task": "refine".

taskWhat it doesReply
refineWrites the description under the heading, writes a benefit line for each tool whose benefit_issue is not empty, puts each uncategorised tool in an existing or new category, and writes a search title (with the product name) and a meta description.One JSON object

Input fields

All values are strings. task and tools are required.

FieldMeaning
task"refine"
productThe product or site the tools belong to, or "".
headingThe page heading.
introYour own description line, or "".
categoriesThe categories your tools use, separated by ; , or "".
no_signup"yes" when every tool needs no sign-up, otherwise "no".
toolsJSON text: [{id, name, category, type, benefit, benefit_issue, link}] in page order, ids t1, t2... type is calculator, checker, converter, generator, analyzer or tool; benefit_issue is "", missing, filler, claim, vague or long; link has no https://. The page sends at most 60 tools (the first 40 and the last 20) and clips long text in the middle, keeping both ends.
items_noteEmpty, or a sentence saying what was left out.

The reply

job.output.output is text holding one JSON object (sometimes inside a ```json fence) with four keys: intro, a string; benefits, a list of {id, text}; categories, a list of {id, category}; and seo, {title, description}. Before using it, check that no text adds a number, name or claim, that each id is a tool you sent, that a benefit goes only to a tool with a benefit_issue and a category only to a tool without one, that the title is at most 60 characters and names the product, and that the meta description is at most 160.

Worked example

Input (input.json), the pasted-list sample on the page:

{
  "task": "refine",
  "product": "Ledgerly",
  "heading": "Free tools from Ledgerly",
  "intro": "",
  "categories": "Invoicing; Pricing your work; Tax",
  "no_signup": "no",
  "tools": "[{\"id\":\"t1\",\"name\":\"Payment terms checker\",\"category\":\"\",\"type\":\"checker\",\"benefit\":\"Paste your payment terms and see whether they say when, how and how much a client pays\",\"benefit_issue\":\"\",\"link\":\"ledgerly.example.com/tools/payment-terms-checker\"},{\"id\":\"t2\",\"name\":\"Invoice generator\",\"category\":\"Invoicing\",\"type\":\"generator\",\"benefit\":\"Fill in your details and line items and download the invoice as a PDF\",\"benefit_issue\":\"\",\"link\":\"ledgerly.example.com/free-tools/invoice-generator\"},{\"id\":\"t3\",\"name\":\"Invoice number generator\",\"category\":\"Invoicing\",\"type\":\"generator\",\"benefit\":\"\",\"benefit_issue\":\"missing\",\"link\":\"ledgerly.example.com/free-tools/invoice-number-generator\"},{\"id\":\"t4\",\"name\":\"Late fee calculator\",\"category\":\"Invoicing\",\"type\":\"calculator\",\"benefit\":\"Work out the late fee on an unpaid invoice from the days overdue and your rate\",\"benefit_issue\":\"\",\"link\":\"ledgerly.example.com/free-tools/late-fee-calculator\"},{\"id\":\"t5\",\"name\":\"Hourly rate calculator\",\"category\":\"Pricing your work\",\"type\":\"calculator\",\"benefit\":\"A powerful way to find your perfect freelance rate\",\"benefit_issue\":\"claim\",\"link\":\"ledgerly.example.com/free-tools/hourly-rate-calculator\"},{\"id\":\"t6\",\"name\":\"Project quote template\",\"category\":\"Pricing your work\",\"type\":\"generator\",\"benefit\":\"Build a quote with line items, tax and a deposit, then send it as a link\",\"benefit_issue\":\"\",\"link\":\"ledgerly.example.com/free-tools/quote-template\"},{\"id\":\"t7\",\"name\":\"VAT calculator\",\"category\":\"Tax\",\"type\":\"calculator\",\"benefit\":\"Add or remove VAT at any rate and see the net, tax and gross amounts\",\"benefit_issue\":\"\",\"link\":\"ledgerly.example.com/free-tools/vat-calculator\"},{\"id\":\"t8\",\"name\":\"Expense receipt scanner\",\"category\":\"Tax\",\"type\":\"checker\",\"benefit\":\"Photograph a receipt and get the date, shop and total as a line you can copy\",\"benefit_issue\":\"\",\"link\":\"ledgerly.example.com/free-tools/receipt-scanner\"}]",
  "items_note": ""
}

Reply:

{
  "intro": "Free invoicing, pricing and tax tools from Ledgerly: generate invoices, work out late fees and hourly rates, and add or remove VAT.",
  "benefits": [
    {"id": "t3", "text": "Generate an invoice number to put on your next invoice"},
    {"id": "t5", "text": "Work out the hourly rate to charge for your freelance work"}
  ],
  "categories": [
    {"id": "t1", "category": "Checkers"}
  ],
  "seo": {
    "title": "Free invoicing, pricing and tax tools | Ledgerly",
    "description": "Free tools from Ledgerly: generate invoices, work out late fees and your hourly rate, add or remove VAT and check payment terms."
  }
}

On the page, the payment terms checker gets a Checkers category, the invoice number generator and the hourly rate calculator get new benefit lines, and the page title becomes “Free invoicing, pricing and tax tools | Ledgerly”.

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://tools-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":"tools-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": "Ledgerly", "heading": "Free tools from Ledgerly", "intro": "", "categories": "Invoicing; Tax", "no_signup": "no", "tools": "[...]", "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="tools-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: intro, benefits, categories, seo
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: tools-page-generator:refine:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json