Pricing Brain v1: how Riven prices 160+ models honestly
The problem with LLM pricing
Model pricing moves. Vendors adjust list rates, introduce new lanes, and change context tiers. An aggregator that copies a price sheet once and forgets about it drifts out of sync, and customers end up paying a number that no longer matches reality — or worse, a number that has been quietly marked up.
Riven exposes 160+ models behind one OpenAI-compatible API at https://api.rivenai.io/v1, with a public datasheet at /pricing and /developers/pricing. Keeping that datasheet correct across 160+ models, each with their own input and output rates, is an engineering problem. This is what Pricing Brain v1 solves.
What Pricing Brain does
Pricing Brain is an internal pricing intelligence service. It does three jobs:
- Ingest vendor list rates. It pulls the official per-million-token input and output rates for every model in the catalog, daily, from vendor sources.
- Track competitor prices. It records what other gateways and aggregators charge for the same models, so we can see when a route is discounted, marked up, or relabeled.
- Surface drift. When a vendor changes a rate, Pricing Brain flags it before it reaches a customer invoice.
The output is a single source of truth for what each model actually costs to serve, separated from what we charge for it.
How customer prices get set
This is the part that matters: the cost-to-serve and the customer price are two different numbers, set by two different mechanisms.
Cost-to-serve comes from the vendor list rate, tracked by Pricing Brain. Customer price is set by us, as founders, and published on the datasheet. Standard lanes are a flat $3.00 per 1M tokens. Frontier-class models are billed at vendor list rates with transparent per-token pricing — for example, Kimi K3 ships at Moonshot's list price of $3 in / $15 out per 1M tokens, transparent per-token pricing.
Because the two are decoupled, a vendor rate change updates our cost immediately but does not silently change what a customer pays. We see the drift, decide what to do, and update the datasheet on purpose. Customers see the same sheet we do.
Why automation matters here
Sixty-five models, each with input and output rates, refreshed against multiple vendor and competitor sources every day. Doing that by hand is not a staffing problem; it is an error problem. A person copying numbers will get one wrong eventually, and the wrong number on a pricing page is a trust problem, not a typo.
Pricing Brain treats the datasheet as a derived artifact. The rates are fetched, validated, and compared. The page renders from that validated data. There is no step where a human types a price into a web form and hopes.
What this looks like in practice
The customer-facing result is simple: one key, one bill, one datasheet you can audit. Pay-as-you-go starts at $0 with no minimum. Standard lanes are $3.00 per 1M tokens flat. Frontier models are at vendor list price. The numbers on /pricing are the numbers on your invoice.
A representative call costs what the datasheet says it costs, because the datasheet and the metering system read from the same source Pricing Brain maintains:
from openai import OpenAI
client = OpenAI(
base_url="https://api.rivenai.io/v1",
api_key="rk_live_...",
)
resp = client.chat.completions.create(
model="deepseek-v4-pro",
messages=[{"role": "user", "content": "What is the capital of Peru?"}],
)
# usage is reported per-token; match it against /pricing
print(resp.usage)What is next for Pricing Brain
v1 is deliberately narrow: ingest, compare, flag. The next layer is alerting — pushing drift to the team the moment it appears rather than on a daily review — and richer competitor analysis so the comparison on /compare/ai reflects live market rates, not a snapshot. The goal is unchanged: the price you see is the price the model actually costs, tracked daily, published openly.
Get started
Sign up at /sign-up to get an API key with $0 minimum, or read the docs for the full pricing and metering reference.