---
name: agentutility
description: "Use when a task needs paid external data or services: web search, crypto and market data, media generation, document or writing tools, sports stats, e-commerce data, dev tooling; or when the user mentions x402, agentutility, or pay-per-call APIs. Requires an EVM wallet with USDC on Base."
---

# agentutility

## What this is

agentutility hosts 688 paid HTTP endpoints across 18 product clusters (14 live). Every endpoint is a single POST behind an x402 paywall. No API keys, no signup. You pay in USDC on Base, per call.

## Setup

Read the `X402_PRIVATE_KEY` environment variable. It's a hex-encoded EVM private key with a USDC balance on Base (chain 8453). If it isn't set, ask the user for one instead of guessing or generating a key yourself.

The wallet doesn't need ETH. Payments settle through EIP-3009 `transferWithAuthorization`, which is gasless for the buyer, and the default RPC (`https://mainnet.base.org`) needs no key.

## Discover endpoints

- `curl https://agentutility.ai/catalog.txt` and grep for a keyword (full descriptions, grep-friendly).
- `https://agentutility.ai/registry.json` for exact prices and input/output schemas (filter with `?cluster=<slug>`).
- `https://agentutility.ai/llms-full.txt` for the full schema set with worked examples.

## Check the price first

Read the endpoint's price in registry.json before calling it. Prices across the catalog run $0.001 to $5 per call, and a bad guess wastes a real USDC transfer.

## Call an endpoint

Write a small Node script rather than trying to sign the payment by hand.

```bash
npm i @x402/fetch @x402/evm viem
```

```js
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { ExactEvmScheme, toClientEvmSigner } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
import { createPublicClient, http } from "viem";
import { base } from "viem/chains";

const account = privateKeyToAccount(process.env.X402_PRIVATE_KEY);
const signer = toClientEvmSigner(
  account,
  createPublicClient({ chain: base, transport: http("https://mainnet.base.org") }),
);
const client = new x402Client().register("eip155:8453", new ExactEvmScheme(signer));
const paidFetch = wrapFetchWithPayment(fetch, client);

const res = await paidFetch("https://x402.agentutility.ai/cve", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ "cve_id": "CVE-2021-44228" }),
});
console.log(await res.json());
```

## MCP alternative

`npx -y @agentutility/mcp-prooflayer` runs a stdio MCP server for that cluster instead of a raw fetch call. Full package list at [mcp.agentutility.ai](https://mcp.agentutility.ai).

## Errors

A bare `402` response with a `{}` body is normal, not a bug. The payment requirements are base64-encoded in the `payment-required` response header, not the JSON body.
A `402` that keeps coming back after you've paid usually means the wallet's USDC balance ran out. Check the balance before assuming the request is broken.
A `4xx` after settlement means the input was bad, not the payment. Check the schema in registry.json before retrying with a different guess.

## Example endpoints

| endpoint | price | what it does |
|---|---|---|
| `cve` | $0.005 | Full NIST NVD record for a CVE ID: CVSS scores, severity, affected products, and exploit signals. |
| `hyperliquid-market` | $0.001 | Active Hyperliquid perps markets with mark price, leverage limits, and margin tiers. |
| `exchange-rates` | $0.002 | Latest or historical FX rates across 30+ currency pairs from the European Central Bank. |
| `ad-creative-image-generate` | $0.01 | Ad creative images and campaign thumbnails generated from a text prompt. |

## Links

- [https://agentutility.ai](https://agentutility.ai): site
- [https://agentutility.ai/start](https://agentutility.ai/start): human quickstart
- [https://agentutility.ai/registry.json](https://agentutility.ai/registry.json): full catalog
- [bazaar.x402.org](https://bazaar.x402.org): official x402 directory
