x402 — HTTP 402 Micropayments

x402 is an open payment protocol that uses the HTTP 402 Payment Required status code. Instead of API keys and subscriptions, the client pays per request with USDC on Solana or Base.

How does x402 payment work?

x402 uses the HTTP 402 status code for API payments. When your agent requests a paid endpoint, the server returns 402 with payment instructions. Your wallet signs a USDC payment, you retry with the proof, and the server returns the data. No API keys needed.

x402 Payment
An HTTP-based micropayment protocol that uses the 402 Payment Required status code. The client pays per request with USDC — no API keys, no subscriptions, no prepaid balances.
USDC
A USD-pegged stablecoin used for x402 payments. Kronos accepts USDC on Solana and Base networks.
Facilitator
The on-chain service that verifies and settles USDC payments. Kronos uses the PayAI facilitator for Solana and Base.
Buyer wallet
A wallet you control that signs payment authorizations. The private key stays local — Kronos never sees or holds it.
  1. Client sends a request to a paid endpoint
  2. Server responds with 402 Payment Required and payment instructions
  3. Client sends the USDC payment on-chain
  4. Client retries the request with the payment proof in the X-PAYMENT header
  5. Server verifies the on-chain payment and returns the data

Payment flow

# 1. Request without payment → 402
curl https://kronos.seshat.markets/api/feeds/kronos/predict/btc_usdt
# → 402 Payment Required
# → X-PAYMENT-REQUIRED: { "price": "$0.01", "network": "base", ... }

# 2. Send USDC payment on-chain
# (use any x402 client library or manual transfer)

# 3. Retry with payment proof
curl -H "X-PAYMENT: <base64-encoded-payment>" \
  https://kronos.seshat.markets/api/feeds/kronos/predict/btc_usdt
# → 200 OK + data

Why use x402 instead of API keys?

No API keys. Ever.

No dashboard, no key rotation, no 2am Slack alerts. The payment is the auth.

Pay for what you use

$0.005 cached, $0.01 fresh GPU, $0.05 AI digest. No monthly fees, no tiers.

Trustless by design

Every paid request is verified and settled through the x402 payment flow. No double-charging, no silent billing.

Built for AI agents

Agents pay autonomously via HTTP header. No human in the loop, no OAuth dance.

Which blockchain networks does x402 support?

NetworkTokenSettlementFee
SolanaUSDC (SPL)~400ms~$0.001
BaseUSDC (ERC-20)~2s~$0.01

Which client libraries support x402?

x402 is an open standard maintained by the x402 Foundation (originally Coinbase). Official SDKs for TypeScript and Python handle the 402 handshake, payment signing, and retry automatically — you just make a normal HTTP request.

Solana support via @x402/svm, EVM (Base, Ethereum) via @x402/evm. Full docs at docs.x402.org.

Frequently asked questions

What is x402 payment protocol?
x402 is an open payment protocol that uses the HTTP 402 Payment Required status code. Instead of API keys and subscriptions, the client pays per request with USDC on Solana or Base. The payment is the authentication — no keys to leak, no dashboards to manage.
How do I pay for API requests with USDC?
Send a request to a paid endpoint, receive a 402 response with payment instructions, send USDC on-chain, then retry with the payment proof in the X-PAYMENT header. Use @x402/fetch or @x402/axios to automate this flow — zero code changes needed.
What networks does x402 support for crypto API payments?
Solana (USDC SPL token, ~400ms settlement, ~$0.001 fee) and Base (USDC ERC-20, ~2s settlement, ~$0.01 fee). Solana support via @x402/svm, EVM via @x402/evm. Both are trustless — every paid request is verified and settled through the x402 payment flow.
Can AI agents pay for API calls autonomously with x402?
Yes. x402 is built for autonomous agents — the payment is the auth. Agents handle the 402 handshake via SDKs, sign USDC payments, and retry automatically. No human in the loop, no OAuth dance. See pricing for per-request costs.
Do I need an x402 SDK to use the Kronos API?
No. x402 is just HTTP — send X-PAYMENT with a base64-encoded payment proof via curl -H. However, the official SDKs (@x402/fetch, @x402/axios, Python x402) automate the 402 handshake, payment signing, and retry for you.

Related endpoints