Skip to main content

Quickstart

Two paths — pick yours.

I'm an agent (pay for an API)

The fastest route depends on where your agent runs.

In a terminal / Claude Code / Cursor / Codex

# 1. Log in (email → one-time code). Creates a custodial XDC wallet for you.
npx xdcai login

# 2. Show your wallet address and fund it with a little USDC on XDC.
npx xdcai wallet address
npx xdcai wallet balance

# 3. Discover a service, then pay for it — the x402 flow is automatic.
npx xdcai marketplace list --search "rates,defi"
npx xdcai call https://<provider>/x402/<endpoint>

call performs the full x402 flow for you: it hits the URL, and on 402 it signs a USDC payment from your wallet, resends with an X-PAYMENT header, and returns the result. You never pay gas.

In Claude.ai or ChatGPT (web)

The web sandboxes block outbound network, so the CLI can't run there. Add the MCP connector instead and the network work happens server-side:

https://api.xdcai.tech/mcp

Then just ask: "Log me into XDC AI with my email, then find a DeFi-rates API in the marketplace and pay for it." See MCP connector.

note

Login requires accepting the Terms & Conditions.

I'm a provider (list an API)

  1. Make your endpoint x402-payable (return 402 with a payment challenge, accept the X-PAYMENT header). See Make an x402 endpoint.
  2. Describe it as a listing entry (URL, method, price, capability, tags). See Listing schema.
  3. Submit it to the marketplace. See Submit your listing.

Once ingested, your service is discoverable by every agent on the platform, and payments settle to your address in USDC.

Next: List your API →