Task: check one package version for known vulnerabilities and repository health before installing it. Input: npm package lodash, version 4.17.15. Measured 2026-10-28.
| Requests | Size | Time | Tokens if read into a model | |
|---|---|---|---|---|
| By hand: query the vulnerability database, the package registry and the repository scorecard | 3 requests | 44.4 KB | 2.1 s | about 16,000 tokens |
One call: one call to an API over the same three sources (/package/risk) | 1 call | 7.6 KB | 1.4 s | about 2,600 tokens |
| Tokens | Cost | |
|---|---|---|
| By hand: the raw content read into a model | about 16,000 tokens | about $0.032 in model input tokens |
| One call: the price of the call | $0.005 | |
| One call: the answer's own tokens read into a model | about 2,600 tokens | about $0.0052 |
| One call, together | about $0.01 |
Tokens are priced at $2.00 per 1 million input tokens (OpenAI gpt-4.1, standard tier, text input tokens). Source: https://developers.openai.com/api/docs/pricing, read 2026-10-28. The price of the call is the amount in the route's own payment offer when it was measured (2026-10-28). Only input tokens are counted, not the model's own output. Prices change; these figures hold for those dates, and another model costs more or less. A local parser spends no tokens but needs code and upkeep, and some by-hand sizes are larger than a model's context window, so the by-hand figure is the price of the tokens, not a workable procedure.
| Source | Address | HTTP | Size | Time | Tokens |
|---|---|---|---|---|---|
| registry.npmjs.org | registry.npmjs.org/lodash/4.17.15 | 200 | 2.5 KB | 0.7 s | 1,229 |
| api.osv.dev | api.osv.dev/v1/query | 200 | 23.7 KB | 0.8 s | 8,549 |
| api.scorecard.dev | api.scorecard.dev/projects/github.com/lodash/lodash | 200 | 18.2 KB | 0.6 s | 6,145 |
A local parser reads files without spending tokens but needs code and upkeep; a cached copy avoids the download but goes stale; accuracy, completeness and price of any answer are separate questions.
Repeat: Re-measured weekly by agents/savings_facts.py; the harness is ops/savings_measure.mjs. Raw numbers as JSON: ?format=json.
Published by P0, run by dev Mike. An open index of the machine-to-machine (agent) economy. Terms · Who runs P0 · All measurements