The hedging layer for enterprise AI.
Your AI bill is a commodity position.
Point it at your gateway logs. It returns your AI spend as a dollar position, split into price and usage, then finds the listed contracts that settle on those prices and sizes a hedge against their real order books.
Read the result as a macro position on the level of token prices, not a bet on your own usage.
One run, condensed, on a synthetic ledger
$ hedge ingest --format weave --input month.ndjson
720 rows accepted, 0 prompts and 0 identities stored
$ hedge exposure
gpt-5.5 $15,445 / 30 days
input 49.6 MTok/day at $5.00, output 9.0 MTok/day at $30.00
$ hedge hedge-plan --horizon-days 90
7 limit orders against live order books, $606 premium
fillable now: 8% of input cover, 24% of output cover
- Runs
- Self-hosted, inside your own infrastructure
- Reads
- Gateway metadata only, behind an allowlist
- Needs
- Node 20 or newer, no runtime dependencies
- Sits
- Outside your request path; it serves no traffic
- License
- MIT
Compute is a commodity. Your budget treats it like a subscription.
Companies shipping AI have taken on a commodity position nobody priced. Four things are true at the same time, and they push the same direction.
- GPU-hours have a spot price
- Rented accelerator capacity reprices week to week and public indices already quote it. If you buy on demand, you hold that price risk with no cap and no forward.
- Token prices are a floating rate
- Providers cut list prices, raise them, deprecate models, and move your mix underneath you. A rate card is the price you pay this quarter, not a fixed cost.
- Usage grows with the product
- Every agent you ship raises consumption. Volume growth and price moves compound, and the usual remedy is to make the product worse.
- Nobody holds the position in dollars
- Finance sees one invoice a month. Engineering sees tokens per request. Neither is an exposure, and you cannot bound what nobody has written down as a dollar position.
The first deliverable is the position, not a trade. Most teams cannot answer how many dollars of next quarter’s AI spend are price and how many are volume. That number is computable from telemetry they are already emitting.
From gateway telemetry to a bounded cost line
Hedgerouter is not a model router. Keep whatever gateway chooses and serves your models; Hedgerouter reads its output and prices the exposure underneath it.
-
Ingest
NDJSON exports, JSON access logs, OTLP spans, Claude Code transcripts. Nothing new to instrument, and replaying the same export twice is idempotent.
-
Normalize
Model, provider, token counts, realized cost, latency, status, failover. The boundary is an allowlist, so prompts, paths, tool arguments and identities are never read in.
-
Position
A daily ledger in dollars and tokens by model, provider and route, with the price component separated from the volume component.
-
Price
Public compute indices and listed contracts, quoted at prices you could have transacted at, with fees included. No midpoints nobody could have traded.
-
Size
A hedge is sized against a stated budget with a per-event cap, and never larger than the exposure it covers. Sizing runs before anything is placed, not after.
-
Report basis
What fraction of your actual cost line an instrument tracks. Until a real ledger has been compared against a contract, every sizing says basis is not measured, and it never assumes zero.
Where this risk is becoming tradeable
A hedge is only as good as the instrument under it, so the question is never “is there a contract” but “what does it settle on”.
| Instrument | Settles on | Fit to your cost line | Available |
|---|---|---|---|
| Compute-price index | A published spot index for rented accelerator capacity | Direct, if you buy capacity on demand | Listed |
| Compute spot and forward markets | The traded price of capacity itself | Direct, and the first thing here to offer a forward curve | Forming |
| Provider list-price contract | A provider’s own published price page | Direct, if you pay list; the settlement variable is your cost | Listed, annual tenor |
| Compute perpetual | A continuously-funded compute price rather than a dated threshold | Potentially the closest fit yet: a cost line is continuous, and a dated binary is not | Anticipated, not yet listed |
| Blended $/token index | A volume-weighted blend of published prices across labs | Weak. Most of its variance is the market’s model mix changing, not price | Listed |
Compute-price indices are the arm we instrument first, because for a team renting capacity they are the exposure itself rather than a proxy for it. A hedge on the wrong variable costs premium and leaves the risk in place, so every sizing states basis, as “not measured” until a real ledger has been compared, rather than assuming it away.
Token prices as a macro position
Take volume out and an AI bill is a position on the level of list prices: one number per model per direction, set by the provider and repriced in steps. Kalshi lists that level as a ladder of yes/no contracts, so what the market charges for protection can be read straight off its books. Below are the live quotes on 19 October 2026 for every open per-token list-price ladder. Each contract pays $1 if the provider’s published price is at or below the strike in 2026.
| Model, side | Rungs: strike, YES bid / ask in cents | Open interest |
|---|---|---|
| GPT 5.5, input per MTok | $1 2/8 · $2 8/13 · $3 15/19 · $4 25/28 | 6,128 |
| GPT 5.5, output per MTok | $10 –/3 · $15 1/3 · $20 7/8 · $25 7/11 | 18,848 |
| Claude Opus 4.8, input per MTok | $1 2/5 · $2 3/8 · $3 14/19 · $4 28/32 | 6,976 |
| Claude Opus 4.8, output per MTok | $5 –/3 · $10 5/8 · $15 2/9 · $20 3/7 | 8,413 |
| Gemini 3.5 Flash, input per MTok | $0.50 –/4 · $0.75 2/8 · $1.00 12/19 · $1.25 22/25 | 2,469 |
| Gemini 3.5 Flash, output per MTok | $5 1/5 · $6 1/5 · $7 –/5 · $8 1/5 | 7,162 |
- Locked rate: a price cut strands you
- If you committed to a rate and the provider cuts list, you keep paying the old price. The cover is YES on every rung below your rate, sized so the payout at each strike equals the loss there. On a $30 output rate the $25 rung asks 11¢ for $1 of cover.
- Floating rate: a rise has no listed cover
- If you pay list and fear a rise, the planner buys NO on rungs above your price. Every listed rung for the GPT 5.5 example sits below its rates, so
hedge-plan --posture floatingreturns zero legs. The market protects against cuts today and not against rises. - The whole market is small
- About 50,000 contracts of open interest across all three models, which is at most $50,000 of payout. At the planner’s 25% cap per rung that is about $12,500 of cover, for every company at once. Depth, not price, is what limits a macro hedge here.
- This is a level, not a forecast
- Hedgerouter does not predict where prices go. It sizes cover against the price you are exposed to and states what it costs. Our own demand-based forecast failed its test, and the record says so.
Quotes are a snapshot from the public order books and move. A dash means no bid.
Re-run them with hedge discover.
A worked example, and what the order book says
A synthetic company, not a customer: $15,445 a month on one model at a committed rate of $5 per million input tokens and $30 per million output. The plan below was sized against the live order books of the per-token list-price contracts on 18 October 2026.
Synthetic ledger, live order books. Nothing was sent to a venue.
$ hedge exposure
gpt-5.5 input 49.6 MTok/day at $5.00
output 9.0 MTok/day at $30.00
$ hedge hedge-plan --posture locked --horizon-days 90
7 limit orders, 5,445 contracts, premium $606, fees at most $37
every order limited by the 25% open-interest cap
one rung skipped: no bid
| Side | Rungs bought | Full cover | Fillable now | Premium |
|---|---|---|---|---|
| Input, $5 committed | $4, $3, $2, $1 | 17,836 contracts | 1,506 (8%) | $229 |
| Output, $30 committed | $25, $20, $15 | 16,108 contracts | 3,939 (24%) | $377 |
The finding is the second column. The listed per-token contracts across all three models carry about 50,000 contracts of open interest in total, so a team spending $15,000 a month can already fill only a fraction of the cover it would want. The instruments are real and priced; the depth is not there yet. That is the reason to measure exposure before sizing anything, and it is the number to watch as these markets grow. Reproduce it.
What happens to an order
A plan becomes real limit orders, each built as the exact request the venue would receive, then passes caps and interlocks before anything can be sent. Everything below ran on 19 October 2026, on the synthetic ledger against live books. Unarmed, the code never opens a socket to a mutating endpoint, so no order reached a venue.
-
Quote
One order per rung, joined one tick inside the best bid and never at or through the ask. A one-sided book is skipped: today the $10 GPT 5.5 output rung has no bid.
-
Cap
The limits live inside the executor, not the CLI. Defaults: 10 contracts and $2 per order, 5 orders and $10 per run, a $25 minimum balance, nothing resting within 15 minutes of close.
-
Interlock
Five must agree: a passing out-of-sample gate, an arming phrase, a trade-scoped key, no halt file, and an explicit
--live. A missing one is named, not guessed. -
Journal
Every attempt, dry or live, is appended to a journal before it is sent. The client order id comes from market, side and observation time, so replaying a cycle after a timeout cannot double a position.
-
Send
A signed request to the venue’s current create endpoint, post-only, cancelled if the venue pauses. Buying NO is an ask on the YES price, a detail that is easy to invert.
Default caps, condensed from the JSON output. Nothing was sent.
$ hedge hedge-open --posture locked --horizon-days 90
mode dry-run, 0 orders built, 7 refused
KXGPT55Y-27-NA-4 cap-contracts: 626 exceeds maxContractsPerOrder 10
KXGBT55OY-27-NA-20 cap-contracts: 1528 exceeds maxContractsPerOrder 10
...
blockers: gate-closed, not-confirmed, missing-credentials
Caps raised for the dry run. The first of 7 journalled requests, verbatim.
$ hedge hedge-open --posture locked --horizon-days 90 \
--max-contracts 2000 --max-orders 10 --max-notional 200 --max-notional-run 600
{
"ticker": "KXGPT55Y-27-NA-4",
"side": "bid",
"count": "626",
"price": 0.26,
"time_in_force": "good_till_canceled",
"self_trade_prevention_type": "taker_at_cross",
"post_only": true,
"cancel_order_on_pause": true,
"client_order_id": "hedgerouter-d514db111edcb24da27dc8ec"
}
The finding is that the defaults refuse the whole hedge. They are sized so that the worst credible outcome of a first live run costs under ten dollars: that run tests the wire, not the thesis. With caps raised the same plan builds 7 post-only bids, 5,414 contracts and $463 of premium, and still sends nothing. Moving past ten contracts is a decision for after a real ledger gives a basis number. The executor has 18 tests; an armed send is exercised only against a recording transport, never the live venue.
The research record, including what failed
Most of the work so far was deciding what not to trade. These are the results, the negative ones included, and the order path stays shut because of them.
| Work | Result |
|---|---|
| Settlement sources audited against public endpoints | The index-settled token ladders rebuild exactly from a public endpoint, 8 of 8 with no exceptions. The model-author share markets settle on requests, not tokens, whatever their rules text says. |
| List-price contracts compared with index contracts | An index is a proxy and carries basis risk. A list-price contract settles on the provider’s own price page, so for a company paying list it removes most of the chain. |
| Walk-forward backtest against the Ornn H100 index (102 settled markets, 10 independent events) | Hypothesis not supported. Where the demand model trains, it is slightly worse than carrying the last index price forward: lift −0.0012 at one day, −0.0022 at three. |
| Research gate for live orders | Needs 30 independent events, a 5% Brier lift over both baselines and positive paper P&L. At one event a week it cannot be evaluated before about March 2027, and it is shut. |
| Paper orders, settlement and a resumable pilot | Immutable pre-close paper orders, settled to P&L, with a weekly falsification scorecard. |
| Open-weights availability ledger | A daily snapshot of Hugging Face gated and licence state. On day one, 3 of 12 watched models were already gated, so the history can only be owned by starting to record it. |
| Venue map | hedge venues lists what blocks each one. Nothing is tradable now. CME GPU rental-index futures have contract terms and a sizing command, and need a futures broker. |
| Depth of the list-price markets | About 50,000 contracts across all open ladders. A company spending $15,000 a month can fill 8% to 24% of full cover. |
152 tests pass and the CLI has no runtime dependencies. Read the write-ups.
What runs today, and what doesn’t
Being specific here is cheaper than being caught out later. The measurement half is real and you can run it this afternoon. The order path is built and held shut: what authorises a live order is a research gate that has not opened, and on current data the demand signal is slightly worse than simply carrying the last index price forward.
| Capability | State |
|---|---|
| Ingest from Weave Router exports, JSON access logs, OTLP spans, Claude Code transcripts | Runs today |
| Metadata-only normalization behind an allowlist boundary | Runs today |
| Daily exposure ledger in dollars and tokens, by model, provider and route | Runs today |
| Basis against a real company’s cost line | Not measured yet; needs a real ledger |
| Hedge sizing against a stated budget and per-event cap | Runs today, paper |
| Discovery of listed per-token price contracts, matched to the models you use, with netting against held positions | Runs today, dry run |
| Order construction: post-only limit requests, deterministic order ids, per-order and per-run caps, append-only journal, in dry run | Runs today, dry run |
| Walk-forward backtest, paper settlement and falsification scorecard | Runs today; the demand signal does not beat persistence |
| Open-weights availability and author-share ledgers | Runs today, one snapshot per run |
| CME compute futures: contract terms and sizing | Sizing only; needs a futures broker |
| Order path to the venue: signed requests, idempotent order ids, hard notional caps, kill switch | Built, never armed |
| Any live order, ever | Zero placed; gate is shut |
| Forward pricing as compute venues list capacity | In progress |
| Compute perpetuals, if and when a venue lists them | Not instrumented |
| Model routing, or anything that sits in your request path | Not built |
| Storage of prompts, completions or any content | Not built, by design |
The order path arms only when all five interlocks agree: a passing out-of-sample gate, an
arming phrase in the environment, a trade-scoped venue key, no halt file, and an explicit
flag. Anything missing is a dry run that prints the order it would have sent and names the
interlock that stopped it. hedge live-status prints that list, and today
it prints would_arm: false.
Your telemetry never has to leave your infrastructure
Normalization is an allowlist, not a log archive. The fields below are not filtered after the fact; they are never read into the ledger in the first place.
| Field | What Hedgerouter does with it |
|---|---|
| Prompts and completions | Never read |
| Code, paths and filenames | Never read |
| Tool arguments and tool output | Never read |
| Credentials and API keys | Never read |
| Email addresses and gateway user IDs | Never read |
| Session IDs | Pseudonymized with a rotating local salt |
| Telemetry upload | Off by default |
| Everything the ledger does hold | Removable with delete-data --confirm DELETE |
Measure the exposure first. Then decide what can be capped.
One command against an export you already have. Nothing leaves your machine.