<?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: Armanalabs</title>
    <description>The latest articles on DEV Community by Armanalabs (@armanalabs_b86b3803a4445c).</description>
    <link>https://dev.to/armanalabs_b86b3803a4445c</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%2F4190307%2Ffa9edd5d-a34e-48db-afe4-583a15d9b86b.png</url>
      <title>DEV Community: Armanalabs</title>
      <link>https://dev.to/armanalabs_b86b3803a4445c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/armanalabs_b86b3803a4445c"/>
    <language>en</language>
    <item>
      <title>How AI agents can pay for AI services per call: x402 "upto" payments on Base</title>
      <dc:creator>Armanalabs</dc:creator>
      <pubDate>Sat, 17 Oct 2026 10:54:23 +0000</pubDate>
      <link>https://dev.to/armanalabs_b86b3803a4445c/how-ai-agents-can-pay-for-ai-services-per-call-x402-upto-payments-on-base-p9</link>
      <guid>https://dev.to/armanalabs_b86b3803a4445c/how-ai-agents-can-pay-for-ai-services-per-call-x402-upto-payments-on-base-p9</guid>
      <description>&lt;p&gt;&lt;em&gt;A ceiling the payer signs, a metered amount the service settles, and no API keys&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Most AI services still sell access the way SaaS did in 2015: an account, an API key, a monthly plan and an invoice. That works for a human team. It does not work for an AI agent that needs to call a model it found a minute ago, pay for 3,000 tokens and move on.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with fixed-price payments
&lt;/h2&gt;

&lt;p&gt;HTTP 402 "Payment Required" has existed since the 1990s. The x402 standard finally gives it a format: a service answers 402 with its price, and the client retries with a signed payment. The catch is that AI usage is rarely known in advance. A request might use 200 tokens or 20,000.&lt;/p&gt;

&lt;h2&gt;
  
  
  "upto": sign a ceiling, settle the meter
&lt;/h2&gt;

&lt;p&gt;The x402 &lt;code&gt;upto&lt;/code&gt; scheme solves this. The payer signs an authorization for at most a ceiling, for example 5 ARL. The service does the work, measures it and settles only the metered amount, for example 1.37 ARL. The signature names the payee and can be used once. The service cannot take more than the ceiling, and cannot pay itself twice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who is the service? ERC-8004
&lt;/h2&gt;

&lt;p&gt;Paying per call only works if the agent can trust whom it is paying. ERC-8004 gives services and compute providers an on-chain identity, with feedback and ratings that other agents can read before they pay.&lt;/p&gt;

&lt;h2&gt;
  
  
  Longer work: ERC-8183 escrowed jobs
&lt;/h2&gt;

&lt;p&gt;Some tasks, such as a training run or a batch of renders, take hours. For these, ARL uses ERC-8183 jobs. The client locks the payment in escrow with a deadline, the provider delivers, and the escrow releases the payment or refunds it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;ARL Protocol puts these pieces together on Base. Everything is open source and live on the Base Sepolia testnet. At arlcoin.io/app you can take testnet ARL from the faucet, pay a demo service with an x402 &lt;code&gt;upto&lt;/code&gt; payment, post an escrowed job and stake. Testnet tokens have no value.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Code: github.com/armanalabsai/arlcoin.io&lt;/li&gt;
&lt;li&gt;Docs: arlcoin.io/docs&lt;/li&gt;
&lt;li&gt;Community: t.me/arlcoin_community · X @arlprotocol&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on Medium: &lt;a href="https://medium.com/@armanalabsai/how-ai-agents-can-pay-for-ai-services-per-call-x402-upto-payments-on-base-4cd395e3d08f" rel="noopener noreferrer"&gt;https://medium.com/@armanalabsai/how-ai-agents-can-pay-for-ai-services-per-call-x402-upto-payments-on-base-4cd395e3d08f&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>x402</category>
      <category>ai</category>
      <category>ethereum</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
