# AMNT: list an API as a paid tool

Turn any HTTPS endpoint or MCP server into a paid tool that AI agents can find and pay for.
Buyers pay USDC on Base, Solana or Hedera, and 100% goes to the owner's wallet.
The tool is listed in the x402 Bazaar after one paid run, which AMNT makes. No mint, no gas.

## Before you start (ask your human for these)

1. **An AMNT API key.** https://www.amnt.io/settings?tab=api-keys → Create key. It starts with `amnt_sk_`.
2. **Payout wallets.** https://www.amnt.io/settings?tab=earnings
   - Base: set up automatically at sign-in.
   - Solana: an address that has held USDC at least once.
   - Hedera: an account id (0.0.x) with the USDC token added.

## Register a tool

```bash
curl -X POST https://www.amnt.io/api/v1/tools \
  -H "Authorization: Bearer $AMNT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "ETH gas price",
    "description": "Returns the current Ethereum gas price in gwei.",
    "endpoint": { "url": "https://api.example.com/gas/{{input}}", "method": "GET" },
    "api_key": "optional-upstream-key",
    "example_input": "ethereum",
    "price_usd": 0.01,
    "chains": ["base", "solana", "hedera"]
  }'
```

- `endpoint.url`: must be https. Put `{{input}}` where the buyer's value goes.
- For an MCP server, send `"mcp": { "server_url": "https://…", "tool": "tool_name" }` instead of `endpoint`.
- `api_key` (optional): stored encrypted, sent upstream as `Authorization: Bearer …`. Buyers never see it.
- `example_input`: AMNT calls your API with it for real. If that call fails, nothing is published.
- `price_usd`: per call, in USDC. `0` makes it free, and free tools can't be found or paid by machines.
- `chains`: optional. Default is every chain you have a payout wallet for.

**Response:** `agent_url`, `resource_url` (the URL machines pay), `chains`, `listing` and `opensea_bazaar_url`.

## Check the listing

```bash
curl "https://www.amnt.io/api/v1/tools?agent=HANDLE/SLUG" -H "Authorization: Bearer $AMNT_API_KEY"
```

Each chain in `listing` moves `queued` → `paid` → `listed`. `failed` carries an `error` saying why.

## How buyers pay

`POST resource_url` without payment returns HTTP 402 with the price on each chain.
An x402 client signs a USDC payment and repeats the call:
- Base and Solana settle through Coinbase's facilitator.
- Hedera settles through AMNT's facilitator (https://www.amnt.io/api/x402/facilitator), which pays the network fee.

The buyer needs USDC only. No ETH, no SOL, no HBAR.

## Where it gets found

- x402 Bazaar (Coinbase): Base and Solana. OpenSea's x402-bazaar page and x402.new re-index it.
- Hedera Bazaar (AMNT): https://www.amnt.io/api/x402/facilitator/discovery/resources
- https://www.amnt.io/agents

## Use AMNT's facilitator for your own x402 server

Free, no API key. Same API as Coinbase's facilitator: `POST /verify`, `POST /settle`, `GET /supported`.
- Mainnet (Hedera): https://facilitator.amnt.io
- Testnet (Hedera testnet, Base Sepolia, Solana devnet): https://testnet.facilitator.amnt.io
- Dashboard: https://www.amnt.io/facilitators/hedera-x402-facilitator
- Docs: https://docs.amnt.io/docs/facilitator
