We publish open data on AI training jobs: roles on platforms like Mercor, micro1, Alignerr and Handshake AI that pay people to write, rate and check answers for AI models. The data has a keyless JSON API. This week I wanted a live view of it somewhere people who work with datasets already look, so I put one on Hugging Face as a static Space. The whole thing is one HTML file of about 4.6 KB, with no build step and no server.
Here is how it works, and the few choices that kept it small.
The API it reads
GET https://www.aitrainingpay.com/api/v1/pay-index returns one JSON document: an overall summary plus arrays for fields, platforms, credentials and languages. Each entry carries the same keys:
{ "id": "law", "label": "Law", "count": 177, "withPay": 141, "median": 100, "p75": 117.5, "top": 400, "ceilings": 26, "ceilingMedian": 80 } count is open roles, withPay is roles that state a range or a fixed hourly rate, and median is the median of those rates. ceilings counts roles that only say "up to $X an hour". Those have no midpoint, so they are kept out of the median and summarized separately as ceilingMedian. Because every array has the same shape, one render function handles all four tabs.
The endpoint sends access-control-allow-origin: *, so a page on any origin can fetch it from the browser. That one header is what makes a static Space possible: no proxy, no Python backend.
A static Space is just a repo with an index.html
A Hugging Face Space with sdk: static serves the files in its repo as a website. The README's front matter configures it:
--- title: "AI Training Pay Index" emoji: 📊 colorFrom: green colorTo: gray sdk: static pinned: true license: cc-by-4.0 short_description: "Live median pay for AI training jobs by field and platform" --- Below the front matter, the README is the Space's description page, so that's where the method notes and data links go.
Creating and pushing without git
I didn't clone anything. The Hub has an HTTP API for creating a repo and committing files, which suits a two-file project:
// 1. create the Space await fetch("https://huggingface.co/api/repos/create", { method: "POST", headers: { authorization: `Bearer ${token}`, "content-type": "application/json" }, body: JSON.stringify({ type: "space", name: "ai-training-pay-index", organization: "AI-Training-Pay", sdk: "static" }), }); // 2. commit files as NDJSON: a header line, then one line per file const lines = [ { key: "header", value: { summary: "Live AI training pay index" } }, ...["README.md", "index.html"].map((p) => ({ key: "file", value: { path: p, content: readFileSync(p).toString("base64"), encoding: "base64" }, })), ]; await fetch("https://huggingface.co/api/spaces/AI-Training-Pay/ai-training-pay-index/commit/main", { method: "POST", headers: { authorization: `Bearer ${token}`, "content-type": "application/x-ndjson" }, body: lines.map((l) => JSON.stringify(l)).join("\n"), }); One thing to know: this commit endpoint accepts text files but rejects binaries such as PDFs or images, which have to go through Hugging Face's large-file storage. For HTML, Markdown and CSV it's the quickest route I've found.
The page
The page fetches once on load, draws four summary numbers, and renders whichever tab is selected:
const money = (v) => "$" + (v % 1 ? v.toFixed(2) : v); let data, cur = "fields"; function draw() { const list = (data[cur] || []) .filter((x) => x.median != null && x.withPay >= 5) .sort((a, b) => b.median - a.median); const max = Math.max(...list.map((x) => x.median), 1); rows.innerHTML = list.map((x) => ` <div class="row"> <div class="lab">${x.label}</div> <div><div class="bar${x.median < 25 ? " low" : ""}" style="width:${(x.median / max * 100).toFixed(1)}%"></div></div> <div class="val">${money(x.median)}<div class="n">${x.withPay} priced</div></div> </div>`).join(""); } fetch("https://www.aitrainingpay.com/api/v1/pay-index") .then((r) => r.json()) .then((d) => { data = d; draw(); }); Two filters do most of the honest work. x.median != null drops platforms that only post ceilings, since a ceiling median next to a rate median would look comparable when it isn't. x.withPay >= 5 hides groups too small to say anything. Every bar shows how many priced roles it rests on, so a $100 median on 40 roles doesn't read the same as one on 141.
The bars are plain divs with a percentage width. For a single sorted series, that's all a chart library would have drawn anyway. Colors are CSS variables with a prefers-color-scheme: dark override, since the Space is embedded in the Hub's own light or dark theme.
What it shows today
On the day I published it, the API covered 4,269 open roles. 2,150 of them state a range or fixed rate, with a median of $60 an hour, and 811 give only an "up to" figure. By field, law and math and statistics list the highest medians, $100, and voice and audio work the lowest. Because the page reads the API on every load, those figures will move as the data refreshes.
Links
- The Space: huggingface.co/spaces/AI-Training-Pay/ai-training-pay-index
- API docs: aitrainingpay.com/developers
- How rates and ceilings are parsed: methodology
- The dataset on Hugging Face: AI-Training-Pay/ai-training-jobs-pay
The data is CC BY 4.0. If you build something on the API, I'd like to see it.
