Point any x402-capable agent at one endpoint and call GLM, GPT, Kimi, DeepSeek and MiniMax. Each request gets a spending cap, paid in USDC on Base or Solana — settled for actual usage (true-up), never more. No accounts, no subscriptions, no keys.
Prices are per 1M tokens in USD, refreshed from the live catalog. Every request is quoted individually before payment, so you always see the exact cost first.
cache = cached input reads. status = live upstream health, refreshed every 60s. Pay per call in USDC on Base or Solana. Last settlement verified on Base mainnet.
Three steps, fully automated by any x402 client library. Your agent never sees a signup form.
Plain [OI]-compatible chat completion request. No Authorization header needed.
POST /v1/chat/completionsThe server estimates your input tokens plus your max_tokens at the model price and returns the exact amount.
402 + payment-required headerYour client signs a USDC transfer on Base (or Solana), retries with the PAYMENT header, and the model responds. Settlement happens after the answer. Failed calls are never charged.
200 + payment-response receiptThe paid surface is [OI]-compatible plus an Anthropic-format alias. Both share the same x402 flow.
stream: true.
| Field | Required | Description |
|---|---|---|
model | required | Model id from the catalog above, e.g. glm-5.3. Omit to get a floor quote. |
messages | required | Array of {role, content}, same as the [OI] schema. |
max_tokens | required | Your output budget. The quote uses it directly, so set it tight for cheaper calls. |
stream | optional | true for SSE streaming. Settlement happens after the stream completes. |
| Code | Meaning | Body |
|---|---|---|
| 402 | Spending cap set, payment required | quote with your USD cap, token estimate, and per-1M prices (scheme upto). The payment-required response header carries the x402 accepts requirements. |
| 200 | Paid and answered | Standard chat completion. The payment-response header carries the on-chain settlement receipt with the tx hash. |
| 400 | Payment rejected | The payment did not match the requirements (wrong amount, network, or asset) or the payload was malformed. Fetch a fresh 402 and retry. |
| 404 | Unknown model | The model id is not in the catalog or is disabled. See GET /v1/models. |
| 502 | Upstream failed | The model call failed. The payment is cancelled automatically, you are not charged. |
anthropic-version if your client sends it.
Every model is probed once a minute with a real completion call.