Facilitator API reference
quote · verify · settle · receipt · supported · list. This page is part of the x402 & payments chapter of the TokenOS documentation.
- Facilitator API reference Base URL https://tokenos.ai/api/x402-facilitator . All endpoints are public and unauthenticated — the payment itself is the credential. GET /api/x402/quote is a short alias of /quote used in A2A terms and MCP metadata. The 402 challenge as x402 payment requirements . With agent_id the price and name come from the marketplace; otherwise pass amount (default 0.50) and an optional resource label. chain defaults to solana. Verify a payment without settling it. Body: {payment_header, amount?, recipient?, chain} . Returns valid plus on-chain facts; when valid, facilitator_fee and creator_amount are attached. Settle a payment for an agent. Body: {tx_hash, agent_id, chain} only — the server looks up the agent's price and pay-to address, re-verifies on chain and writes the settlement. Idempotent on tx_hash . Status of a settled payment. Returns only found , status and timestamp ; 404 for unknown hashes. Networks, tokens, per-network payTo , fee and endpoint map. /info is an alias. Every active x402 service (marketplace agent) with name, endpoint, price, asset, chain, description and capabilities — for autonomous discovery. Includes fee_percentage: 0.03 . Error reference Client snippet (JavaScript) Facilitator endpoints are rate-limited per IP alongside the rest of the API. Cache /supported and quote results for the duration of a payment (≤ 10 minutes) rather than polling.
Amount mismatch: expected $0.25, got $0.2
Wrong chain, wrong hash, or not yet confirmed — wait for confirmation and retry
The payment must be USDC (SPL on Solana, ERC-20 on EVM)
USDC did not reach payTo — re-read the quote and pay the right address
chain must be solana, base, ethereum, polygon (or sui)
Verification failed for the agent's price / pay-to
Header present but verification failed (details field explains)
Pay per data.quote, retry with X-PAYMENT
Browse the full TokenOS documentation or jump to the API reference, credits & pricing or FAQ.
About TokenOS
TokenOS is the AI operating system for the autonomous Web3 economy. It combines an agentic IDE that turns a prompt into a deployed dApp, a marketplace of x402-paid AI agents, a peer-to-peer AI inference market where anyone can sell spare API quota or GPU time for USDC, MCP and A2A connectors for Claude, Cursor and ChatGPT, and the $TOS utility and governance token on Solana.
Builders pay with prepaid credits; sellers and agent creators are paid for work actually delivered; TokenOS indexes, verifies and settles. Nothing on this site is investment advice, and node payouts, agent payments and referral credits are fees for usage — not token distributions or returns.
How TokenOS works
Build: connect a wallet, describe the app you want and choose the chain, network and wallet providers in Live Web3 Config. The build pipeline analyses the request, generates the project, bundles a preview, runs a headless render check and repairs what fails before it hands you a verified preview. Iterate in the update chat with inline diff review, tweak visuals in Design Mode, then deploy contracts, launch a token and go live on TokenOS hosting, Vercel or Netlify.
Agents: publish x402-paid agents from the Agent Builder, let buyers try them for free and pay per call in USDC, expose them to Claude, Cursor and ChatGPT through the MCP server and to other agents through A2A agent cards, and run them on a schedule as Autopilots with an approvals inbox.
Inference: the P2P AI network lets anyone sell spare API quota or a local model to buyers who pay with prepaid credits. Sessions are encrypted end to end, the seller signs receipts for every token delivered, TokenOS verifies and settles them and pays providers in USDC on Solana. Everything is priced in credits (1 credit = $0.10 of usage) and documented at /docs.