← Watermark Photos
Your token

Watermark Photos API

Opening photos, drawing the watermark, the preview and every download run free in the browser and need no API; the photos never leave it. The API is for the one metered step: send a short description of what the photos are for, and get back, as JSON, the purpose, the watermark text and where it goes, with reason ids. The page builds this input for you and checks every word of the text before it is used.

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

taskWhat it doesReply
suggestReads what the photos are for and whose they are, and picks the purpose, the watermark text and the position.One JSON object

Input fields

Every field is a string; page_facts holds JSON text. All three are required.

FieldMeaning
task"suggest"
descriptionThe visitor's own words, up to 600 characters: what the photos are for, and any name, shop, website, handle or recipient to use.
page_facts{year, today, photos, orientation: {landscape, portrait, square}, has_logo, current_text}. today is written like 2 Dec 2026.

The reply

job.output.output is text holding one JSON object: purpose (client_proofs, preview_for_sale, id_copy, portfolio, social_post, product_listing or other), text (the watermark), position (tiled for proofs, previews and ID copies; otherwise bottom-right, or the corner the description asked for) and reasons (ids such as name_from_description, proof_marker, year_added, date_added, corner_requested, no_name_given). The page repeats the mark across the photo at 50% opacity for proofs and 35% for previews and ID copies, and puts it in a corner at 35% for a portfolio and 50% otherwise, always 20% (corner) or 30% (repeated) of the photo's width. Before using the text, check it as the page does: every word and number comes from the description, the year, today's date, or the marker and joining words (PROOF, PREVIEW, SAMPLE, COPY, for, only, by, and, & ...). If the balance ran low, truncated is true and the object may stop early.

Worked example

Input (input.json), from the page's "Couple photo" example:

{
  "task": "suggest",
  "description": "Proofs from the Okafor wedding for the couple to pick their favourites. I'm with Bright Day Studio, brightday.studio",
  "page_facts": "{\"year\":\"2026\",\"today\":\"2 Dec 2026\",\"photos\":1,\"orientation\":{\"landscape\":1,\"portrait\":0,\"square\":0},\"has_logo\":false,\"current_text\":\"© 2026\"}"
}

Reply:

{"purpose":"client_proofs","text":"PROOF · Bright Day Studio","position":"tiled","reasons":["name_from_description","proof_marker"]}

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, or a required field is missing or empty.
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://watermark-photos.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":"watermark-photos"}' | 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": "suggest", "description": "Proofs from the Okafor wedding for the couple to pick their favourites. I'm with Bright Day Studio, brightday.studio", "page_facts": "{...}"}
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="watermark-photos:suggest:$(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: purpose, text, position, reasons
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: watermark-photos:suggest:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json