← Privacy Policy Generator
Your token

Privacy Policy Generator API

Writing the policy, the checks and every export run free in the browser and need no API. The API is for the one metered step: send a description of a product and get back, as JSON, which product type, data switches and service providers fit it, each backed by a quote from the description. The page checks each quote, applies the ones it finds and rewrites the policy.

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": "tailor".

taskWhat it doesReply
tailorReads the description and picks the product type (website, account, saas, store, mobile, api, marketplace, ai_tool), the settings it settles (accounts, payments, user_content, public_content, ai, analytics, ads, newsletter, precise_location, eu, california, min_age) and the service providers it names with their role (hosting, payments, analytics, email, ai, ads, other), each with a verbatim quote; writes a short description of the product and up to three open questions. It never writes policy text.One JSON object

Input fields

FieldTypeMeaning
taskstring"tailor"
descriptionstringHomepage text, an app store listing or notes about the product. The page sends at most 6,000 characters: longer text keeps its first and last lines and loses the middle, with a marker line.
currentstringJSON text of the current settings: category, name, the switches (accounts, payments, user_content, public_content, ai, analytics, ads, newsletter, precise_location, eu, california, min_age) and the providers already named (hosting, payment_provider, email_provider, ai_providers, ad_networks, other_processors). Send "{}" if you have none.
clipped_notestringEmpty, or a sentence saying the middle of the description was cut.

The reply

job.output.output is text holding one JSON object (sometimes inside a ```json fence): category {id, quote}, settings (a list of {key, value, quote}), providers (a list of {name, role, quote}), summary (at most 45 words) and questions (0 to 3 strings). Before applying a suggestion, check that its quote is in your description: the page ignores any it cannot find. 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):

{
  "task": "tailor",
  "description": "Inboxly - the shared inbox for small support teams\n\nInboxly sorts your team's support email by topic and urgency, and drafts a reply for every ticket that an agent can edit and send. Replies are drafted with GPT-4o from OpenAI; we never use your customers' emails to train models.\n\nPlans start at $12 per agent a month, billed through Stripe. Every plan starts with a 14-day free trial.\nSign up with your work email and invite your teammates.\n\nWe use Plausible for privacy-friendly analytics, Postmark to send notification emails, and the app is hosted on Vercel.\nInboxly serves support teams across Europe and the US.",
  "current": "{\"category\":\"website\",\"name\":\"Inboxly\",\"accounts\":false,\"payments\":false,\"user_content\":false,\"public_content\":false,\"ai\":false,\"analytics\":\"none\",\"ads\":false,\"newsletter\":false,\"precise_location\":false,\"eu\":true,\"california\":true,\"min_age\":13,\"hosting\":\"\",\"payment_provider\":\"\",\"email_provider\":\"\",\"ai_providers\":\"\",\"ad_networks\":\"\",\"other_processors\":\"\"}",
  "clipped_note": ""
}

Reply:

```json
{
  "category": {"id": "saas", "quote": "Plans start at $12 per agent a month"},
  "settings": [
    {"key": "payments", "value": true, "quote": "billed through Stripe"},
    {"key": "accounts", "value": true, "quote": "Sign up with your work email"},
    {"key": "ai", "value": true, "quote": "Replies are drafted with GPT-4o from OpenAI"},
    {"key": "analytics", "value": "plausible", "quote": "We use Plausible for privacy-friendly analytics"},
    {"key": "eu", "value": true, "quote": "serves support teams across Europe and the US"},
    {"key": "california", "value": true, "quote": "serves support teams across Europe and the US"}
  ],
  "providers": [
    {"name": "OpenAI", "role": "ai", "quote": "Replies are drafted with GPT-4o from OpenAI"},
    {"name": "Stripe", "role": "payments", "quote": "billed through Stripe"},
    {"name": "Plausible", "role": "analytics", "quote": "We use Plausible for privacy-friendly analytics"},
    {"name": "Postmark", "role": "email", "quote": "Postmark to send notification emails"},
    {"name": "Vercel", "role": "hosting", "quote": "the app is hosted on Vercel"}
  ],
  "summary": "Inboxly is a shared inbox for support teams. It sorts a team's support email by topic and urgency and drafts a reply for every ticket that an agent can edit and send.",
  "questions": [
    "How long do you keep customers' emails and drafted replies after a ticket is closed?",
    "Does OpenAI retain the email content you send it, and under what terms?"
  ]
}
```

On the page, this reply turns a plain website's policy into a subscription service's: accounts, payments through Stripe, AI processing by OpenAI with an AI section, Plausible analytics, Postmark emails and Vercel hosting, all listed in the provider table.

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://privacy-policy-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":"privacy-policy-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": "tailor", "description": "...", "current": "{...}", "clipped_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="privacy-policy-generator:tailor:$(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: category, settings, providers, ...
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: privacy-policy-generator:tailor:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json