ArcenAgentArcenAgent

Agents & payments

Pay-per-call (x402)

No account, no API key - pay for a single chat completion in USDC on Solana 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": "solana:5eykt4UsFv8P...",
    "asset":   "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",  // USDC
    "amount":  "2331",           // pre-auth CEILING (atomic USDC)
    "payTo":   "BMJ8G9DA...",
    "extra":   { "feePayer": "2wKupLR9..." },
    "maxTimeoutSeconds": 60
  }]
}

Sign the USDC transfer 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 ArcenAgent.

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