x402inference

Pay-per-token
inference. No account.

OpenAI-compatible chat completions, paid in USDC on Base via x402's batch-settlement scheme. Spend only what you use, withdraw the rest any time.

Paste this into Claude Code, Cursor, or any coding agent — it'll read our llms.txt and wire up the integration itself.

Integrate x402inference into this project: a pay-per-token, OpenAI-compatible
chat completions API paid in USDC on Base, with no account and no API key.

- Endpoint: POST https://x402inference.com/accountless/chat/completions
  Body is a normal OpenAI chat completions request: { model, messages, ... }.
- The first unpaid request returns HTTP 402 with a PAYMENT-REQUIRED header
  describing an x402 `batch-settlement` offer (network, asset, receiving
  address, per-request ceiling).
- Sign a channel deposit (ERC-3009) up to the offer's ceiling using a Base
  wallet funded with USDC, then retry the same request with a
  Payment-Signature header — that's the real, paid call. Use an x402-aware
  client library for this ecosystem if one exists (e.g. `x402` on PyPI,
  `@x402/evm` on npm); otherwise implement the 402 -> sign -> retry flow
  directly.
- The real per-token cost charged comes back on the X-Request-Cost-Atomic
  response header — the ceiling is a maximum, not what you're billed; you
  only ever pay for tokens actually used, and unclaimed balance is
  recoverable any time via a timed withdrawal.

Full endpoint/response reference: https://x402inference.com/llms.txt
Batch-settlement scheme docs: https://docs.x402.org/schemes/batch-settlement

Write the integration in this project's language, call the endpoint with a
short test message, and print the response plus the X-Request-Cost-Atomic
header so I can see what it actually charged.

Live transactions

connecting…

Real accountless requests, settled against on-chain USDC escrow channels on Base — updates every few seconds.

Model Tokens Amount Age
Loading…