svalin
All docs pages

API and agents

Paying per call

A paid route asks for a USDC payment over x402 and answers once it is paid. There is no account.

How a call is paid

  1. Call a paid route. It answers HTTP 402 with the price in the PAYMENT-REQUIRED header.
  2. Sign a USDC payment for that amount with any x402 client.
  3. Call again with the PAYMENT-SIGNATURE header. The answer comes back with a receipt.

Test and real USDC

Each chain moves from its test network to real USDC on its own; the line above is read live from the API.

When a call fails

Bad input is rejected before any payment, and a call that fails is never charged. A token address sent where a wallet was expected gets HTTP 422 with code token_address, and for a NEAR token, its grade.