x402 for AI agents: how an agent pays for APIs in USDC

Updated 2026-11-06

x402 lets an AI agent pay for an API call by itself, in a stablecoin (usually USDC), inside the HTTP request. No signup, no API key, no stored card. This guide is for people building or running agents: what the agent needs, how a paid call works step by step, how to keep spending safe, and where to find APIs that accept it. New to the protocol? Start with what is x402.

Why agents need x402

A human can create an account, add a card and paste an API key. An agent that discovers a useful API mid-task cannot. The x402 project (an open standard under the x402 Foundation, a Linux Foundation project) describes the old flow as account, payment method, credits or subscription, key management, then payment, and the x402 flow as: request, receive 402 Payment Required, pay with stablecoins, get the response. It lists zero protocol fees (only network fees) and support for EVM chains, Solana and more.

What the agent needs

  • A wallet with USDC on the network the API accepts. In our directory, 390 of 407 x402 listings accept Base and 153 accept Solana (listing data, Nov 6, 2026).
  • An x402 client that reads the 402 reply, signs a payment for the exact amount and retries the request with the payment attached. Open-source clients exist for common HTTP libraries; see how to pay for an API with USDC.
  • A budget: a per-call cap and a total cap enforced in code, outside the model.

How one paid call works

  1. The agent calls the endpoint with no payment.
  2. The server answers 402 with the price, asset, network and pay-to address (see HTTP 402 explained).
  3. The client checks the quote against the agent’s budget and the expected pay-to.
  4. If it passes, the client signs the payment and retries the same request.
  5. The server verifies and settles the payment and returns the data.

Keep agent spending safe

What agents pay per call

Most x402 APIs charge cents or fractions of a cent. Of the 369 x402 listings in our directory that publish a price, 304 start at $0.01 or less, and the median starting price is $0.005 (listing data, Nov 6, 2026). More in USDC micropayments and x402 API prices.

Where to find x402 APIs for agents

Browse the best x402 APIs, x402 APIs for AI agents by task, paid MCP servers, or test any endpoint with the free x402 endpoint checker. Building the API side? Accept USDC for your API.

Source: x402.org (read Nov 6, 2026); directory counts from YourAITools listing data, Nov 6, 2026.

New to x402, the HTTP 402 payment standard these APIs use? Read what x402 is and how agents pay per call.

Liked this guide? Get new crypto-payable AI tools weekly

One short email a week with the x402 and pay-per-call tools we added and re-verified. No spam, unsubscribe any time.

Run an AI tool, API or agent that accepts crypto?

List it on YourAITools for free. Want it live sooner or pinned in its category? Fast-track review is $19, Featured for 30 days is $29 and the Launch bundle is $49, paid in USDC on Base, Polygon, Arbitrum One or Solana with one x402 payment. Every listing gets the same review, and paid placements are always labeled.

Paid checkout: api.youraitools.co/listing. Payment doesn’t guarantee approval; rejected submissions are refunded in USDC.

Keep exploring

Guides