protocol · x402/chain · base/asset · usdc

Pay per prompt.
No signup.
Sign once,
get any model.

A drop-in OpenAI-compatible API for 43 frontier models — Claude, GPT-5.5, Gemini 3.1, Grok, Veo, Kling, nano-banana — settled in USDC over x402. No accounts. No invoices. Just an HTTP 402 and a signature.

43
models live
~250ms
median p50 quote
240s
max chat duration
~ / x402-quickstart.sh
two requests
# 1. quote
curl -sX POST https://api.x402prompt.com/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"claude-opus-4-7","messages":[{"role":"user","content":"hi"}],"max_tokens":50}'
# ← HTTP/1.1 402 Payment Required
# PAYMENT-REQUIRED: <base64 quote · 0.150000 USDC · base>
 
# 2. sign & retry
curl -sX POST https://api.x402prompt.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "PAYMENT-SIGNATURE: <base64 eip-3009 transferWithAuthorization>" \
-d '{"model":"claude-opus-4-7","messages":[{"role":"user","content":"hi"}],"max_tokens":50}'
# ← HTTP/1.1 200 OK
# PAYMENT-RESPONSE: <base64 settled · tx 0x058519e8…7e89794>
# {"choices":[{"message":{"content":"Hello! How can I assist you today?"}}],...}
402
quote
signature
client signs eip-3009
200
settled · response
pricing

Token-accurate on prepaid. Flat ceiling on PAYG.

Prepaid bills chat per actual prompt + completion tokens (reserve-max → finalize-actual → refund-excess). PAYG quotes one flat per-call price upfront. Image and video are per-call in both modes. Numbers below are the PAYG quote — also the upper bound on prepaid.

all 43 models →
mechanism

Two flows. Both end in a signature.

paygfastest

Sign per request.

Send a request without auth. Our server quotes a flat price per model. Sign EIP-3009 once per call. Useful for agents that don't maintain state or for one-off generations.

  1. 01POST /v1/chat/completions→ 402 + quote
  2. 02wallet.signTypedData(...)TransferWithAuthorization
  3. 03POST again with PAYMENT-SIGNATURE→ 200 + completion
prepaidcheaper

Top up, get a key.

One x402 payment credits a balance keyed to your wallet. Receive a bearer api key. Subsequent calls debit at token-accurate rates with refund on client disconnect.

  1. 01POST /v1/topup?amount=5sign once · receive key
  2. 02Authorization: Bearer sk-x402-…reserve max
  3. 03finalize actual → refund deltabalance auto-tracked
facilitator
api.cdp.coinbase.com
Coinbase Developer Platform
asset
USDC
6 decimals · 0x8335…2913
scheme
exact · eip-3009
transferWithAuthorization
network
Base
Base L2 mainnet