> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tentaclepay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get started

> Install tpay, create a wallet, and pay for your first x402 API.

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`:

```sh theme={null}
curl -fsSL https://tentaclepay.com/install | bash
```

To pin a specific version, pass `--version`:

```sh theme={null}
curl -fsSL https://tentaclepay.com/install | bash -s -- --version 0.1.0
```

Restart your shell, then confirm the install:

```sh theme={null}
tpay --help
```

## 2. Create a wallet

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

```sh theme={null}
tpay setup
```

```text theme={null}
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:

```sh theme={null}
tpay setup my-agent
```

<Note>
  The secret key is stored in your operating system keychain, not in a file. On macOS, unlocking it requires Touch ID.
</Note>

## 3. Fund the wallet

Send USDC to the address from the previous step. To check your balance at any time:

```sh theme={null}
tpay account balance
```

By default balances are read from mainnet. Add `--network testnet` to check testnet:

```sh theme={null}
tpay account balance --network testnet
```

<Tip>
  Trying things out? Use `--network testnet` and fund the address from a [Sui testnet faucet](https://faucet.sui.io). Testnet USDC has no minimum payment.
</Tip>

## 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:

```sh theme={null}
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

<CardGroup cols={2}>
  <Card title="Paying for APIs" icon="credit-card" href="/wallet/paying-for-apis">
    How `tpay curl` handles x402, approvals, and receipts.
  </Card>

  <Card title="Connect an agent" icon="robot" href="/wallet/agents">
    Let Claude and other MCP clients pay through the wallet.
  </Card>

  <Card title="Manage wallets" icon="wallet" href="/wallet/accounts">
    Create, import, export, and switch between wallets.
  </Card>

  <Card title="CLI reference" icon="terminal" href="/wallet/cli-reference">
    Every command and flag.
  </Card>
</CardGroup>
