← About Page Generator
Your token

About Page Generator API

Reading your notes, checking them and writing the About page HTML, the CSS and the AboutPage and Organization JSON-LD all run free in the browser and need no API. The API is for the one metered step: send your story split into numbered sentences, and get back, as JSON, the id of the sentence that should sit under the heading, the ids of the sentence or two that state your mission, and the ids of sentences to leave out with a reason word. 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": "tighten".

taskWhat it doesReply
tightenPicks the story sentence for the line under the heading, the one or two sentences that state the mission, and the sentences to leave out (empty claims, repeats, contact or sales details). It never writes new words.One JSON object

Input fields

All values are strings. task and parts are required.

FieldMeaning
task"tighten"
companyThe business name, or "".
givenWhat you already wrote yourself: "tagline", "mission", "tagline,mission" or "". Anything listed is kept, and the model does not pick one.
taglineYour own line under the heading, or "".
missionYour own mission, or "".
partsJSON text: the story in order as [{id, text, list?}], one sentence or list item each, ids like s3. At most 80 parts.
parts_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: tagline, one part id or ""; mission, a list of 0 to 2 part ids; and cut, a list of {id, why} where why is vague, repeat or off_topic. Before using it, check that every id is one you sent, that the tagline is at most 30 words and the mission at most 50, that nothing listed in given was replaced, that a vague cut holds no number, and that at least 2 story sentences remain; 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 startup (loose notes) sample on the page:

{
  "task": "tighten",
  "company": "Lumen Ledger",
  "given": "",
  "tagline": "",
  "mission": "",
  "parts": "[{\"id\":\"s1\",\"text\":\"Lumen Ledger is an innovative, best-in-class platform that seamlessly empowers businesses.\"},{\"id\":\"s2\",\"text\":\"We started in 2019 because our founder, Ana Ruiz, spent every Sunday night reconciling the books for her parents' hardware store in Valencia by hand.\"},{\"id\":\"s3\",\"text\":\"She built the first version in a spreadsheet, then in code, and her parents closed their first month in forty minutes instead of two days.\"},{\"id\":\"s4\",\"text\":\"Today Lumen Ledger is bookkeeping software for small shops that matches every sale and refund from the bank feed and the till.\"},{\"id\":\"s5\",\"text\":\"We want every shop owner to close the month in under an hour, without an accountant on speed dial.\"},{\"id\":\"s6\",\"text\":\"More than 3,200 shops in Spain and Portugal use it every day.\"},{\"id\":\"s7\",\"text\":\"We are a passionate team of innovators who love what we do.\"},{\"id\":\"s8\",\"text\":\"Our team is 24 people across Valencia and Lisbon, and half of us have worked behind a shop counter.\"},{\"id\":\"s9\",\"text\":\"We are a passionate team that loves what we do.\"},{\"id\":\"s10\",\"text\":\"Email us at hello@example.com or book a demo on our website.\"}]",
  "parts_note": ""
}

Reply:

{
  "tagline": "s4",
  "mission": ["s5"],
  "cut": [
    {"id": "s1", "why": "vague"},
    {"id": "s7", "why": "vague"},
    {"id": "s9", "why": "vague"},
    {"id": "s10", "why": "off_topic"}
  ]
}

On the page, the chosen sentences move out of the story to sit under the heading and in the mission block, and the empty claims, the repeated sentence and the email line leave the story.

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://about-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":"about-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": "tighten", "company": "...", "given": "", "tagline": "", "mission": "", "parts": "[...]", "parts_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="about-page-generator:tighten:$(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: tagline, mission, cut
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: about-page-generator:tighten:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json