# Pay for AI model requests one at a time

Onchain Router gives you one provider-neutral interface for text generation, image generation, text to speech, and speech to text. You approve a request-specific spending limit in your wallet and receive the result only after the result, final charge, and receipt are safely stored.

> Payments use USDC on Base mainnet. Any wallet with a valid x402 payment authorization may pay; no payer registration is required.

## Choose your path

- **Choose a capability:** compare all [five paid AI endpoints and four free discovery endpoints](https://llm.agenticfi.wtf/docs/endpoints).
- **Make your first request:** follow the [step-by-step guide](https://llm.agenticfi.wtf/docs/quickstart) with a dedicated wallet that holds only a small amount of USDC.
- **Connect an autonomous agent:** install the [portable Agent Skill](https://llm.agenticfi.wtf/docs/agents) and set a hard spending limit in atomic USDC units.
- **Connect a backend service:** start with the generated guide for [Chat Completions](https://llm.agenticfi.wtf/docs/api/chat-completions), [Messages](https://llm.agenticfi.wtf/docs/api/messages), [Image Generations](https://llm.agenticfi.wtf/docs/api/image-generations), [Text to Speech](https://llm.agenticfi.wtf/docs/api/audio-speech), or [Speech to Text](https://llm.agenticfi.wtf/docs/api/audio-transcriptions).

## What stays familiar

Text requests use the familiar `model`, `messages`, `max_tokens`, and `stream` fields. Image requests use `model`, `prompt`, `n`, `image_size`, `aspect_ratio`, and `response_format`; 1K and 1:1 are the defaults, and the selected model must advertise the requested values. Text to speech uses JSON with `model`, `input`, `voice`, and `response_format`. Speech to text accepts one bounded MP3 either as standard multipart form data or as canonical Base64 JSON for agents that cannot construct file uploads. Choose an available capability, endpoint, and model from `GET /v1/models`; choose a public voice alias from `GET /v1/audio/voices`.

## What x402 adds

The first unpaid request returns Hypertext Transfer Protocol (HTTP) status 402 with the payment network, asset, recipient, expiry time, and maximum amount. An official x402 buyer signs the authorization locally and retries the identical request. After success, inspect the `PAYMENT-RESPONSE` header, the `X-Receipt-ID` header, and the receipt link.

You do not need an API subscription, and Onchain Router never stores your wallet key. Never send a private key, model-provider key, or custom provider address in the request body.
