← Careers Page Generator
Your token

Careers Page Generator API

Reading the roles, checking them and writing the careers section HTML, the CSS, the filter script and the JobPosting JSON-LD all run free in the browser and need no API. The API is for the one metered step: send your roles with each description split into numbered parts, and get back, as JSON, a cleaner title per role made only of the title's own words, the one or two part ids that sum up the job, a team for roles without one, and pairs of roles listed twice. The model never writes new title or summary text; the page checks every id and every title word and refuses any change 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": "tidy".

taskWhat it doesReply
tidyTakes job codes, places, pay, shouting capitals and hype words out of titles, picks the summary sentences from each role's own description, gives roles a team, and names duplicate roles. It never writes new words into a title or a summary.One JSON object

Input fields

All values are strings. task and roles are required.

FieldMeaning
task"tidy"
teams"given" when at least one role already has a team, otherwise "none" (then a list of 6 or more roles is sorted into 2 to 6 teams).
rolesJSON text: a list of roles in page order, each {id, title, parts} plus optional team, location and type, where parts is the description as [{id, text, list?}], one sentence or list item each, ids like r3.2. At most 60 roles and 20 parts per description.
roles_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 two keys: roles, one {id, title, summary, team} per role in input order (title is the cleaned title, summary is a list of 1 or 2 part ids, team is a team name or ""); and same, a list of id pairs or []. Before using it, check that every id is one you sent, that every word of a new title is in the old title in the same order, that a summary has at most 2 non-list parts of that role and at most 45 words, and that teams follow the rules above; 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 entry that arrived whole.

Worked example

Input (input.json), the old jobs page (HTML) sample on the page (7 roles, no teams):

{
  "task": "tidy",
  "teams": "none",
  "roles": "[{\"id\":\"r1\",\"title\":\"Warehouse Associate\",\"location\":\"Reno, NV\",\"type\":\"Full-time\",\"parts\":[{\"id\":\"r1.1\",\"text\":\"Pick, pack and load orders in our Reno warehouse.\"},{\"id\":\"r1.2\",\"text\":\"Day and night shifts.\"},{\"id\":\"r1.3\",\"text\":\"You can lift 50 lb and you are happy on your feet all day.\"}]},{\"id\":\"r2\",\"title\":\"Forklift Operator - Night Shift (JOB-4471)\",\"location\":\"Reno, NV\",\"type\":\"Full-time\",\"parts\":[{\"id\":\"r2.1\",\"text\":\"Move pallets safely between the docks and the racks on the night shift.\"},{\"id\":\"r2.2\",\"text\":\"A current forklift certificate is required.\"},{\"id\":\"r2.3\",\"text\":\"We pay a night premium on top of the base rate.\"}]},{\"id\":\"r3\",\"title\":\"Dispatcher\",\"location\":\"Sacramento, CA\",\"type\":\"Full-time\",\"parts\":[{\"id\":\"r3.1\",\"text\":\"Plan routes for our 30 trucks and keep drivers and customers up to date when plans change.\"},{\"id\":\"r3.2\",\"text\":\"You know your way around routing software and stay calm under pressure.\"}]},{\"id\":\"r4\",\"title\":\"CDL-A Truck Driver\",\"location\":\"Reno, NV\",\"type\":\"Full-time\",\"parts\":[{\"id\":\"r4.1\",\"text\":\"Regional routes across Nevada and California, home most weekends.\"},{\"id\":\"r4.2\",\"text\":\"You hold a CDL-A licence and have two years of driving experience.\"}]},{\"id\":\"r5\",\"title\":\"Accounts Payable Clerk\",\"location\":\"Remote\",\"type\":\"Full-time\",\"parts\":[{\"id\":\"r5.1\",\"text\":\"Match invoices to delivery notes, pay suppliers on time and answer their questions.\"},{\"id\":\"r5.2\",\"text\":\"You have done accounts payable before and you are careful with numbers.\"}]},{\"id\":\"r6\",\"title\":\"HR Generalist\",\"location\":\"Sacramento, CA\",\"type\":\"Full-time\",\"parts\":[{\"id\":\"r6.1\",\"text\":\"Look after hiring, onboarding and the questions our 200 drivers and warehouse staff bring to HR.\"},{\"id\":\"r6.2\",\"text\":\"You know California employment rules.\"}]},{\"id\":\"r7\",\"title\":\"Fleet Mechanic\",\"location\":\"Reno, NV\",\"type\":\"Full-time\",\"parts\":[{\"id\":\"r7.1\",\"text\":\"Service and repair our trucks and trailers in our Reno shop.\"},{\"id\":\"r7.2\",\"text\":\"You have diesel mechanic experience and your own tools.\"}]}]",
  "roles_note": ""
}

Reply:

{"roles":[{"id":"r1","title":"Warehouse Associate","summary":["r1.1"],"team":"Warehouse"},{"id":"r2","title":"Forklift Operator - Night Shift","summary":["r2.1"],"team":"Warehouse"},{"id":"r3","title":"Dispatcher","summary":["r3.1"],"team":"Drivers"},{"id":"r4","title":"CDL-A Truck Driver","summary":["r4.1"],"team":"Drivers"},{"id":"r5","title":"Accounts Payable Clerk","summary":["r5.1"],"team":"Office"},{"id":"r6","title":"HR Generalist","summary":["r6.1"],"team":"Office"},{"id":"r7","title":"Fleet Mechanic","summary":["r7.1"],"team":"Maintenance"}],"same":[]}

On the page, the forklift title loses its job code (Forklift Operator - Night Shift), each role's summary becomes the sentence that describes the work, and the list is grouped into four teams: Warehouse, Drivers, Office and Maintenance.

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://careers-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":"careers-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": "tidy", "teams": "none", "roles": "[...]", "roles_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="careers-page-generator:tidy:$(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: roles, same
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: careers-page-generator:tidy:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json