← Screenshot Markup
Your token

Screenshot Markup API

Reading the screenshot, the contrast check, the marks and every download run free in the browser and need no API. The API is for the one metered step: send the marks a reviewer made - each with its label, kind, note and the numbers the page measured under it - and get back, as JSON, a design critique: findings with area, severity, why and a fix, what works well, the changes to make first, questions back to the reviewer and the areas the marks do not cover. The image itself is never sent. The page builds this input for you and checks the reply against the marks.

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

taskWhat it doesReply
critiqueReads the marks on one screenshot (notes and measured contrast, colours and sizes), the screen name, what it is for and the design stage, and writes them up as a structured design critique grounded only in those marks.One JSON object

Input fields

Every field is a string; marks holds JSON text.

FieldMeaning
task"critique"
screenWhat the screen is, for example Sign-up form (at most 120 characters).
contextOptional: who it is for and what it should do (at most 800 characters).
stageexploration, refinement or final.
sizeImage size and pixel density, for example 750 x 1334 px at 2x.
marksA JSON array of {ref, kind, note, measured}: ref is the label on the image (1, 2 ... for reviewer marks, C1, C2 ... for contrast checks), kind is pin, box, arrow or check, measured is the page's reading, such as #c3c9d3 on #ffffff, 1.7:1 (fails AA); 160 x 22 pt, under 44 x 44. At most 40 marks, notes at most 400 characters.
clipped_noteEmpty, or a sentence saying marks, notes or the context were cut.

The reply

job.output.output is text holding one JSON object: task, title, overall, findings (a list of {ref, area: usability|hierarchy|consistency|accessibility, severity: critical|moderate|minor, finding, why, fix}), works_well ({ref, text}), priorities (one to three {refs, change, why}), questions and not_covered. Before using it, check that every ref is one you sent, that every noted mark and every check is written up once, and that every contrast ratio quoted is one you measured, as the page does. 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), from the page's "Sign-up form" sample:

{
  "task": "critique",
  "screen": "Sign-up form",
  "context": "Sign-up page for a team note-taking app. New visitors should create an account in under a minute.",
  "stage": "refinement",
  "size": "1280 x 800 px at 1x",
  "marks": "[{\"ref\":\"1\",\"kind\":\"pin\",\"note\":\"The main button looks disabled even when the form is filled in. Is it?\",\"measured\":\"#ffffff on #8fbaf3, 2:1 (fails AA)\"},{\"ref\":\"2\",\"kind\":\"box\",\"note\":\"Placeholder text is so faint I could not tell if the field was empty.\",\"measured\":\"#c3c9d3 on #ffffff, 1.7:1 (fails AA); 321 x 45 pt\"},{\"ref\":\"3\",\"kind\":\"arrow\",\"note\":\"People who already have an account have to hunt for Log in.\",\"measured\":\"#a9b4c6 on #ffffff, 2.1:1 (fails AA)\"},{\"ref\":\"4\",\"kind\":\"pin\",\"note\":\"Clear heading - it says exactly what this page is for.\",\"measured\":\"#1d2433 on #ffffff, 15.5:1 (passes AAA)\"},{\"ref\":\"C1\",\"kind\":\"check\",\"note\":\"\",\"measured\":\"#c6ccd5 on #ffffff, 1.6:1 (fails AA)\"},{\"ref\":\"C2\",\"kind\":\"check\",\"note\":\"\",\"measured\":\"#c3c9d3 on #ffffff, 1.7:1 (fails AA)\"},{\"ref\":\"C3\",\"kind\":\"check\",\"note\":\"\",\"measured\":\"#c3c9d3 on #ffffff, 1.7:1 (fails AA)\"},{\"ref\":\"C4\",\"kind\":\"check\",\"note\":\"\",\"measured\":\"#b6bdc8 on #ffffff, 1.9:1 (fails AA)\"},{\"ref\":\"C5\",\"kind\":\"check\",\"note\":\"\",\"measured\":\"#b3bac6 on #ffffff, 2:1 (fails AA)\"},{\"ref\":\"C6\",\"kind\":\"check\",\"note\":\"\",\"measured\":\"#ffffff on #8fbaf3, 2:1 (fails AA)\"},{\"ref\":\"C7\",\"kind\":\"check\",\"note\":\"\",\"measured\":\"#a9b4c6 on #ffffff, 2.1:1 (fails AA)\"},{\"ref\":\"C8\",\"kind\":\"check\",\"note\":\"\",\"measured\":\"#a3acba on #ffffff, 2.3:1 (fails AA)\"}]",
  "clipped_note": ""
}

Reply:

{"task":"critique","title":"Sign-up form","overall":"The heading states the page's purpose clearly and reads at 15.5:1. The biggest problem is low contrast almost everywhere else: every measured check fails AA, including the main button, the placeholder text and the Log in link, which works against the goal of creating an account in under a minute.","findings":[{"ref":"1","area":"usability","severity":"critical","finding":"The main button looks disabled even when the form is filled in. Its text is measured at 2:1 against the button fill, which fails AA.","why":"If the primary action looks inactive, new visitors may stop and never finish signing up, which defeats the goal of creating an account in under a minute.","fix":"Give the button a clearly active fill and make the label reach at least 4.5:1 against it, and keep a visibly different style for a real disabled state."},{"ref":"2","area":"accessibility","severity":"moderate","finding":"The placeholder text is so faint that the reviewer could not tell whether the field was empty. It is measured at 1.7:1, which fails AA for any text size. The box is 321 x 45 pt, so the field itself is not an undersized target.","why":"People cannot tell an empty field from a filled one, and low-vision users cannot read the hint at all.","fix":"Darken the placeholder text until it reaches 4.5:1 against the field background, and keep it clearly lighter than typed input."},{"ref":"3","area":"usability","severity":"moderate","finding":"People who already have an account have to hunt for Log in. The text is measured at 2.1:1, which fails AA for any text size.","why":"Returning users who cannot find the way in may start a duplicate sign-up or leave.","fix":"Darken the Log in text until it reaches 4.5:1 and make it read as a link."},{"ref":"C1","area":"accessibility","severity":"moderate","finding":"This check measures 1.6:1, which fails AA for any text size. It is the lowest ratio in the set.","why":"Text below 3:1 is unreadable for many people, and the page needs to be read quickly to finish in under a minute.","fix":"Darken the text at this mark until it reaches 4.5:1."},{"ref":"C2","area":"accessibility","severity":"moderate","finding":"This check measures 1.7:1, which fails AA for any text size. The ink and background values match the measurement at mark 2.","why":"Text below 3:1 cannot be read reliably, so people may miss what this part of the form says.","fix":"Darken the text at this mark until it reaches 4.5:1."},{"ref":"C3","area":"accessibility","severity":"moderate","finding":"This check measures 1.7:1, which fails AA for any text size.","why":"Text below 3:1 excludes low-vision users and anyone on a dim screen.","fix":"Darken the text at this mark until it reaches 4.5:1."},{"ref":"C4","area":"accessibility","severity":"moderate","finding":"This check measures 1.9:1, which fails AA for any text size.","why":"Text below 3:1 is hard to read, which slows down a form meant to be filled in quickly.","fix":"Darken the text at this mark until it reaches 4.5:1."},{"ref":"C5","area":"accessibility","severity":"moderate","finding":"This check measures 2:1, which fails AA for any text size.","why":"Text below 3:1 is hard to read for many people and fails for every text size.","fix":"Darken the text at this mark until it reaches 4.5:1."},{"ref":"C6","area":"accessibility","severity":"moderate","finding":"White text on the light blue fill measures 2:1, which fails AA for any text size. The measurement is the same as mark 1.","why":"Low-contrast white text on a light fill is hard to read, and it adds to the disabled look that mark 1 describes.","fix":"Use a darker fill behind the white text until the label reaches 4.5:1."},{"ref":"C7","area":"accessibility","severity":"moderate","finding":"This check measures 2.1:1, which fails AA for any text size. The values match the measurement at mark 3.","why":"Text below 3:1 is hard to read, and mark 3 already reports that people struggle to find Log in.","fix":"Darken the text at this mark until it reaches 4.5:1."},{"ref":"C8","area":"accessibility","severity":"moderate","finding":"This check measures 2.3:1, which fails AA for any text size.","why":"Text below 3:1 is hard to read for many people.","fix":"Darken the text at this mark until it reaches 4.5:1."}],"works_well":[{"ref":"4","text":"The heading says exactly what the page is for, and at 15.5:1 it passes AAA, so it is easy to read and sets a clear starting point for new visitors."}],"priorities":[{"refs":["1","C6"],"change":"Make the main button look active, with a label that reaches at least 4.5:1 against its fill.","why":"It is the only way to finish sign-up, and it currently looks disabled."},{"refs":["2","C2","C3","C1"],"change":"Darken the placeholder and other faint field text until it reaches 4.5:1.","why":"People need to read the fields to fill them in under a minute, and these measure between 1.6:1 and 1.7:1."},{"refs":["3","C7"],"change":"Darken the Log in text to at least 4.5:1 and make it easy to spot.","why":"Returning users need a clear way out of the sign-up flow."}],"questions":["Mark 1 asks whether the button is actually disabled when the form is filled in. Is it, or does it only look that way because of its colours?","C1, C3, C4, C5 and C8 have no notes. Which elements are they on, so the fixes can be named precisely?"],"not_covered":["consistency"]}

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://screenshot-markup.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":"screenshot-markup"}' | 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": "critique", "screen": "Sign-up form", "context": "", "stage": "refinement", "size": "1280 x 800 px at 1x", "marks": "[]", "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="screenshot-markup:critique:$(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: title, overall, findings, works_well, priorities, ...
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: screenshot-markup:critique:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json