Live: https://bestvaluemodel.terrydjony.workers.dev/
A single static page that plots every model on the Artificial Analysis Intelligence Index against its blended API price and highlights the value frontier (models where nothing cheaper is also smarter). A GitHub Actions cron refreshes the data every 6 hours and redeploys to Cloudflare only when something actually changed.
Inspired by vps.sonnylab.com/model-value-2026-07, but data-driven instead of hand-maintained.
| Path | What it is |
|---|---|
index.html |
The page. Vanilla HTML/SVG/JS, no build step. Loads data/models.json at runtime. |
data/models.json |
Trimmed snapshot of the AA /data/llms/models response. Ships with a hand-entered seed so the page renders before the first fetch. |
data/changelog.json |
Per-run diff (added / removed / re-scored / re-priced), newest first, capped at 90 entries. Rendered in the "What changed" card. |
scripts/fetch-aa.mjs |
Fetches the API, normalises, diffs against the previous snapshot, writes both files. Writes nothing if the data is identical. |
.github/workflows/update-and-deploy.yml |
Daily cron + manual trigger + push to main. Fetch, commit if changed, deploy to Cloudflare Workers (static assets). |
wrangler.jsonc, scripts/build.sh, _headers |
Cloudflare Workers static-assets config. build.sh copies the page, data and headers into dist/, which wrangler uploads. |
- Get a free API key: sign up at https://artificialanalysis.ai/, open the Insights Platform, create an API key (free tier: 100 requests per 24h, attribution required).
- Create the GitHub repo and push:
git init -b main && git add -A && git commit -m "Initial site" gh repo create bestvaluemodel --public --source=. --push
- Add the key as a repository secret named
AA_API_KEY:gh secret set AA_API_KEY - Create a Cloudflare API token with the Edit Cloudflare Workers template at https://dash.cloudflare.com/profile/api-tokens and store it as a secret:
gh secret set CLOUDFLARE_API_TOKEN - Run the workflow once by hand so the seed data is replaced and the first deploy happens:
gh workflow run update-and-deploy.yml
The cron runs at 06:17 UTC daily. Scheduled runs on a repo with no activity for 60 days get paused by GitHub; a manual run re-enables them.
export AA_API_KEY=... # or copy .env.example to .env and source it
npm run fetch # writes data/models.json + data/changelog.json
npm run serve # http://localhost:8080
npm run deploy # build dist/ and push it to Cloudflare (needs `npx wrangler login` once)The page fetches JSON, so open it over HTTP rather than as a file:// URL.
- The frontier is computed client-side on the Intelligence Index, for whichever cost basis is selected, over the full model set, so filtering by maker shows where that maker's models sit against everyone.
- Blended price is AA's 3:1 input:output blend. Cached-input, batch and fast-mode pricing are ignored.
- Everything comes from the free Data API endpoint
/api/v2/language/models/free(paginated, 200 per page; docs at https://artificialanalysis.ai/data-api/docs). The legacy/api/v2/data/*endpoints were retired on 2026-11-04. - Blended price is AA's 3:1 input:output blend. The free tier does not expose it directly, so the script computes
(3 × input + output) / 4from the per-token prices; this matched AA's published figure to 3 dp across the whole legacy snapshot. - Cost per task is AA's weighted average cost to complete one Intelligence Index task. It accounts for how many tokens a model actually uses, but AA has measured it for fewer models, so the "Cost per task" view shows a smaller field.
- Data attribution: Artificial Analysis, https://artificialanalysis.ai/. Required by their API terms.