Will It Local? / API

Free · no key · no account

The free API

Everything the lab computes, over plain HTTP. Same engine, same data tables, same verdicts — if the API and the calculator ever disagreed, one of them would be lying, so they run on the same file. CORS is open, so you can call it from a browser on any site.

The endpoints

  • GET /api/verdict — one full verdict as JSON
  • GET /api/benchmarks — the community benchmark board as JSON
  • GET /api/benchmarks.csv — the same board as a CSV download
  • GET /s/<code>/badge.svg — a live verdict badge for any shared scenario

Get a verdict

Pick a rig, a cloud baseline, a workload, and a state — the same four choices the lab asks for. Anything you leave out uses the lab's default (the coding workload, the U.S. average electricity rate, a 3-year amortization).

curl "https://willitlocal.com/api/verdict?hw=used-3090&model=claude-sonnet&usage=coding&state=ca"

The response carries the verdict, the break-even month, both monthly cost lines, the net dollars kept or lost over the horizon, and the price-swing check — every number the lab would show:

{
  "verdict": "OWN",
  "breakEvenMonths": 9.5,
  "confidence": "high",
  "reason": "Your rig pays for itself in 10 months — ...",
  "local":  { "amortMo": 33.33, "elecMo": 15.06, "tcoMo": 48.39, ... },
  "cloud":  { "costMo": 135 },
  "horizon": { "months": 36, "net": 3218.71 },
  "robustness": { "swingPct": 20, "holds": true, ... },
  "scenario": { "hw": "used-3090", "model": "claude-sonnet", "usage": "coding", "state": "CA" },
  "labUrl": "https://willitlocal.com/#s=...",
  ...
}

Parameters

ParamWhat it isValues
hwThe rig preset (required in preset mode)used-3090, dual-3090, rtx-4090, rtx-5090, mac, mini-pc
modelThe cloud baseline you'd otherwise pay for (required)claude-opus, gpt-55, claude-sonnet, gpt-54, claude-haiku, deepseek-flash
usageThe workload presetcasual, coding (default), rag, always-on
stateTwo-letter U.S. state code for the electricity rateca, tx, ny, … or omit for the national average
rateAn explicit $/kWh instead of a state0.012; wins over state
amortYearsAmortization horizon in years18, default 3
sA full encoded scenario — custom numbers includedThe string after #s= on any lab or share link

The ids above may gain entries when the data tables refresh (quarterly). You never have to guess: send an unknown value and the 400 response lists every valid one. Custom rigs, custom prices, and custom workloads all travel through s= — build the scenario in the lab, copy the share link, and take the part after #s=.

The benchmark board

Every approved community measurement, aggregated by rig, model, and quant. Same rows the board on the homepage shows.

curl "https://willitlocal.com/api/benchmarks"
curl -O "https://willitlocal.com/api/benchmarks.csv"

The CSV has a header row (hardware_id, model_name, quant, tokens_per_sec_avg, power_watts_avg, samples) and opens clean in any spreadsheet.

The live badge

Any shared scenario gets an embeddable SVG badge at /s/<code>/badge.svg. It re-prices the scenario against our current data tables on every render — so if cloud prices drop and the verdict flips, your README says so without you touching it. Run a test, hit Share this verdict, and the share page hands you copy-paste Markdown and HTML.

[![Will it local?](https://willitlocal.com/s/<code>/badge.svg)](https://willitlocal.com/s/<code>)

The raw data tables

Every table the engine runs on is served as plain JSON, unminified, with a lastVerified stamp: /data/hardware.json, /data/models.json, /data/electricity.json, and /data/usage.json. The engine itself is one readable file at /js/engine.mjs — you can run our whole model offline and check every number this API returns.

Fair use

Run a verdict in the lab first →

Numbers are estimates, not quotes — the same caveat as everywhere else on this site. Hardware and cloud tables carry a dataVerified stamp in every verdict response so you know exactly how fresh they are.