# x402-apis > Pay-per-request AI chat API. No accounts, no API keys. Pay as you go with > USDC on Base via x402 (ERC-402) — HTTP 402 is the checkout. - Home: https://x402-apis.archlinuxonthinkpad.workers.dev - Payment protocol: x402, "exact" scheme, $0.001 USDC per request on eip155:8453 (Base mainnet USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) to 0x25a47702b2852D82F4cc6DF13a7343213d9a2ECa. No subscription. Settled by facilitator; payer needs only USDC (gas is sponsored). - How an agent pays: send a normal request; if a 402 is returned with a PAYMENT-REQUIRED header, sign and retry using an x402 client (e.g. @x402/fetch + @x402/evm/exact/client, @x402 Python, or any x402 wallet). Unpaid = 402. Paid = 200 with an OpenAI-style chat completion. - Models: `@cf/meta/llama-3.1-8b-instruct-fp8`, `@cf/meta/llama-3.2-3b-instruct`, `@cf/meta/llama-3.3-70b-instruct-fp8-fast`, `@cf/qwen/qwen3.8-27b` (default `llama3.1-8b`). ## Endpoints - GET / — service manifest (machine-readable index) - GET /models — available models and price - GET /stats — usage and settled revenue - POST /api/chat — PAID. Body: {"model": optional, "messages": [{"role","content"}], "stream": false}; returns OpenAI-style { id, choices:[{message:{content}}], usage }. - GET /llms-full.txt — full plain-text docs for this service. - GET /llms.txt — this index. ## Request shape (POST /api/chat) ```json { "model": "llama3.1-8b", "messages": [{ "role": "user", "content": "hi" }] } ``` ## Error codes - 402 Payment required — retry with an x402 payment signature. - 400 invalid_json / messages_required / invalid_message - 501 streaming_not_supported (stream: true not enabled) - 502 ai_error ## Pricing - Every POST /api/chat costs $0.001 in USDC on eip155:8453. One request = one payment. - There is no API key, no signup, no subscription. Pay only when you call. ## Payment details Resource server enforces the x402 ("exact") scheme: - network: eip155:8453 - amount: 1000 atomic units = $0.001 USDC (6 decimals) - asset (USDC on Base mainnet): 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 - payTo: 0x25a47702b2852D82F4cc6DF13a7343213d9a2ECa - facilitator: https://v2.facilitator.mogami.tech The payer signs an EIP-3009 transferWithAuthorization; the facilitator sponsors gas, so the payer needs only USDC (no ETH). Settlement is on-chain on Base mainnet. Full protocol spec: https://docs.x402.org Use an x402 client to automate paying: ```js import { wrapFetchWithPayment } from "@x402/fetch"; import { x402Client } from "@x402/core/client"; import { registerExactEvmScheme } from "@x402/evm/exact/client"; import { privateKeyToAccount } from "viem/accounts"; const client = new x402Client(); registerExactEvmScheme(client, { signer: privateKeyToAccount("0x..."), schemeOptions: { 8453: { rpcUrl: "https://mainnet.base.org" } } }); const fetchWithPay = wrapFetchWithPayment(fetch, client); const res = await fetchWithPay("https://x402-apis.archlinuxonthinkpad.workers.dev/api/chat", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ messages: [{ role: "user", content: "hello" }] }), }); ```