> For the complete documentation index, see [llms.txt](https://fourohtwo.gitbook.io/fourohtwo-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fourohtwo.gitbook.io/fourohtwo-docs/agents/quickstart.md). Agents can also search and read this documentation through its [MCP server](https://fourohtwo.gitbook.io/fourohtwo-docs/~gitbook/mcp).

# Quickstart

Make your agent's first paid call in about five minutes.

{% hint style="success" %}
**No terminal?** Open [Create an agent wallet](https://fourohtwo.xyz/agents/new) on the website. It makes the wallet in your browser, links it to your account with spending limits, lets you fund it from your own wallet, and gives you a ready-to-paste config for Claude or Cursor.
{% endhint %}

The steps below do the same thing by hand.

## 1. Create a wallet for the agent

Use a fresh wallet just for the agent, never your main one. Any EVM private key works.

```sh
node -e "console.log(require('viem/accounts').generatePrivateKey())"
```

## 2. Fund it

Send a few USDG on Robinhood Chain or USDC on Base to the agent's address. It pays with whichever it holds, and it doesn't need ETH: the gas is paid when the payment settles.

{% hint style="info" %}
If the agent holds ETH or another token instead, see [Pay with any token](https://fourohtwo.gitbook.io/fourohtwo-docs/agents/pay-with-any-token.md).
{% endhint %}

{% hint style="success" %}
Want to try first? A new wallet gets 5 free calls on Fourohtwo's own APIs, with nothing in it. The SDK uses them before paying. See [Free trial calls](https://fourohtwo.gitbook.io/fourohtwo-docs/reference/payment-flow.md#free-trial-calls).
{% endhint %}

## 3. Make a paid call

```sh
npm install fourohtwo
```

```ts
import { createPayer } from "fourohtwo";

const pay = createPayer({
  privateKey: process.env.AGENT_KEY,
  maxPerCallUsd: "0.05",
});

const res = await pay("https://fourohtwo.xyz/x/rug-check?address=0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168");
console.log(res.status, await res.json());
```

`pay()` works like `fetch()`. On a 402 it uses a free trial call if the API offers one, otherwise it signs the payment and retries once.

## 4. Set spending rules

Link the agent to your account on [fourohtwo.xyz/agents](https://fourohtwo.xyz/agents) and set a daily limit. See [Spending rules](https://fourohtwo.gitbook.io/fourohtwo-docs/agents/spending-rules.md).

## Next

* Use it from Claude, Cursor or Codex with the [MCP server](https://fourohtwo.gitbook.io/fourohtwo-docs/agents/mcp-server.md).
* Find more APIs to call: [Find APIs](https://fourohtwo.gitbook.io/fourohtwo-docs/agents/find-apis.md).
* Start from a ready-made set: [Agent kits](https://fourohtwo.gitbook.io/fourohtwo-docs/agents/agent-kits.md).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://fourohtwo.gitbook.io/fourohtwo-docs/agents/quickstart.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
