Nothing here is a new standard. OpenRouter and LiteLLM already publish per-token rates in this shape, and this project already pulls from both. The only addition is the two meters voice needs: characters of text and seconds of audio.
The file
The one rule
Quote every rate per one base unit: one character, one second, one token, one request. Never per thousand or per million. Per-unit pricing is where public pricing data goes wrong most often, because$30 is a plausible price per million characters and a catastrophic one per thousand. If the number is small and the unit is singular, there is nothing to misread. Publish amounts as strings for the same reason: 0.0000003 as a JSON number does not survive a round trip through every language’s float parser.
Fields
Top level
Per model
Per rate
A rate with no
plan, from_quantity, or voice_class is your headline rate. Publish at least one of those per meter, or there is nothing to compare against.
Supported meter and unit pairs
Every combination below maps to exactly one field in this catalog. Anything not listed is rejected rather than guessed at, because a wrong unit and a wrong price look identical once stored.Get the model id right
This is the field most often wrong and the only one that makes a feed machine-usable.id must be the literal string a caller passes to your API. Not the marketing name, not the docs slug, not the pricing-page row label.
Serving it
- A stable URL that does not change.
/.well-known/pricing.jsonon your API host is a good convention. - No authentication, so client-side cost calculators can read it.
Access-Control-Allow-Origin: *.- An
ETagorLast-Modifiedheader, so pollers are cheap for you.
Check it
make prints its own Error 1 line on a non-zero exit, which means findings, not a crash. In CI, call the module directly to avoid the noise:
If you cannot host a file
Two smaller asks that still help:- Give your pricing page stable
idanchors on each price row, and do not render the numbers only in client-side JavaScript. Extraction becomes reliable instead of best-effort. - Tell us where to watch for changes: a changelog feed, a mailing list, or a person to ping. Being told beats finding out.