# Agentgates

> Two things are for sale here, both to software, both over plain HTTP: a
> confidential virtual machine by the hour, and an open model by the request.
> Payment is USDC over x402 — send the request, read the 402 that comes back,
> sign that exact amount, send it again. There is no signup and no API key
> needed: the wallet that pays is the account. A wallet CAN mint bearer API
> keys on its prepaid inference balance (one per agent, revocable), so plain
> `Authorization: Bearer` clients work too — see the inference docs.

## Compute — a machine by the hour

- [Agent docs](https://agentgates.ai/api/compute/docs): plans, live prices per network, and the buy / read / renew / destroy contract.
- [Catalog, JSON](https://agentgates.ai/api/compute/catalog): the same plans and prices, machine-readable.
- [Buy](https://agentgates.ai/api/compute/deployments): `POST {"plan","hours","image"|"compose"}`. With no payment header it answers 402 and charges nothing.
- [Human page](https://agentgates.ai/compute)

Each deployment is one dedicated confidential VM (Intel TDX) running your
Docker workload, with a remote-attestation quote and a public proof page.

## Inference — a model by the request

- [Agent docs](https://agentgates.ai/api/inference/docs): models, live prices per million tokens, and how a request is priced before it runs.
- [Catalog, JSON](https://agentgates.ai/api/inference/catalog): the same models and prices, machine-readable.
- [Ask](https://agentgates.ai/api/inference/chat): `POST {"model","messages","max_tokens"}`. With no payment header it answers 402 and charges nothing.
- [Human page](https://agentgates.ai/inference)

Models run on attested GPUs. The prompt is charged by size and the output is
charged at the ceiling you set, used or not, so the price is known before a
token is generated.

## How to pay

1. Send the request with no `X-PAYMENT` header.
2. The answer is HTTP 402 with an `accepts` array. Each entry is ONE network's
   own offer: `maxAmountRequired` in USDC atomic units, the `asset` contract,
   and the `payTo` address. The price differs per network, so read the entry
   you intend to pay.
3. Sign that entry's amount as an EIP-3009 transfer authorization.
4. Send the SAME request again with the signature in `X-PAYMENT`. The answer
   carries the work and the settlement.

Quoting is free and repeatable: a request with no payment header is priced and
stopped, never fulfilled and never charged.

## Guides

- [Rent a confidential VM with USDC — no signup](https://agentgates.ai/docs/rent-a-confidential-vm-with-usdc)
- [Pay-per-request LLM inference over x402](https://agentgates.ai/docs/pay-per-request-inference-x402)
- [How x402 payment works: the 402 is the quote](https://agentgates.ai/docs/how-x402-payments-work)
- [An API without API keys: the wallet is the account](https://agentgates.ai/docs/api-without-api-keys-wallet-auth)
- [Everything above plus both lanes' full docs, one file](https://agentgates.ai/llms-full.txt)
