{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"What this solves"}]},{"type":"text","value":": Enter the prices you pay your upstream vendors into Tare so cost attribution can be computed."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"cost price"}]},{"type":"text","value":" is the price you pay your upstream vendor. It plays no part in what you are charged: for your own channels you already pay the vendor directly for the tokens; what it decides is "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"whether cost attribution can be computed"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Cost prices are used only for cost attribution and have nothing to do with whether a call is allowed. Not entering cost prices usually doesn't affect calls, but it leaves the cost column empty."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"When you need to enter cost prices"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The priority order for accounting:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"The real cost reported in the upstream response"}]},{"type":"text","value":" (the true value of each call)."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Only when the upstream doesn't report cost does it fall back to the cost price you enter here."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In other words:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"The upstream reports real cost in every response: "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"the cost price table is not used at all"}]},{"type":"text","value":", and you get accurate attribution numbers without entering a single row."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"The upstream reports only token counts, not cost: you need to enter cost prices."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Self-hosted inference services, some proxies, and local models: usually need cost prices entered."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"img","properties":{"src":"diagram:en-cost-prices-need-cost","alt":"When you need to enter cost prices: it only comes into play when the upstream doesn't report cost","data-block":"true"},"children":[]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"What happens if you don't enter cost prices"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Calls and billing are unaffected; what is affected is the cost column in cost analysis."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In Analytics, Cost attribution, or a generation query, you will see some calls with a token count but an empty cost. The system can only tell you:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"Known cost this month: ¥1,234\nCost coverage: 62%\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{"data-alert":"warning"},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Coverage is given together with the amount. \"Cost this month ¥1,234 (62% covered)\" means 38% of calls still have no cost data.\n"},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"These calls do have a cost; the platform just has no way to know it"}]},{"type":"text","value":". Calculating margin from numbers that aren't fully covered will be optimistic."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"img","properties":{"src":"diagram:en-cost-prices-coverage","alt":"What happens if you don't enter cost prices: coverage points out that 38%","data-block":"true"},"children":[]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The channel page lists models missing a cost price, and the same list is also available at "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET /v1/providers/{id}/missing-costs"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Where to enter them"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Console path:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"Console → Tare → Channels → expand a channel → Cost prices\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The Cost prices table is inside the channel's expanded area, not a separate page. That's because a cost price always belongs to a specific upstream channel."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"How to fill in the fields"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"table","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"thead","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Field"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Meaning"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Note"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tbody","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Upstream model"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"The model name the upstream recognizes"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Not the model name used when calling Tare"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Input"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Price per million input tokens"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"prompt/input price"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Output"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Price per million output tokens"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"completion/output price"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Cache read"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Price per million for cache reads"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Don't fill in randomly if unsure"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Cache write"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Price per million for cache writes"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Don't fill in randomly if unsure"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"All four values are per million tokens"}]},{"type":"text","value":", and the cache read/write prices are optional."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For example, if the vendor writes:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"Input: $0.20 / 1M tokens\nOutput: $0.80 / 1M tokens\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You enter:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"Input = 0.2\nOutput = 0.8\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"The easiest thing to get wrong: the model name"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Upstream model"}]},{"type":"text","value":" must be the model name "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"on the upstream side"}]},{"type":"text","value":", not the name used when calling Tare."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Example:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-text"]},"children":[{"type":"text","value":"Caller requests model = GLM 5.1\nRouting points to openrouter-prod / z-ai/glm-5.1\nCost prices must also record z-ai/glm-5.1\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Don't enter "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GLM 5.1"}]},{"type":"text","value":" into this channel's cost price table, unless that is really the name the upstream recognizes."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{"data-alert":"warning"},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A wrong model name usually doesn't raise an error. It simply never matches, and that model's cost is permanently empty."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Prefer Browse upstream models on the Channels page"}]},{"type":"text","value":" ("},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET /v1/providers/{id}/upstream-models"}]},{"type":"text","value":") to avoid manual entry. The model list you fetch is a suggested list, not an allowlist; when private models, canary models, or aliases can't be fetched, you can still enter them manually."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Where the upstream publishes prices, the browse list shows them per 1M tokens, in the currency the upstream quotes (OpenRouter quotes USD). Nothing is converted. If you negotiated other rates or are billed in another currency, edit the rows after adding them."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{"data-alert":"note"},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This endpoint fails gracefully (upstream doesn't support listing a catalog, address can't be derived, key only has chat permission) and always returns "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"200"}]},{"type":"text","value":" with an explanatory sentence, not an error code."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Tiers, per-request prices and multipliers"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Open "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Edit"}]},{"type":"text","value":" on a cost price for the parts that a flat per-million price cannot express:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"table","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"thead","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Setting"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Meaning"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tbody","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Conditional rules"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Another set of prices for calls that match. A rule can look at the input length (above a threshold, at most an upper bound), the time of day (days of the week and a "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"[from, to)"}]},{"type":"text","value":" range in a timezone; the end is exclusive and must be later than the start, "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"00:00"}]},{"type":"text","value":" means end of day, and a cross-midnight window is split into two) and a validity period. When several rules match, the highest priority wins. A matching rule prices the "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"whole call"}]},{"type":"text","value":", not only the part above the threshold."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Image / audio prices"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Per-million prices for image and audio tokens in the input or output. Leave them empty and those tokens are priced as ordinary input or output."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Per request"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Bill each call at a fixed USD amount instead of by tokens. Image generation multiplies it by the number of images. A rule can switch to per request too, for example short prompts at a flat price."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Multipliers"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Multiply the cost of a call when a request header or body parameter matches, for example "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"anthropic-beta"}]},{"type":"text","value":" contains "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"fast-mode"}]},{"type":"text","value":" ×6, or "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"service_tier"}]},{"type":"text","value":" equals "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"priority"}]},{"type":"text","value":" ×2. A multiplier can also apply to a time window or a validity period. Several matching multipliers multiply together. Tool fees are not multiplied."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The usage record shows which rule and multipliers priced a call, for example "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"long_context*fast-mode"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"The difference between empty and 0"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In the form, leaving a field empty is saved as "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"0"}]},{"type":"text","value":", not recorded as \"unknown\"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"There's a trap here:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"The vendor explicitly says something is free: entering 0 is correct."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"You don't know the price: "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"don't record the whole row"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A missing cost price is something the system can remind you about through \"coverage\"; a wrong 0 is hard to spot and will make the cost too low."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Saving, editing, deleting"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{},"children":[{"type":"text","value":"Adding"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Enter the model name and the four prices at the bottom of the Cost prices table, then click "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Save"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{},"children":[{"type":"text","value":"Editing"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Click "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Edit"}]},{"type":"text","value":" on a row, make the changes, and save."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Saving an existing model name overwrites it. That is, if you only want to change the Input price, keep the other three at their original values rather than clearing them."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h4","properties":{},"children":[{"type":"text","value":"Deleting"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Click "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Remove"}]},{"type":"text","value":" to delete a model's cost price. After deletion, later calls that don't match this model's price have an unknown cost again."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Bulk importing a vendor price list"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The Channels page supports importing cost prices by reading a price list: a screenshot of a per-brand discount table from a reseller, or price table text you paste, so you don't have to enter models one by one manually."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Good for these cases:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"The reseller gave you a per-brand discount table."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"You have a screenshot of prices."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"You have a chunk of price table text."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"There are many models and you don't want to fill them in row by row manually."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"How it works:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Choose the vendor group to import into, or all channels."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Choose a multimodal model on one of your own channels to parse the image or text."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Upload the screenshot or paste the price table."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Tare sends the image/text to the model you chose and has it extract structured prices."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Tare compares them against existing cost prices and reference prices, and shows the differences."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Nothing is written until you confirm."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{"data-alert":"note"},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This step reuses the "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Chat"}]},{"type":"text","value":" diagnostic endpoint from the channel page: it consumes real upstream tokens on the channel you chose to parse with, but this parse call itself "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"is not billed by Tare and does not appear in Call Traces"}]},{"type":"text","value":", the same rule as manually testing a channel."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{"data-alert":"warning"},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Bulk import is not \"trust everything automatically\". You must look at the difference preview before importing, especially the currency, unit, discount multiplier, and cache prices."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Cost prices have no effective period"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The platform "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"keeps only the current price"}]},{"type":"text","value":" and the time it was entered; it does not keep historical price ranges."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{"data-alert":"warning"},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"After a price change, recomputing historical calls uses the new price, not the price at the time. This is a clear source of deviation in "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"monthly reconciliation"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"This means:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"After you change a price today, recomputing historical calls uses the new price."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Historical calls that previously had no price will also use the current price when they are backfilled."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"If the vendor changes prices mid-way, monthly reconciliation may deviate."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Before effective periods are supported, it's best to do this:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Record the time of the price change on the day it happens."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"When reconciling, split before and after the change date and check the two segments separately."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"For upstreams where you can use the real cost reported in the upstream response, prefer the real cost, because that path is unaffected and every call records the true value for that call."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"There is no confirmed date for effective period support."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"What "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"recorded_at"}]},{"type":"text","value":" is"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The cost price read endpoint returns "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"recorded_at"}]},{"type":"text","value":" (ISO 8601, e.g. "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"2026-08-21T17:30:00"}]},{"type":"text","value":"), which is "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"refreshed on every price change"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"It means \""},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"when the current"}]},{"type":"text","value":" price was entered\", not the creation time of the record, not when the price takes effect, and certainly not when the model first appeared."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Its use is reconciliation. Cost prices have no effective period, so backfilling historical cost always uses the current price; with this field, you can at least tell which version of the price was used when reconciling a given month. A price entered after the change date is used to backfill calls before the change date, and that segment of numbers is off; without this field, that is completely invisible on a report."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{"data-alert":"warning"},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"For historical data this field is "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"null"}]}]},{"type":"text","value":" (this column was added later). "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"null"}]},{"type":"text","value":" means the entry time is unknown, so "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"don't default it to today's date on your side"}]},{"type":"text","value":", which would make an unverified deviation look verified."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"What automatic backfill can do"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The platform has two kinds of automatic behavior:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Backfill calls that already happened after you enter a cost price."}]},{"type":"text","value":" Calls that previously had no price get a cost added, so you don't lose this history just because you entered the cost price late."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Read the upstream price list once an hour."}]},{"type":"text","value":" Backfill models you have used but not priced."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{"data-alert":"warning"},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Backfilling historical calls uses the "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"current"}]},{"type":"text","value":" price, not the price at the time the call happened (see \"Cost prices have no effective period\" above)."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"What it reads automatically is the vendor's published list price:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"In the currency the vendor publishes, "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"with no exchange rate conversion"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"It may not include your contract discount."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"It "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"never overwrites prices you entered manually"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"So if you have a contract price, a discounted price, or a special channel price, manual entry should take precedence."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"How the endpoints relate to the console"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"These endpoints all use a console login session, not an inference API key:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"table","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"thead","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Action"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Endpoint"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tbody","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Read cost prices"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET /v1/providers/{id}/costs"}]}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Save cost prices"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"PUT /v1/providers/{id}/costs"}]}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Delete a cost price"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"POST /v1/providers/{id}/costs/delete"}]}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Check models missing a cost price"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET /v1/providers/{id}/missing-costs"}]}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Fetch the upstream model list"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET /v1/providers/{id}/upstream-models"}]}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"SOP: filling in cost prices for one channel"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Open "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Channels"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Expand the channel to configure."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Click "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Browse upstream models"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Choose the models to use from the list; if you can't fetch it, enter the upstream model name manually."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Fill in Input, Output, Cache read, and Cache write against the vendor's price list."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Don't enter models you are unsure about."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"After saving, check whether the missing cost warning is gone."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Send one real request."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"In Analytics or a generation query, confirm the cost is no longer empty."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Minimal acceptance checklist"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{"className":["contains-task-list"]},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{"className":["task-list-item"]},"children":[{"type":"element","tagName":"input","properties":{"type":"checkbox","checked":false,"disabled":true},"children":[]},{"type":"text","value":" "},{"type":"text","value":"You have confirmed which upstreams report real cost in their response and which need cost prices entered manually."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{"className":["task-list-item"]},"children":[{"type":"element","tagName":"input","properties":{"type":"checkbox","checked":false,"disabled":true},"children":[]},{"type":"text","value":" "},{"type":"text","value":"Every BYOK channel that will carry traffic has its corresponding upstream model names entered."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{"className":["task-list-item"]},"children":[{"type":"element","tagName":"input","properties":{"type":"checkbox","checked":false,"disabled":true},"children":[]},{"type":"text","value":" "},{"type":"text","value":"Model names use the upstream names, not the external Tare model names."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{"className":["task-list-item"]},"children":[{"type":"element","tagName":"input","properties":{"type":"checkbox","checked":false,"disabled":true},"children":[]},{"type":"text","value":" "},{"type":"text","value":"All four prices are per million tokens."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{"className":["task-list-item"]},"children":[{"type":"element","tagName":"input","properties":{"type":"checkbox","checked":false,"disabled":true},"children":[]},{"type":"text","value":" "},{"type":"text","value":"Unknown prices were not entered as 0."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{"className":["task-list-item"]},"children":[{"type":"element","tagName":"input","properties":{"type":"checkbox","checked":false,"disabled":true},"children":[]},{"type":"text","value":" "},{"type":"text","value":"When changing a price you recorded the change date, knowing that historical backfill uses the current price."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{"className":["task-list-item"]},"children":[{"type":"element","tagName":"input","properties":{"type":"checkbox","checked":false,"disabled":true},"children":[]},{"type":"text","value":" "},{"type":"text","value":"In the cost attribution page or a generation query, the cost of the target calls is not empty."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Next steps"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"These three articles are one chain; read them in order: "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"connect a channel → enter cost prices → configure routing"}]},{"type":"text","value":". You have just finished the second step."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Previous: if you don't have a channel yet, read "},{"type":"element","tagName":"a","properties":{"href":"channels"},"children":[{"type":"text","value":"channels"}]},{"type":"text","value":" first."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Next: point the external model name at this channel, read "},{"type":"element","tagName":"a","properties":{"href":"routing"},"children":[{"type":"text","value":"Routing"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"To find out where the cost goes: read "},{"type":"element","tagName":"a","properties":{"href":"attribution"},"children":[{"type":"text","value":"Cost attribution"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"For a word you don't recognize: look it up in the "},{"type":"element","tagName":"a","properties":{"href":"glossary"},"children":[{"type":"text","value":"glossary"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"}]}]}