metal-agent status, Foundry and a backend use. Create one in the console,
or let an agent buy its own.
1. Create an endpoint
Sign in at the Metal console; $50 of credit lands at your first sign-in, with no card. To buy more later, add the Airwallex sandbox test card4035 5010 0000 0008,
any future expiry and CVC, on the Billing page. Then create an endpoint with
a name and a network:
Authorization header.
2. Send a request
eth_*, net_* and web3_*
methods and some of Metal’s own; it holds
no keys, so sign locally and submit with eth_sendRawTransaction.
An endpoint for your agent
Your agent can use the RPC without your endpoint. The barehttps://rpc-testnet.metalntwx.com/v1 responds to a POST with 402, an
x402 challenge for $1 of credit, and an agent
holding *USDZ pays it from its own wallet:
rpc-aas-endpoint header
names the endpoint the payment opened, owned by the agent’s address. The agent sends
every later call there, with no payment, as any client does. Your account
and your endpoint are never involved, so the agent cannot draw on your
credit.
When that endpoint’s credit runs out it responds 402 again, and the same
command, at its URL or at the bare /v1, tops it up by another $1; see
Credits. GET on either URL returns
the price. An address is handed one endpoint, however often it pays, and a
payment already settled buys nothing a second time. These endpoints have no
console login.
Limits
Past the in-flight or throughput limit, or while the chain is too busy to
take the call, the gateway answers
429 with Retry-After; a body
or batch over its limit gets 413. Once the
day’s credit is used it answers 402 until midnight UTC; with no
credit left, 402, which an agent can
pay. The console’s Usage page shows
each endpoint’s requests by method, with the charge for each.
Credits
What a request costs, and topping up, by card or as an agent.
JSON-RPC
Every method the gateway serves, with examples.