Your dashboard says gross margin is 81 percent. Your bank account disagrees. Somewhere between the pricing page you wrote six months ago and the provider invoice that landed this morning, the math changed: a power user discovered your product, the upstream model repriced, or both happened in the same week. If you sell a product built on someone else's API — an AI feature, a messaging flow, a data enrichment, a checkout — your most important cost is a bill you do not control, and your books need to treat it that way before it treats you that way.
This is the guide to booking an API-wrapper business honestly: why the upstream invoice is cost of goods sold, when accounting rules say your "revenue" is only your markup, what actually happens to your margin on repricing day, and the four defenses that keep one provider announcement from eating your quarter.
The markup model in one paragraph
An API wrapper buys a metered input wholesale and sells a finished product retail. The provider charges you per token, per minute, per lookup, or per message; you charge your customer a subscription, a per-seat fee, usage credits, or a marked-up meter of your own. Your gross profit is the spread between those two meters, and your entire business is the bet that the spread stays positive at every customer's usage level.
Agencies and wrappers settle into a handful of pricing shapes: per-unit pass-through with a markup, a flat retainer with a usage cap, a hybrid of base fee plus overages, or outcome-based pricing per result delivered. Every one of them is a markup model in disguise, because every one of them funds a variable upstream bill out of a customer price you set in advance. The moment you forget the upstream meter exists — flat unlimited plans are the classic way — you have written your customer a blank check drawn on your provider account.
Why the upstream bill is COGS, not overhead
Where the provider invoice lands in your books decides whether your gross margin tells the truth. The test is simple: does the cost rise and fall with serving customers? If onboarding one more customer, or one customer using the product twice as much, grows this bill, it is a direct cost of delivering your product. That is cost of goods sold.
Industry COGS guides for software businesses say this explicitly: production hosting, payment processing, support, and third-party APIs the product depends on all sit above the gross-margin line. Inference and API fees that serve paying customers are COGS, full stop. Your wrapper cannot deliver one unit of value without the upstream call, so every token, minute, or lookup your customers consume is a unit of cost of revenue.
Overhead is what you pay when nobody uses anything. Rent, marketing, the engineers building next quarter's features, your own salary — those are operating expenses because they do not move with usage. The challenge question for any ambiguous line item: if every customer paused for a month, would this bill go to zero? The usage meter would. The fixed platform fee or reserved-capacity commit would not, which is why many shops split the provider invoice into variable COGS for metered usage and fixed COGS for commits — both above the line, tracked separately so unit economics stay clean.
Misclassification lies twice. Park the API bill in overhead and your gross margin reads like classic SaaS — 75 to 85 percent — while operating expenses quietly absorb the cost of every customer action. That flatters the number investors benchmark, and AI-native businesses do not live there: with inference in COGS, they cluster around 40 to 60 percent gross margin. Worse, the lie hides your pricing floor. A founder who believes the 80 percent number thinks there is room for a volume discount; a founder who sees the true 50 percent knows exactly how far the price can fall before each new customer loses money. The second founder survives the first enterprise deal.
Gross or net? The ASC 606 question hiding in your revenue line
Here is the accounting question most wrappers never ask: is the upstream cost even an expense, or should it never touch your income statement at all? Under ASC 606, the answer turns on one word — control. If you control the service before it transfers to your customer, you are the principal: you recognize the full customer payment as revenue (gross) and book the provider bill as COGS. If you merely arrange for someone else to provide it, you are the agent: you recognize only your fee or markup as revenue (net), and the pass-through moves through a balance-sheet account instead.
The indicators of control are practical, not philosophical. Do you set the customer price, or does the provider? Do you handle support and bear responsibility when the service fails? Do you carry inventory risk — committed capacity you pay for whether customers use it or not? A wrapper with its own pricing, its own support queue, and committed provider spend looks like a principal and reports gross. A thin pass-through that forwards requests at the provider's price with a fixed facilitation fee starts to look like an agent, and agents report net.
Why this matters before you are big enough to be audited. Gross reporting inflates top-line revenue and compresses margin percentages; net reporting shows smaller revenue at a much higher margin. Neither is "better" — but investors, lenders, and acquirers who discover you picked the wrong one will restate your numbers, and a restated growth story is how deals die. If your product is genuinely thin — requests in, responses out, priced near the provider's own meter — ask your accountant whether you are booking revenue you never controlled. It is far cheaper to fix the policy in year one than to explain a restatement in year three.
The day the provider raises prices
Provider repricing is not a hypothetical; it is the background rhythm of the API economy. Between October 2025 and October 2026, list prices per token rose on 10 of 14 tracked model tiers, with vendors tying increases to capability claims — each new flagship costs more per token than the last because it does more per token. Flagship pricing has even made a U-turn within one generation: after years of steep declines, the top general model now costs several times what its predecessor did. And increases do not always arrive as press releases; sometimes they arrive as calendar dates, like a major provider doubling one model's API rates on December 1, announced weeks ahead in a changelog your customers will never read.
Your customer prices, meanwhile, reprice themselves never. Whatever you promised — $29 a seat, $49 a plan, $0.10 a credit — is a contract, a pricing page, and an expectation. The spread you modeled at signup is the spread you fund until you change it, and three forces compress it from both sides at once.
The flat plan meets the power user. A single heavy user on an unlimited plan can generate ten times the upstream cost of an average one — practitioners report individual seats burning hundreds of dollars of inference against a $29 subscription. One data-SaaS founder's rule of thumb: budget 20,000 calls per user at $49 a month and the margin looks like 59 percent on paper, until one customer runs a backfill script over the weekend and burns six months of margin before Monday's standup. Averages lie; distributions bill.
The aggregator meets peak pricing. In October 2026, a fixed-rate AI subscription aggregator slashed its users' quotas on one popular model by up to 75 percent after peak API pricing and heavy token burn broke the economics of its flat plans — a subscriber burning $60 of pass-through credits under a $10 plan is a $50 monthly deficit the platform funds. Quota cuts are what repricing looks like when you cannot reprice: the provider's meter keeps running, so the product shrinks instead. Your customers experience it as the product getting worse for the same money, because that is what it is.
The stack reprices in layers. Your wrapper rarely depends on one meter. Speech, reasoning, storage, delivery, and the payment rail each bill separately, and each reprices on its own schedule. A 20 percent increase on the input you use most can erase more margin than a doubling of the input you barely touch. If you cannot say which upstream line item is your largest cost per customer, you will learn it from the invoice, which is the most expensive possible teacher.
Four defenses that keep the spread positive
You cannot stop providers from repricing. You can build a business where repricing is a routine event instead of an emergency. Four practices, in order of leverage:
1. Track margin per unit, per customer, per model. Aggregate COGS tells you last month was bad; per-unit tracking tells you why and whose fault it is. Log upstream cost against each customer and each provider meter — tokens by model, minutes by direction, lookups by endpoint — and review the worst-margin customers monthly. Reseller platforms learned this early: a single blended markup breaks down the moment the catalog mixes cached and uncached tokens, batch and realtime rates, or negotiated and list pricing. If your books cannot produce cost-per-customer, your pricing is a guess wearing a spreadsheet costume. Plain-text books make this cheap to start: tag each provider invoice line by customer cohort and the margin report is a query, which the docs walk through step by step.
2. Bill usage through, with a markup — not around it. Pass-through billing charges each customer for your API costs in proportion to their actual consumption, plus your platform fee or percentage on top. The customer's bill moves with the provider's meter, so a heavy user funds their own heaviness and a provider increase flows to customer invoices instead of your margin. Pure flat-rate pricing on variable inputs is the structure that fails; the fix is metered overage, credit packs that deplete, or hybrid base-plus-usage plans. Note the accounting follows the economics here: the more your price tracks the provider's meter, the more carefully you should revisit the principal-versus-agent question above with your accountant.
3. Cap the downside in the contract. Every flat or bundled price needs a fence: included usage allowances, fair-use clauses with numeric teeth, overage rates published before they trigger, and terms that let you adjust prices when underlying provider rates change. A 30-day price-change notice clause is standard in agency contracts for exactly this reason. The time to negotiate repricing rights is at signup, when the customer wants your product — not at renewal, when they have leverage and you have an invoice.
4. Route around the expensive meter. Multi-model routing, caching, batch endpoints, and smaller models for simple tasks cut the upstream cost per customer action without touching your price. Cached input tokens can cost a tenth of fresh ones; batch APIs discount heavily in exchange for latency you can often afford. Treat inference efficiency as a margin lever with an owner and a monthly target, the same way a restaurant treats food cost. When the provider announces the increase, the team with routing already built negotiates from strength; everyone else negotiates from the invoice.
How to book it: a month in the life of a wrapper
Suppose you run a small wrapper: $4,900 in November subscription revenue, a $2,100 upstream inference invoice for October usage, and payment processing at roughly 3 percent. The books for the month look like this:
2026-01-01 open Assets:Checking:Operating USD
2026-01-01 open Income:Subscriptions:Wrapper USD
2026-01-01 open Expenses:COGS:Upstream-API USD
2026-01-01 open Expenses:Fees:Payment-Processing USD
2026-01-01 open Liabilities:Provider-Payable USD
2026-11-01 * "November plan revenue" "Customer subscriptions"
Assets:Checking:Operating 4900.00 USD
Income:Subscriptions:Wrapper -4900.00 USD
2026-11-05 * "Upstream inference bill" "October provider invoice"
Expenses:COGS:Upstream-API 2100.00 USD
Liabilities:Provider-Payable -2100.00 USD
2026-11-05 * "Payment processing" "November processor fees"
Expenses:Fees:Payment-Processing 147.00 USD
Assets:Checking:Operating -147.00 USDTwo things to notice. First, the provider invoice hits Expenses:COGS:Upstream-API, above the gross-margin line — November gross profit is $4,900 minus $2,100, a 57 percent margin that tells the truth about an inference business. Second, the invoice posts to a payable, not straight out of checking: you will pay the provider on their terms (often mid-month) while customers paid you at signup, and the payable makes that timing gap visible instead of letting a bank-balance glance pretend the cash is all yours.
From here the monthly routine is three queries: gross margin with and without the provider line, cost per active customer against plan price, and the five customers with the worst margin. Watch the trend in a dashboard like Fava and a compressing spread shows up as a slope weeks before it shows up as a crisis. The founder who sees the slope raises the overage rate, tightens the cap, or routes to the cheaper model. The founder who booked it all as overhead sees 80 percent margins right up until the quarter the money runs out — and never understands what happened.





