Precomputing Live demo: Meter How to run it

Answers ready before you ask

A month of AI usage, metered to the token and billed in your browser

Loading SQLite

Loading SQLite and the compiled policy.

0
requests metered
0
retried reports refused
$0.00
September revenue so far
–
gross margin after model costs
–
reports a second at full speed on this device
–
the meter's file

Customers

September so far, read from the meter as reports arrive. The quota bar is the monthly_tokens view, which the gateways read once a minute.

Requests an hour, by gateway

From the meter's 1-hour windows. A late report lands in the hour its request happened, so a gap fills in when a link comes back.

Link to the meter down Queue stuck

Each gateway on its own scale. Times are UTC. Hover or use the arrow keys for an hour's count.

What happened

Newest first.

    Gateways

    Each gateway serves its customers and reports every request to the meter. A client may retry through either one.

    GatewayLink to the meterDeliveredWaitingRetries

    Delivered and waiting count reports to the meter. A client that gets no answer in time sends the same request again, with the same request id, and the retry may land on the other gateway. eu serves Juniper, Northgate and Harbor; us serves Quarry, Maple and Sundial.

    What the meter refused

    Every refused report is counted in usage_refused, by reason, customer, model and gateway.

    ReasonWhat it meansReports

    September invoices, so far

    Read from the meter's precomputes and the price list with one SQL view, in billionths of a dollar, and rounded to the cent only here.

    CustomerPlanRequestsTokens inTokens outList priceDiscountDueModel costMargin

    Example list prices per million tokens, in and out: small $0.30 and $1.20, medium $2.50 and $10, large $12 and $48. Pro pays list, Enterprise 25% less, Free nothing. Model cost is half of list. Customers and prices are invented.

    The policy

    A short policy says what to count and when a month closes. The compiler turns it into the SQL this page runs; the billing tables sit next to it in the same file.

    
        
      

    Ask the meter

    The meter is a plain SQLite file, with the billing tables beside it. Pick a question or write your own, then press Run (or Ctrl+Enter, ⌘+Enter on a Mac). It reads while the month is paused or finished.