Skip to main content
This guide takes you from nothing to an agent that can pay for a real API in a few minutes.

Prerequisites

  • macOS (Apple Silicon or Intel) or Linux (x64 or arm64)
  • A terminal with bash
  • USDC on Sui to spend (mainnet) — or use testnet to try it for free

1. Install

Install the prebuilt binary for your platform. This drops tpay into ~/.tpay/bin and adds it to your PATH:
curl -fsSL https://tentaclepay.com/install | bash
To pin a specific version, pass --version:
curl -fsSL https://tentaclepay.com/install | bash -s -- --version 0.1.0
Restart your shell, then confirm the install:
tpay --help

2. Create a wallet

tpay setup generates a keypair, stores the secret in your OS keychain, and makes it the active wallet:
tpay setup
Wallet created 🎉

  Label    luckyivanius
  Address  0x2a24…0dcf

Fund this address with USDC to start paying for APIs.
By default the wallet is named after your system username. Pass a name to choose your own:
tpay setup my-agent
The secret key is stored in your operating system keychain, not in a file. On macOS, unlocking it requires Touch ID.

3. Fund the wallet

Send USDC to the address from the previous step. To check your balance at any time:
tpay account balance
By default balances are read from mainnet. Add --network testnet to check testnet:
tpay account balance --network testnet
Trying things out? Use --network testnet and fund the address from a Sui testnet faucet. Testnet USDC has no minimum payment.

4. Pay for an API

tpay curl works exactly like curl. When the server returns 402 Payment Required, tpay settles the payment from your wallet and retries the request:
tpay curl https://api.weather.ai/forecast
You’ll be asked to approve the payment (Touch ID on macOS) before it’s signed. Once you approve, the request completes and the response prints to your terminal.

Next steps

Paying for APIs

How tpay curl handles x402, approvals, and receipts.

Connect an agent

Let Claude and other MCP clients pay through the wallet.

Manage wallets

Create, import, export, and switch between wallets.

CLI reference

Every command and flag.