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

# x402 Payments

> How payment works with the Social Intel API — no API keys, just USDC.

Social Intel API uses the [x402 protocol](https://www.x402.org/) for payment. Instead of API keys or subscriptions, you pay per request in USDC. Your x402 client library handles payment automatically.

## How it works

```mermaid theme={null}
sequenceDiagram
    participant Client
    participant API as Social Intel API
    participant Chain as Base / Solana

    Client->>API: GET /v1/search?category=Fitness
    API-->>Client: 402 Payment Required (amount, wallet, chain)
    Client->>Chain: Transfer USDC (automatic)
    Chain-->>Client: Transaction hash
    Client->>API: GET /v1/search?category=Fitness + payment proof
    API->>Chain: Verify payment
    API-->>Client: 200 OK (search results)
```

1. You send a request to the API
2. The API responds with HTTP 402 and payment details
3. Your x402 client automatically pays the specified USDC amount
4. The client retries the request with a payment proof header
5. The API verifies payment on-chain and returns results

## Supported chains

| Chain  | Asset | Network |
| ------ | ----- | ------- |
| Base   | USDC  | Mainnet |
| Solana | USDC  | Mainnet |

## Wallet setup

You need a wallet with USDC on Base or Solana. Each request costs $0.10–$0.26 plus \~\$0.001 in gas.

### Base (EVM) — fastest path

**Option A: Buy USDC directly on Base**

1. Create a [Coinbase](https://coinbase.com) account (or use [Coinbase Wallet](https://wallet.coinbase.com))
2. Buy USDC and select **Base** network at checkout — no bridging needed
3. Export your private key from MetaMask/Coinbase Wallet
4. Pass it to your x402 client

**Option B: Bridge from Ethereum**

1. Have USDC on Ethereum mainnet
2. Bridge to Base via [bridge.base.org](https://bridge.base.org)

<Note>Keep at least $1 of ETH on Base for gas. Each x402 payment uses ~$0.001 in gas.</Note>

### Solana

1. Get a Solana wallet private key (base58 format)
2. Buy USDC on Solana via [Coinbase](https://coinbase.com) or [Jupiter](https://jup.ag)
3. Pass the private key to your x402 client

## Dynamic pricing

The price depends on how many results you request:

| `limit` | Price  |
| ------- | ------ |
| 1-20    | \$0.10 |
| 50      | \$0.16 |
| 100     | \$0.26 |

**Formula:** `price = $0.10 + max(0, limit - 20) * $0.002`

The price is included in the 402 response headers, so your client always knows the exact cost before paying.

## No API keys needed

With x402, payment *is* authentication. There are no API keys to manage, no OAuth flows, no rate limit tiers. Any wallet with USDC can use the API immediately.

## Using AgentCash (easiest)

If you're building with AI agents, [AgentCash](https://agentcash.dev) handles x402 payments for you:

```bash theme={null}
npx agentcash@latest discover https://socialintel.dev
```

AgentCash manages wallet setup, USDC funding, and payment — so your agent just calls the API.
