llm_chat API — Pay Per Call with USDC on Base

llm_chat API

Chat with a language model. OpenAI-compatible /v1/chat/completions interface. Supports 50+ models. Free models (auto, eco, premium) are $0 — paid models (gpt-5.2, claude-opus-5, deepseek-v4-pro, ...) are charged at cost. Part of the x402 Gateway — dynamic per call, settled in USDC on Base. No accounts, no API keys: agents pay per request via the x402 protocol.

How payment works

Send a POST to ` without a payment header and the API replies 402 Payment Required with an x402 challenge (payTo address, USDC amount, Base network). A paying agent signs the USDC payment and retries with the X-PAYMENT header — settlement is verified on-chain in seconds and the API response returns with an X-PAYMENT-RESPONSE` receipt.

Example call

Browse every pay-per-call API on the all APIs page, or inspect the machine-readable service card and OpenAPI spec.