> For the complete documentation index, see [llms.txt](https://docs.vapinetwork.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vapinetwork.ai/call/for-buyers-and-agents/pay-with-vapi.md).

# Pay with vapi

The vapi client searches, inspects, and pays x402 APIs from a local capped account through the CLI, MCP, or SDK.

{% hint style="info" %}
Call is launching. The console does not serve Call yet; this page describes the launch flow.
{% endhint %}

This page is for buyers and developers who want to search, inspect, and pay from a local account through the CLI, MCP, or SDK.

## Set up the client

```bash
npm i -g vapi-network
vapi init
vapi fund
```

Set spend caps on a wallet before you pay:

```bash
vapi accounts caps <name> --per-call <usd> --per-day <usd>
```

## Search, inspect, and pay

```bash
vapi search "<query>"
vapi inspect <ref>
vapi pay <ref> --max <usd>
```

Select an inspected endpoint and supply the request inputs it requires:

| Payment option          | What it supplies                      |
| ----------------------- | ------------------------------------- |
| `--endpoint <name>`     | Selects an endpoint from the listing. |
| `--method <method>`     | Sets the HTTP method.                 |
| `--body <json>`         | Supplies the request body as JSON.    |
| `--content-type <type>` | Sets the request content type.        |

```bash
vapi pay <ref> --endpoint <name> --method <method> --body '<json>' --content-type <type> --max <usd>
```

In Claude, Cursor, or Codex, use the same flow through `call.search`, `call.inspect`, and `call.pay`. Set `maxPriceUsd` on the payment tool.

The client keeps the wallet and receipts on your machine. It applies the wallet's spend caps before it signs.

The public client supports exact USDC payments on Base mainnet and Arc mainnet. Arc Testnet remains opt-in. See [Networks and schemes](/call/reference/networks-and-schemes.md) to enable Arc mainnet.

Linked agents pay Call APIs from their own local account within the caps set with `vapi accounts caps`. They hold rights on your account, never on your wallet. Read more in [Agents](https://docs.vapinetwork.ai/agents/).

## Use the SDK

Create an account-bound client with your local account name or an injected payment account. Search with a query string and optional `network` and `includeUnverified` options. Inspect the chosen reference before paying.

```ts
import { createVapiClient } from "vapi-network";

const client = await createVapiClient({ account });
const matches = await client.call.search(query, { includeUnverified: false });
const details = await client.call.inspect(ref);
const result = await client.call.pay({
  id: ref,
  endpoint,
  method,
  body,
  contentType,
  maxPriceUsd,
});
```

Supply the variables from your account selection, search, and inspected endpoint. The payment input accepts `id` for a listing or `url` for a concrete endpoint. Set `maxPriceUsd` to cap the payment, and supply `endpoint`, `method`, `body`, and `contentType` as needed. It also accepts `network` and `expectedPayTo` to constrain the live offer.

## Next

* [CLI reference](https://docs.vapinetwork.ai/reference/cli/cli-reference)
* [Use vAPI in Claude, Cursor and Codex](https://docs.vapinetwork.ai/agents/in-your-ai-app/use-vapi-in-claude-cursor-and-codex)
* [Receipts and retries](/call/for-buyers-and-agents/receipts-and-retries.md)

Checked on 2026-10-02.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.vapinetwork.ai/call/for-buyers-and-agents/pay-with-vapi.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
