← Blog Page Generator
Your token

Blog Page Generator API

Reading your feed or post list, checking it and writing the blog index HTML, the CSS, the head tags with JSON-LD, the RSS feed and Markdown all run free in the browser and need no API. The API is for the one metered step: send your blog's name, intro, topics and post list and get back, as JSON, an intro line, up to three editor's picks with a reason each, a topic for each post that has none, and a search title and meta description. The page checks every suggestion and refuses any that adds a number, a name or a claim your list does not contain.

The task field

This app has one task. Always send "task": "refine".

taskWhat it doesReply
refineWrites an intro for the top of the index, picks up to three posts for a new reader with a reason from each post's own words, puts each untopiced post under an existing or new topic, and writes a search title (with the blog name) and a meta description.One JSON object

Input fields

All values are strings. task and posts are required.

FieldMeaning
task"refine"
blogYour blog's name, or "".
headingYour page heading, or "".
introYour own intro line, or "".
topicsThe topics your posts use, separated by ; , or "".
postsJSON text: [{n, title, topic, date, excerpt}] in page order, n starting at 1. topic is "" for a post without one; date is YYYY-MM-DD or "". The page sends at most 60 posts (the first 40 and the last 20) and clips long text in the middle, keeping both ends.
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 four keys: intro, a string; picks, a list of {n, why}; topics, a list of {n, topic}; and seo, {title, description}. Before using it, check that no text adds a number, name or claim, that each n is a post you sent, that a topic goes only to a post without one, that the title is at most 60 characters and names the blog, and that the description is at most 160; 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 part that arrived whole.

Worked example

Input (input.json), the RSS feed sample on the page:

{
  "task": "refine",
  "blog": "The Tallyway Blog",
  "heading": "",
  "intro": "Invoicing, getting paid and running the money side of a freelance business.",
  "topics": "Guides; Product updates; Customer stories",
  "posts": "[{\"n\":1,\"title\":\"How to write an invoice a client pays on time\",\"topic\":\"Guides\",\"date\":\"2026-11-24\",\"excerpt\":\"Seven lines every invoice needs, from the due date to the payment link, and the wording that gets a reply instead of silence.\"},{\"n\":2,\"title\":\"Recurring invoices now repeat on any day of the month\",\"topic\":\"Product updates\",\"date\":\"2026-11-12\",\"excerpt\":\"Pick the 1st, the 15th or the last working day, and Tallyway sends the invoice and the reminder for you.\"},{\"n\":3,\"title\":\"Late fees: what you can charge and how to say it\",\"topic\":\"Guides\",\"date\":\"2026-11-02\",\"excerpt\":\"A late fee only works if it is in the contract and on the invoice. Here is the sentence to use and when to waive it.\"},{\"n\":4,\"title\":\"How a two-person design studio cut unpaid invoices to zero\",\"topic\":\"Customer stories\",\"date\":\"2026-10-21\",\"excerpt\":\"Studio North moved deposits up front and switched on reminders. Six months later nothing was overdue.\"},{\"n\":5,\"title\":\"Update\",\"topic\":\"\",\"date\":\"2026-10-09\",\"excerpt\":\"Card payments in 12 more countries, a faster invoice editor and a new export to your accountant.\"},{\"n\":6,\"title\":\"Quarterly taxes for freelancers, in plain words\",\"topic\":\"Guides\",\"date\":\"2026-09-22\",\"excerpt\":\"What to set aside from each payment, when the four deadlines fall, and how to keep the receipts your accountant asks for.\"},{\"n\":7,\"title\":\"Deposits: ask for them without losing the client\",\"topic\":\"Guides\",\"date\":\"2026-09-03\",\"excerpt\":\"A deposit protects your time. The three ways to ask for one, and what to do when a client pushes back.\"},{\"n\":8,\"title\":\"Multi-currency invoices are here\",\"topic\":\"Product updates\",\"date\":\"2026-08-18\",\"excerpt\":\"Bill a client in euros, get paid in dollars, and see the exchange rate on every invoice.\"},{\"n\":9,\"title\":\"From spreadsheet to paid: a photographer's first year of invoicing\",\"topic\":\"Customer stories\",\"date\":\"2026-07-27\",\"excerpt\":\"Ines Duarte sent 140 invoices in her first year. What she changed after the first ten.\"}]",
  "items_note": ""
}

Reply:

{"intro":"Invoicing, getting paid and running the money side of a freelance business, with guides, product updates and customer stories.","picks":[{"n":1,"why":"You get the lines every invoice needs and wording that gets a reply instead of silence."},{"n":6,"why":"What to set aside from each payment and when the deadlines fall, in plain words for freelancers."},{"n":7,"why":"You learn how to ask for a deposit without losing the client and what to do when a client pushes back."}],"topics":[{"n":5,"topic":"Product updates"}],"seo":{"title":"The Tallyway Blog: invoicing and getting paid","description":"Guides on invoicing, late fees, deposits and quarterly taxes for freelancers, plus product updates and customer stories. Browse by topic."}}

On the page, the “Update” post moves under Product updates, three guides appear as editor's picks with their reasons, and the page title becomes “The Tallyway Blog: invoicing and getting paid”.

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://blog-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":"blog-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", "blog": "The Tallyway Blog", "heading": "", "intro": "", "topics": "Guides", "posts": "[...]", "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="blog-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: intro, picks, topics, seo
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: blog-page-generator:refine:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json