← Sign-up and Log-in Page Generator
Your token

Sign-up and Log-in Page Generator API

Reading your notes or form, checking them and writing the sign-up and log-in HTML, the CSS, the head tags and the checklist all run free in the browser and need no API. The API is for the one metered step: send your product, what it does, the offer, the sign-in options, the fields, the discount and your trust lines and get back, as JSON, a sign-up headline, the line under it, the button text, a log-in headline and line, and up to three reasons to sign up. The page checks every line and refuses any that adds a number, a name or a promise your notes do not make; 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 sign-up headline, the line under it and the button text, the log-in headline and an optional line, and up to three reasons to sign up, from the fields you send.One JSON object

Input fields

All values are strings. task is required; send "" for anything you do not have.

FieldMeaning
task"refine"
productThe product name, or "".
aboutWhat the product does, in your words. The page clips long text in the middle, keeping both ends, with [...].
goaltrial, account, paid, waitlist or "".
trialTrial length as written ("14 days"), or "".
cardnone, needed or "".
audienceWho signs up, or "".
sign_inThe ways in, comma-separated ("Google, Microsoft, email and password").
fieldsWhat the sign-up form asks for, comma-separated, (optional) marked.
discountAn offer applied at sign-up and how eligibility is checked, or "".
trustYour trust lines separated by ; . The page sends at most 8 (the first 5 and the last 3).
headlineYour current sign-up headline, or "".
headline_issue"", generic or missing.
buttonYour current button text, or "".
button_issue"", generic or missing.
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 three keys: signup, {headline, subhead, button}; login, {headline, subhead}; and points, a list of strings. Before using it, check that no line adds a number, a name or a promise (free, trial, no card, cancel any time, secure) your input does not hold, that the headline is at most 70 characters and not just "Sign up", the button at most 28 characters and not Submit, the log-in headline names the product, and there are at most three points of at most 90 characters.

Worked example

Input (input.json), the free trial sample on the page:

{
  "task": "refine",
  "product": "Tallyway",
  "about": "Invoices, payment reminders and expense tracking for freelancers and small studios",
  "goal": "trial",
  "trial": "14 days",
  "card": "none",
  "audience": "",
  "sign_in": "Google, Microsoft, email and password",
  "fields": "Full name, Work email, Password, Company, Phone number, Team size",
  "discount": "",
  "trust": "Used by 12,000 freelancers; Cancel any time; Your data stays in the EU",
  "headline": "Sign up",
  "headline_issue": "generic",
  "button": "Submit",
  "button_issue": "generic",
  "items_note": ""
}

Reply:

{"signup":{"headline":"Start your 14-day free trial of Tallyway","subhead":"Invoices, payment reminders and expense tracking for freelancers and small studios. No card needed.","button":"Start free trial"},"login":{"headline":"Log in to Tallyway","subhead":"Invoices, payment reminders and expense tracking."},"points":["Used by 12,000 freelancers","Your data stays in the EU","You can cancel any time"]}

On the page, the headline “Sign up” becomes “Start your 14-day free trial of Tallyway”, the Submit button becomes “Start free trial” and the side panel lists the three reasons.

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://signup-login-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":"signup-login-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": "Tallyway", "about": "Invoices for freelancers", "goal": "trial", "trial": "14 days", "card": "none", "audience": "", "sign_in": "Google, email and password", "fields": "Work email, Password", "discount": "", "trust": "", "headline": "Sign up", "headline_issue": "generic", "button": "Submit", "button_issue": "generic", "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="signup-login-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: signup, login, points
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: signup-login-page-generator:refine:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json