← Startup Program Page Generator
Your token

Startup Program Page Generator API

Reading your notes, checking them and writing the program HTML, the CSS, the head tags with JSON-LD, Markdown, the application form and the applicant emails all run free in the browser and need no API. The API is for the one metered step: send your programs, numbered, with their type, headline, why line, offer, eligibility, how it is checked, steps, terms, proof and deadline, and get back, as JSON, a type for each program the page could not place, lines to reword with an optional rewrite of each, and one headline per program. The page checks every id, type and field, and refuses any rewrite or headline that adds a number, a name or a claim your notes do 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 program with no type a type (startups, education, nonprofit, incubator, other), points out lines to reword (field value, offer, eligibility or verify; why vague_offer, unclear_criteria, no_reason, needs_source, filler or pressure) with a rewrite from that program's own words or an empty one, and writes at most one headline per program.One JSON object

Input fields

All values are strings. task and programs are required.

FieldMeaning
task"refine"
productYour product name, or "".
headingYour page heading, or "".
programsJSON text: [{id, name, type, headline, value, offer, eligibility, verify, steps, terms, proof, deadline}] in order, ids like p1. type is startups, education, nonprofit, incubator, other or ""; in offer, eligibility, steps and terms items are separated by ; . Every value may be "". At most 12.
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: type, a list of {id, type} for programs that had no type; flag, a list of {id, field, why, text} where text is a suggested rewrite of that line or ""; and headlines, a list of {id, text}. Before using it, check every id, that no placed program is re-typed, and that a rewrite or headline 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 startup program sample on the page:

{
  "task": "refine",
  "product": "Shipkit",
  "heading": "",
  "programs": "[{\"id\":\"p1\",\"name\":\"Shipkit for Startups\",\"type\":\"startups\",\"headline\":\"\",\"value\":\"We were a three-person team once. Shipkit gives early teams the powerful deploy tooling big companies pay for, so you can ship daily without hiring a platform engineer.\",\"offer\":\"90% off the Team plan for 12 months; $2,000 in build credits; A 30-minute setup call with an engineer\",\"eligibility\":\"Pre-seed to Series A; Fewer than 25 employees; Early-stage and growing; New to Shipkit paid plans\",\"verify\":\"Apply with your work email and a link to your company website; we check funding on Crunchbase or ask for a note from your investor.\",\"steps\":\"Fill in the two-minute form; We reply within 2 business days; Your discount is applied to your workspace\",\"terms\":\"One discount per company; it ends if you raise a Series B\",\"proof\":\"1,400 startups ship with Shipkit, including Fernway and Lumo Health\",\"deadline\":\"\"}]",
  "items_note": ""
}

Reply:

{"type":[],"flag":[{"id":"p1","field":"value","why":"filler","text":"We were a three-person team once. Shipkit gives early teams the deploy tooling big companies pay for, so you can ship daily without hiring a platform engineer."},{"id":"p1","field":"eligibility","why":"unclear_criteria","text":"Pre-seed to Series A; Fewer than 25 employees; New to Shipkit paid plans"}],"headlines":[{"id":"p1","text":"Built for startups: 90% off the Team plan for 12 months"}]}

On the page, “powerful” leaves the why line, the eligibility item nobody could check is dropped, and the program gets the headline “Built for startups: 90% off the Team plan for 12 months”.

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://startups-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":"startups-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": "Shipkit", "heading": "", "programs": "[...]", "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="startups-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: type, flag, headlines
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: startups-page-generator:refine:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json