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

# Pay any API

> Pay any API in USDC over x402 — per call, gasless, no signup, no API keys.

**Agent Payments** is x402 on Sui: the gateway at [`mpp.t2000.ai`](https://mpp.t2000.ai) serves every major AI + data API as paid HTTP endpoints your agent pays in USDC. No signup, no API keys, no subscription — pay per call, gasless, settled on Sui in \~400ms.

<CodeGroup>
  ```bash CLI theme={null}
  npm install -g @t2000/cli
  t2 init    # create a wallet
  t2 fund    # transfer USDC to the printed address — $1 covers ~50 LLM calls

  t2 pay https://mpp.t2000.ai/openai/v1/chat/completions \
    --data '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello, world!"}]}'
  ```

  ```text Paste into your agent theme={null}
  Use t2 services to find an image-generation API, pay it with t2 pay to generate a hero image of a mountain lake at dawn, and show me the image URL and what it cost.
  ```
</CodeGroup>

That's a paid GPT-4o call for \$0.02. The 402 challenge, payment, and retry are automatic. (Agent not set up yet? [Use from your agent](/use-from-your-agent) is one paste per client.)

Browsing is free — no wallet, no account:

```bash theme={null}
t2 services search "image"                         # find payable endpoints
t2 services inspect https://mpp.t2000.ai/openai    # exact prices + schemas
```

***

## How it works

```
Client            Gateway (mpp.t2000.ai)         Upstream
  │  ── POST /openai/v1/chat/completions ──→  │
  │     (no Payment header)                    │
  │  ←── HTTP 402 + payment challenge ──      │
  │     (price, intent, recipient, expiry)    │
  │                                            │
  │  ── sign USDC tx + retry with Payment ─→  │
  │     header                                 │
  │                                       ──→  │  upstream call
  │                                       ←──  │  response
  │  ←── 200 + body ──                        │
```

USDC transfers go through `0x2::balance::send_funds` — **gasless** via the Sui foundation sponsor. Your agent never needs SUI.

<Note>
  **No charge on failure.** Payment settles on-chain *before* the upstream runs, and if the upstream then fails, the gateway auto-refunds your USDC in the same request — net-zero, on-chain-verifiable. You only pay for calls that succeed.
</Note>

***

## What's payable

LLMs, image generation, speech + transcription, search, scraping, weather, maps, crypto + stock data, translation, code execution, email, push — even physical mail. The live catalog is the source of truth:

| Catalog        | URL                                                              |
| -------------- | ---------------------------------------------------------------- |
| JSON           | [`mpp.t2000.ai/api/services`](https://mpp.t2000.ai/api/services) |
| Agent-readable | [`mpp.t2000.ai/llms.txt`](https://mpp.t2000.ai/llms.txt)         |
| OpenAPI 3.1    | [`mpp.t2000.ai/openapi.json`](https://mpp.t2000.ai/openapi.json) |
| Web            | [`mpp.t2000.ai/services`](https://mpp.t2000.ai/services)         |

### OpenAI-compatible inference

Every chat provider speaks the **OpenAI Chat Completions shape** — swap the path, keep the body. All \$0.02/call:

| Provider | Endpoint                        |
| -------- | ------------------------------- |
| OpenAI   | `/openai/v1/chat/completions`   |
| Groq     | `/groq/v1/chat/completions`     |
| DeepSeek | `/deepseek/v1/chat/completions` |
| Together | `/together/v1/chat/completions` |
| Mistral  | `/mistral/v1/chat/completions`  |

`embeddings`, `images/generations`, `audio/speech`, and `audio/transcriptions` are mirrored too. The stock OpenAI SDK can't sign a 402 — route the call through `t2 pay` or [`agent.pay()`](/agent-sdk) and parse the verbatim OpenAI response as usual.

<Note>
  **Private inference, no key.** t2000's own [Private Inference](/private-inference) is a first-party x402 service — open + confidential (GPU-TEE) models, same pay-per-call flow.
</Note>

***

## Prices

Set per endpoint by each service; the live price is always in the [catalog](https://mpp.t2000.ai/llms.txt) and the [OpenAPI spec](https://mpp.t2000.ai/openapi.json) (`x-payment-info.price`). Ballpark: LLM calls $0.02–0.10 · images $0.02–0.40 · transcription $0.02–0.10 · search / scraping / code execution $0.02–0.20 · physical mail \$2–3.

Always pass `--max-price <USD>` (default \$1.00) so a misconfigured endpoint can't drain the wallet.

***

## Three ways to pay

| Surface | Call                                              | Reference                               |
| ------- | ------------------------------------------------- | --------------------------------------- |
| CLI     | `t2 pay <url> --data '…' --max-price 0.10`        | [CLI reference](/cli-reference)         |
| MCP     | `t2000_pay` + `t2000_services` from any AI client | [Agent Wallet → MCP](/agent-wallet#mcp) |
| SDK     | `agent.pay({ url, body, maxPrice })`              | [Agent SDK](/agent-sdk)                 |

<Note>
  **Lead a fresh session with "use t2 services."** In a brand-new chat, naming an external API directly ("generate an image via fal.ai") makes some AI clients reply that they can't reach it — they never consider the wallet. *"Use t2 services to generate a hero image via fal.ai"* loads the `t2000_*` tools from the first message; after one tool call the session routes correctly without the prefix.
</Note>

Binary output (TTS audio, image bytes, PDFs) never streams back raw — the gateway hosts the artifact and returns `{ url, contentType, sizeBytes }`, keeping bytes out of your agent's context.

***

## Links

* [Sell your API on Sui](/sell-your-api) — charge for your own endpoint (the sell side of this page)
* [`mpp.t2000.ai`](https://mpp.t2000.ai) — live gateway · [activity feed](https://mpp.t2000.ai/activity)
* [`suimpp.dev`](https://suimpp.dev) — protocol spec + reference implementations
