ArcenArcen

Agents & payments

Pay-per-call (x402)

No account, no API key - pay for a single chat completion in USDG on Robinhood Chain via the x402 protocol. This is for agents and one-off callers; for regular use an ar_sk_ key is simpler.

The 402 challenge

Send a keyless chat request. max_tokens is required - it bounds the pre-authorization ceiling. With no payment attached you get HTTP 402 and an x402 challenge:

402 challenge (abridged)
{
  "x402Version": 2,
  "accepts": [{
    "scheme": "exact",
    "network": "eip155:4663",    // Robinhood Chain
    "asset":   "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",  // USDG
    "amount":  "2331",           // pre-auth CEILING (atomic USDG)
    "payTo":   "0x…",
    "extra":   { "name": "Global Dollar", "version": "1" },
    "maxTimeoutSeconds": 60
  }]
}

Sign the USDG transfer authorization (EIP-3009) per accepts[] (an x402 client library handles this) and resend with the PAYMENT-SIGNATURE header. We verify + settle on-chain, serve the completion, and refund the difference between the ceiling and the actual metered charge - so you never overpay for unused output. Chat only; /models and /embeddings stay key-based.

Agent discovery

A public, unauthenticated JSON descriptor at /.well-known/x402 advertises the model catalog, per-token pricing, the settlement asset, and the pay-per-call terms above - so agent directories and x402 indexers can auto-discover and transact with Arcen.

curl
curl https://api.arcencompute.com/.well-known/x402