<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yosh</title>
    <description>The latest articles on DEV Community by Yosh (@yosh102).</description>
    <link>https://dev.to/yosh102</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1086001%2F0fbc80f0-fc4e-4812-826f-1e5d64075a4c.jpeg</url>
      <title>DEV Community: Yosh</title>
      <link>https://dev.to/yosh102</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yosh102"/>
    <language>en</language>
    <item>
      <title>SAM 3 found the cars. Jev decided what they were worth.</title>
      <dc:creator>Yosh</dc:creator>
      <pubDate>Sun, 20 Sep 2026 07:45:36 +0000</pubDate>
      <link>https://dev.to/yosh102/sam-3-found-the-cars-jev-decided-what-they-were-worth-25g7</link>
      <guid>https://dev.to/yosh102/sam-3-found-the-cars-jev-decided-what-they-were-worth-25g7</guid>
      <description>&lt;p&gt;Most usage-based APIs I have paid for charge by length. Tokens, calls, rows, seconds of video. It is a proxy for value, and it quietly pays a model to pad: the same question answered in four sentences earns more than the one answered in one.&lt;/p&gt;

&lt;p&gt;I wanted to see what happens if the price is decided &lt;em&gt;after&lt;/em&gt; the work instead, by something that reads the result.&lt;/p&gt;

&lt;p&gt;The payment layer already allowed the shape of this: authorize a ceiling before the work starts, settle less after it. What it could not do — what nothing can do — is say &lt;strong&gt;how much less&lt;/strong&gt;. That number has to come from somewhere, fast enough to sit inside a request, and it cannot come from the thing that produced the work.&lt;/p&gt;

&lt;p&gt;Here is what I built, in the order I got it wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. I rounded the distribution, which is the whole product
&lt;/h2&gt;

&lt;p&gt;The judge is &lt;a href="https://typesafe.ai" rel="noopener noreferrer"&gt;Jev&lt;/a&gt;, a System One model: you send state and typed questions, it answers with probabilities and a confidence, no prose. I asked it one question — how much work does this answer represent, on a three-level scale — and mapped the answer to a tier.&lt;/p&gt;

&lt;p&gt;That was the mistake. &lt;code&gt;score: 0.99&lt;/code&gt; on a scale whose levels are &lt;em&gt;lookup / synthesis / investigation&lt;/em&gt; means "essentially a synthesis". I floored it to 0 and charged for a lookup.&lt;/p&gt;

&lt;p&gt;The distribution &lt;strong&gt;is&lt;/strong&gt; the product. The moment you round it into a bucket you have thrown away the only thing that distinguishes a calibrated model from a general one asked for JSON. The fix is to charge the mean:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;expected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;LEVELS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;total&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;level&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;level&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;micros&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;12% a synthesis and 88% an investigation, at $0.025 and $0.05, is &lt;strong&gt;$0.047&lt;/strong&gt; — not a tier. And it is unbiased in a specific, limited sense: if the probabilities are calibrated, what you charge converges on the expected value of the tier prices — the value function I chose, not some true worth of the work. Rounding to a tier throws that information away and makes the price jump at an arbitrary line; whether the jump favours you or the buyer depends on where the line sits.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$0.0235&lt;/code&gt; is not a display value, by the way. The ledger holds micros, so that is the amount that settles — which is what lets a price be a mean in the first place.&lt;/p&gt;

&lt;p&gt;Uncertainty also stops needing a hand-tuned rule. A judge torn between two levels charges between them, automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. I asked for verification without sending the evidence
&lt;/h2&gt;

&lt;p&gt;The second question I ask is whether the answer is &lt;em&gt;grounded&lt;/em&gt; — supported by what the service actually read, rather than asserted. Every call came back between 0.07 and 0.54, and I spent a while believing the model was bad at it.&lt;/p&gt;

&lt;p&gt;It was not. I was sending the question and the answer, and asking "is this supported by the sources?" — &lt;strong&gt;without sending the sources&lt;/strong&gt;. With them in the state, grounded answers score 0.98 and ungrounded ones stay low.&lt;/p&gt;

&lt;p&gt;What I do with that number is a pricing decision, not a mathematical consequence: I multiply the expected price by the grounding probability, which treats a wholly ungrounded answer as worth nothing and a half-grounded one as worth half. Someone else could reasonably floor it, or refuse to bill at all below 0.5. Whatever you choose, put it in the receipt.&lt;/p&gt;

&lt;p&gt;Obvious in hindsight. A verification question with nothing to verify against is a vibe check, and it will happily return numbers that look like data.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. A silent fallback hid a vendor being down
&lt;/h2&gt;

&lt;p&gt;Every path through the judge falls back to a rule-based one: no key, timeout, error, unrecognised shape. A trial key that expires should change your prices, not stop your server.&lt;/p&gt;

&lt;p&gt;Then I set a real key and everything kept working — priced by rules. The key was a Vercel AI Gateway key (&lt;code&gt;vck_…&lt;/code&gt;), I was sending it to TypeSafe's own endpoint, the answer was &lt;code&gt;401&lt;/code&gt;, and my fallback swallowed it into a reason string nobody was reading.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A fallback in the path of money must be loud.&lt;/strong&gt; It is now in the receipt: every response says which judge decided and why, so "the rules priced it because the judge answered 401" is visible to the buyer, not just to the logs.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Then I pointed it at pictures, and the seller's model scored its own work
&lt;/h2&gt;

&lt;p&gt;Text is the easy case. The sharper one is detection: &lt;em&gt;"find every solar panel in this photo"&lt;/em&gt; has no price until it runs — there might be forty, there might be none — and the model that answers also scores its own answers.&lt;/p&gt;

&lt;p&gt;I assumed a segmentation model would sidestep that, because the SAM I remembered was class-agnostic: you clicked, it gave you a mask, it had no idea what the mask was. &lt;strong&gt;SAM 3 is not that model.&lt;/strong&gt; It takes a noun phrase, returns every instance of it, and scores each one itself. The self-marking problem does not disappear with segmentation; it arrives with it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fet1eaf8orwzbl0v2zass.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fet1eaf8orwzbl0v2zass.jpeg" alt="Three cars boxed in a street photograph, each labelled with SAM's score, the judge's probability and the cent charged; a banner reads authorized $0.20, charged $0.03" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SAM 3 found the three cars in that photo in &lt;strong&gt;2.0 seconds&lt;/strong&gt;, scoring them 0.93–0.97. It is equally confident about a crop that is not a car, which is the point.&lt;/p&gt;

&lt;p&gt;So a second opinion decides the money: a vision model says what each crop &lt;em&gt;shows&lt;/em&gt;, in one sentence, and Jev says whether that sentence is the thing the buyer asked for. Neither of them chose the crop. The price is &lt;strong&gt;$0.01 per accepted detection&lt;/strong&gt;, so three cars surviving at &lt;code&gt;p ≥ 0.9&lt;/code&gt; is &lt;strong&gt;$0.03 of a $0.20 ceiling&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Ask for a bicycle and SAM returns nothing, so the charge is &lt;strong&gt;$0.00&lt;/strong&gt;. The empty photo is the case a flat fee gets wrong, and the one a caller remembers.&lt;/p&gt;

&lt;p&gt;That zero is not an error path I wrote, either. The handler answers &lt;code&gt;422&lt;/code&gt; and the gate &lt;strong&gt;releases the hold&lt;/strong&gt; — the authorization goes back to the caller, unspent, to use elsewhere. Charging nothing has to be as ordinary as charging something, or the seller quietly rounds up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two stages, because neither model can do it alone
&lt;/h2&gt;

&lt;p&gt;I would rather have asked the vision model directly and read the probability from its logprobs. Two things stopped me, and I diagnosed the first one wrong:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;logprobs: true&lt;/code&gt; with an image returned &lt;code&gt;400&lt;/code&gt;. I wrote "the gateway refuses logprobs alongside images" in a comment and moved on. The actual error was &lt;code&gt;max_output_tokens&lt;/code&gt; below the minimum of 16 — my &lt;code&gt;max_tokens: 1&lt;/code&gt;. Read the error body.&lt;/li&gt;
&lt;li&gt;With that fixed, the request succeeds and the logprobs come back &lt;strong&gt;empty&lt;/strong&gt;, on that route, for text as much as for images. So the only graded number available comes from the model that cannot see.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hence: describe, then decide.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is the second opinion worth the extra call?
&lt;/h2&gt;

&lt;p&gt;That is measurable, so I measured it. Seven crops of the same photograph — the three cars, plus a front wheel, a traffic light, a palm tree and bare road — judged three ways.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz617hj9zdwpzhfd8e0u7.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz617hj9zdwpzhfd8e0u7.jpeg" alt="A table comparing three judging methods over seven crops; all three score 6 of 7, and only the graded method is unsure about the wheel" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All three score &lt;strong&gt;6 / 7&lt;/strong&gt;, and all three are wrong about the same crop: a front wheel, described as &lt;em&gt;"a car wheel and part of the vehicle's body"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Equal on accuracy. Not equal on what you can do next. Only the graded answer was &lt;strong&gt;unsure&lt;/strong&gt; — 0.85, against a confident yes from the other two — and the real cars sit at 0.98 and above. On this tiny sample, 0.9 happens to separate the wheel from the cars, so moving the threshold there makes that column 7 / 7 with nothing else lost. That is a threshold picked by looking at the same seven crops it is scored on, which is not evidence of anything except that the knob exists. A yes/no has no knob at all.&lt;/p&gt;

&lt;p&gt;That is the whole argument for the extra call, and it rests on seven crops of one photograph. It is an anecdote, not a benchmark. But the shape holds: &lt;strong&gt;if your price is graded, your judge has to be.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually costs you
&lt;/h2&gt;

&lt;p&gt;Not the judging. Ten questions judged in parallel came back in about &lt;strong&gt;600 ms&lt;/strong&gt; for a fraction of a cent, because a System One model bills input tokens and emits no prose.&lt;/p&gt;

&lt;p&gt;What costs you is the rate limit. Three image crops took &lt;strong&gt;38 seconds&lt;/strong&gt;, because the gateway team I was on allows five vision calls a minute. Plan the queue, not the tokens.&lt;/p&gt;

&lt;p&gt;And the failure that would actually keep me up is neither. It is the provider going quiet between &lt;em&gt;charge&lt;/em&gt; and &lt;em&gt;charged&lt;/em&gt;, leaving a charge that is neither — which is the part I did not have to solve. The ledger records the reservation and the settlement separately, and reconciliation asks the provider afterwards what really happened. Once, never twice.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I still cannot tell you
&lt;/h2&gt;

&lt;p&gt;The judge never sees the image. It sees a sentence a vision model wrote about the image, so its calibration applies to &lt;em&gt;"is this sentence a car"&lt;/em&gt; and not to &lt;em&gt;"is this region a car"&lt;/em&gt;. If the description is wrong, the judge is confidently wrong. The visual-to-language hop is unmeasured, and it is the weakest link in the chain.&lt;/p&gt;

&lt;p&gt;Two ways to close it, neither done: take two descriptions per crop and let disagreement cost the seller, or find a route where the vision model itself returns a distribution.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part that is actually new
&lt;/h2&gt;

&lt;p&gt;Outcome pricing is not new — support tools have billed per resolution for years. What I have not seen is the buyer being handed the arithmetic: the distribution the price was averaged over, the grounding score that discounted it, the confidence, the model version that decided, and the threshold it was measured against.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"pricing"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"charged"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$0.01739"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"authorized"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$0.05"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"judgedBy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"typesafe-ai/jev"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"confidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0.82&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"reason"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"depth 0.00 / 0.12 / 0.88 → $0.047 expected, × 0.37 grounded"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A price nobody can check is a price nobody trusts. And it is what a refund argument is about later, so it had better be written down at the time.&lt;/p&gt;

&lt;p&gt;The whole route is twelve lines, and three of them are the payment layer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/detect&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;tollstile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toll&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;price&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;upTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$0.20&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))),&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;found&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;sam3&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;concept&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;                 &lt;span class="c1"&gt;// proposes, and scores itself&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;kept&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;secondOpinion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;concept&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;found&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// someone else's opinion&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;payment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;payment&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;kept&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;charged&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;$0.00&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;422&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// the hold is released&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;payment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fulfill&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;price&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;kept&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;           &lt;span class="c1"&gt;// settle what survived&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;detections&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;kept&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;pricing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;explain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;kept&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The pricing does not care which compatible rail moves the money: x402's &lt;code&gt;upto&lt;/code&gt; scheme settles the computed amount here, and any other variable-amount rail plugs into the same handler. Fixed-amount rails — MPP's card charges among them — are excluded from a route priced this way, and the gate says so at definition time rather than at settlement. The judge never learns which rail paid, and should not.&lt;/p&gt;

&lt;p&gt;Everything above runs, and you can poke it without an account or a wallet: &lt;a href="https://demo.tollstile.com/jev" rel="noopener noreferrer"&gt;demo.tollstile.com/jev&lt;/a&gt; prices questions this way, and the detection example is &lt;a href="https://github.com/tollstile/Tollstile/tree/main/examples/detection-pricing" rel="noopener noreferrer"&gt;on GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you try it on your own images, measure the thing I could not: how often the judge agrees with a person, over enough cases to mean something. Then publish that number next to your price.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>stripe</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
