← Comparison Page Generator
Your token

Comparison Page Generator API

Reading your table, checking it and writing the comparison HTML, the CSS, the JSON-LD, Markdown and CSV all run free in the browser and need no API. The API is for the one metered step: send the products and the numbered rows of your table, each with its cells and the products found ahead on it, and get back, as JSON, the order the rows should be read in, up to three rows that are the reasons to choose each product, and cells whose wording reads as opinion, is unclear or needs a source. The model never writes new text; the page checks every id and refuses any choice it cannot check.

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

taskWhat it doesReply
arrangeOrders the rows by what buyers decide on (inside each group), picks up to three reasons to choose each product from the rows where it is ahead, and points out cells to reword (loaded, unclear, needs_source). It never writes new words.One JSON object

Input fields

All values are strings. task, products and rows are required.

FieldMeaning
task"arrange"
youThe id of your own product (for example "p1"), or "" for a neutral comparison.
productsJSON text: [{id, name}] in table order, ids like p2. At most 12.
rowsJSON text: [{id, group?, label, kind, cells, ahead}], ids like r4. kind is feature, price, best_for or text; cells maps product id to Yes, Partial (note), No, Not stated or the cell's words; ahead lists the product ids ahead on that row (a Yes where another has Partial or No, or the lowest price when units match). At most 60 rows.
as_ofThe date the products were checked, or "".
rows_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: order, every row id once, most decisive first; lead, one {product, rows} entry per product with 0 to 3 row ids; and flag, a list of {id, product, why} where why is loaded, unclear or needs_source. Before using it, check that every id is one you sent, that each reason row lists that product in ahead, that no product has more than three reasons, and that no flag sits on a plain Yes or No; the page does all of this, fills in reasons for a product the reply skipped, 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": "arrange",
  "you": "p1",
  "products": "[{\"id\":\"p1\",\"name\":\"Quillbill\"},{\"id\":\"p2\",\"name\":\"Ledgerfox\"},{\"id\":\"p3\",\"name\":\"Sumwise\"}]",
  "rows": "[{\"id\":\"r1\",\"label\":\"Best for\",\"kind\":\"best_for\",\"cells\":{\"p1\":\"Freelancers who bill by the hour\",\"p2\":\"Agencies with 10+ people\",\"p3\":\"Solo makers who invoice a few times a month\"},\"ahead\":[]},{\"id\":\"r2\",\"label\":\"Starting price\",\"kind\":\"price\",\"cells\":{\"p1\":\"$12/user/mo\",\"p2\":\"$15/user/mo\",\"p3\":\"$9/user/mo\"},\"ahead\":[\"p3\"],\"group\":\"Pricing\"},{\"id\":\"r3\",\"label\":\"Free plan\",\"kind\":\"feature\",\"cells\":{\"p1\":\"Yes (3 clients)\",\"p2\":\"No\",\"p3\":\"Yes (5 invoices a month)\"},\"ahead\":[\"p1\",\"p3\"],\"group\":\"Pricing\"},{\"id\":\"r4\",\"label\":\"Free trial\",\"kind\":\"text\",\"cells\":{\"p1\":\"14 days\",\"p2\":\"30 days\",\"p3\":\"No\"},\"ahead\":[],\"group\":\"Pricing\"},{\"id\":\"r5\",\"label\":\"Recurring invoices\",\"kind\":\"feature\",\"cells\":{\"p1\":\"Yes\",\"p2\":\"Yes\",\"p3\":\"Partial (Pro plan)\"},\"ahead\":[\"p1\",\"p2\"],\"group\":\"Invoicing\"},{\"id\":\"r6\",\"label\":\"Time tracking\",\"kind\":\"feature\",\"cells\":{\"p1\":\"Yes\",\"p2\":\"Partial (Add-on)\",\"p3\":\"No\"},\"ahead\":[\"p1\"],\"group\":\"Invoicing\"},{\"id\":\"r7\",\"label\":\"Multi-currency\",\"kind\":\"feature\",\"cells\":{\"p1\":\"Yes\",\"p2\":\"Yes\",\"p3\":\"No\"},\"ahead\":[\"p1\",\"p2\"],\"group\":\"Invoicing\"},{\"id\":\"r8\",\"label\":\"Bank feeds\",\"kind\":\"feature\",\"cells\":{\"p1\":\"Yes\",\"p2\":\"Yes\",\"p3\":\"Not stated\"},\"ahead\":[],\"group\":\"Invoicing\"},{\"id\":\"r9\",\"label\":\"Client portal\",\"kind\":\"feature\",\"cells\":{\"p1\":\"Partial (view only)\",\"p2\":\"Yes\",\"p3\":\"No\"},\"ahead\":[\"p2\"],\"group\":\"Team\"},{\"id\":\"r10\",\"label\":\"User roles\",\"kind\":\"feature\",\"cells\":{\"p1\":\"No\",\"p2\":\"Yes\",\"p3\":\"No\"},\"ahead\":[\"p2\"],\"group\":\"Team\"},{\"id\":\"r11\",\"label\":\"Mobile app\",\"kind\":\"feature\",\"cells\":{\"p1\":\"Yes\",\"p2\":\"Clunky mobile app\",\"p3\":\"No\"},\"ahead\":[\"p1\"],\"group\":\"Team\"},{\"id\":\"r12\",\"label\":\"Support\",\"kind\":\"text\",\"cells\":{\"p1\":\"Email, 24h reply\",\"p2\":\"Phone and chat\",\"p3\":\"Email\"},\"ahead\":[],\"group\":\"Team\"}]",
  "as_of": "March 2026",
  "rows_note": ""
}

Reply:

{"order":["r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12"],"lead":[{"product":"p1","rows":["r3","r6","r5"]},{"product":"p2","rows":["r10","r9","r5"]},{"product":"p3","rows":["r2","r3"]}],"flag":[{"id":"r11","product":"p2","why":"loaded"},{"id":"r6","product":"p2","why":"unclear"}]}

On the page, the quick verdict says to choose Quillbill for its free plan, time tracking and recurring invoices, Ledgerfox for user roles, the client portal and recurring invoices, and Sumwise for its starting price and free plan; “Clunky mobile app” and the bare “Add-on” are listed in the check as wording to fix.

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://comparison-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":"comparison-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": "arrange", "you": "p1", "products": "[...]", "rows": "[...]", "as_of": "", "rows_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="comparison-page-generator:arrange:$(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: order, lead, flag
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: comparison-page-generator:arrange:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json