x402 · pay per request in USDC
x402 LLM inference: buy open-model inference per request
No account and no API key. Your agent sends an OpenAI-style chat request, gets a 402 quote, pays it in USDC on Base or Solana, and gets the completion back. From $0.001 per call.
How x402 works here
- POST an OpenAI-compatible chat body to
https://synap402.com/api/billing/x402/chat/completionswith no payment header. - The answer is
402 Payment Requiredwith the price of that exact request: amount, token, network and our receiving address, in the x402 v2 format. - Your x402 client signs the quote and sends the same request again with a
PAYMENT-SIGNATUREheader. You get the completion in the same response.
The live 402 quote
This is what the endpoint answers for the request below, with no payment attached. Captured 2026-11-27 09:41 UTC.
{
"x402Version": 2,
"accepts": [
{
"scheme": "exact",
"network": "eip155:8453",
"amount": "1000",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payTo": "0x1f291B5B41B6E5ffbDc4f2ad8b5F45811438184a"
},
{
"scheme": "exact",
"network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
"amount": "1000",
"asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"payTo": "VXbuAtfujvaARnzCv38PehXSHA9xccXiQGHvqUBg2YN"
}
],
"quote": {
"model": "qwen3-coder-30b",
"amountUsd": 0.001,
"maxOutputTokens": 256,
"minimumChargeUsd": 0.001
}
}
Try it with curl
curl -i https://synap402.com/api/billing/x402/chat/completions \
-H 'content-type: application/json' \
-d '{"model":"qwen3-coder-30b","max_tokens":256,"messages":[{"role":"user","content":"Write a Python function that reverses a string"}]}'
Nothing is charged: without a payment header you only get the quote.
Pay the quote from code
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
const signer = privateKeyToAccount(process.env.PRIVATE_KEY);
const client = new x402Client().register("eip155:8453", new ExactEvmScheme(signer));
const pay = wrapFetchWithPayment(fetch, client);
const r = await pay("https://synap402.com/api/billing/x402/chat/completions", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
model: "qwen3-coder-30b",
messages: [{ role: "user", content: "Write a Python function that reverses a string" }],
max_tokens: 256,
}),
});
console.log((await r.json()).choices[0].message.content);
Python, the SDK versions that read this quote, and the full setup: x402 setup guide.
Models you can buy per request
| Model | Input / output per 1M tokens | Context | x402 endpoint |
|---|---|---|---|
gpt-oss-20bgpt-oss-20b | $0.017 / $0.085 | 131,072 | /x402/models/gpt-oss-20b |
Gemma 4 26Bgemma-4-26b-a4b-it | $0.04 / $0.21 | 131,072 | main endpoint |
Qwen3 Coder 30Bqwen3-coder-30b | $0.0675 / $0.27 | 131,072 | /x402/models/qwen3-coder-30b |
Qwen3 30B A3B Instruct 2507qwen/qwen3-30b-a3b-instruct-2507 | $0.0813 / $0.2438 | 262,144 | main endpoint |
GLM 5.3 Flashz-ai/glm-5.3-flash | $0.0915 / $0.2815 | 1,048,576 | main endpoint |
DeepSeek V4 Flashdeepseek/deepseek-v4-flash | $0.136 / $0.2758 | 1,048,576 | main endpoint |
Qwen3 VL 30Bqwen/qwen3-vl-30b-a3b-instruct | $0.14 / $0.55 | 262,144 | /x402/models/qwen3-vl-30b-a3b-instruct |
GLM 5.3z-ai/glm-5.3 | $0.2519 / $1.9703 | 1,048,576 | main endpoint |
Muse Glimmer 30Bmeta/muse-glimmer-30b | $0.28 / $1.10 | 131,072 | /x402/models/muse-glimmer-30b |
Dolphin Mistral 24Bcognitivecomputations/dolphin-mistral-24b-venice-edition | $0.34 / $1.52 | 128,000 | main endpoint |
DeepSeek V4 Prodeepseek/deepseek-v4-pro | $1.25 / $2.1814 | 1,048,576 | main endpoint |
USD per 1M tokens, read from /v1/models, which is what the gateway bills; they refresh when this page loads. Any of these ids works on the main endpoint. Models with their own endpoint are also listed one by one in x402 discovery. Full catalogue: all models.
What you get
- The same request body as the keyed API: streaming, tool calling and JSON output work the same way
- USDC on Base or Solana, priced per request, with a minimum of $0.001 per paid call
- We read every settlement back from the chain before answering, so a payment counts only once it has really landed
- First call free for a new wallet, on models we run on our own GPUs, up to 512 output tokens, not streaming, within a daily allowance
- Prefer a key? The same models are on the OpenAI-compatible API with credits
Find us from an agent
- x402 discovery:
/x402/discovery/resourcesand/.well-known/x402 - OpenAPI:
/openapi.json· for LLMs:/llms.txt
Questions
What is x402?
x402 is an open payment standard built on the HTTP 402 Payment Required status code. A server answers an unpaid request with a 402 and the exact price; the client signs a stablecoin payment and sends the same request again.
Do I need an account or an API key to buy inference with x402?
No. The wallet that pays is the account. There is no sign-up, no email and no API key.
Which networks and tokens can I pay with?
USDC on Base or Solana. Every 402 quote lists the networks it accepts, the amount, the token and the receiving address.
How much does one call cost?
The quote is priced per request from the model’s per-token price, with a minimum of $0.001 per paid call. Prices per 1M tokens are in the table above.