x402 Chat Completions

The OpenAPI 3.1 document is the full description, including schemas:

https://router.inference.ai.exchange/v1/openapi.json

POST /x402/v1/chat/completions

Buy one chat completion with USDC, with no account.

The payment is an x402 payment in USDC on Base, and it is the only credential. The body is an OpenAI chat completion request, and its model names the model. With no payment, the answer is 402 with the price. Send the same body again with the payment in PAYMENT-SIGNATURE. The paid amount is the price cap of the call. The payment settles only when the call succeeds.

The body cannot stream, and max_tokens is 8,192 at most (1,024 when absent). The exchange ignores the exchange object of the body.