util.beauty — metered web utilities for developers and AI agents You can call paid HTTP utilities at https://util.beauty: browser rendering (screenshot, pdf, extract, snapshot, inspect) and crypto (hash, hmac, random, password, signature, symmetric, jwt, totp, key_derivation). Prices are in credits (1 credit = $0.001). Prefer live discovery over memory. SETUP Read X402_PRIVATE_KEY (hex EVM key with USDC on Base, chain 8453; no ETH needed for gas) and/or UB_API_KEY (prepaid early-access key). If neither is set, ask the user for a funded Base USDC wallet rather than inventing a key. Default RPC: https://mainnet.base.org. DISCOVER FIRST curl -sS https://util.beauty/v1/meta curl -sS "https://util.beauty/v1/x402/quote?utility=crypto.hash" curl -sS https://util.beauty/openapi.json curl -sS https://util.beauty/endpoints.txt Never invent utility names, prices, or request shapes. /v1/meta is authoritative. PAY WITH x402 (no account) npm i @x402/fetch @x402/evm viem 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://util.beauty/v1/crypto/hash", { method: "POST", headers: { "Content-Type": "application/json", "Idempotency-Key": crypto.randomUUID(), }, body: JSON.stringify({ function: "sha256", input: "hello" }), }); console.log(res.status, await res.json()); The first request is 402; wrapFetchWithPayment signs a USDC transferWithAuthorization and retries. Settlement is gasless for the payer. Tx hash appears in X-PAYMENT-RESPONSE. If the library cannot parse the 402: unpaid POST → read error.details.accepts[0] → sign EIP-3009 using accepts[0].extra as EIP-712 domain → retry with base64 PaymentPayload in X-PAYMENT. Walkthrough: https://util.beauty/start PREPAID (if UB_API_KEY is set) Authorization: Bearer $UB_API_KEY (or X-API-Key). Always send Idempotency-Key. SELF-SERVE PREPAID POST /v1/system/register {} — pay 1 credit (x402); apiKey.secret returned once. GET /v1/credits/bundles — free catalog (starter/builder/scale/pro volume discounts). POST /v1/credits/purchase {"sku":"builder"} — x402; creates account+key if no API key, else credits existing account. SUGGESTIONS POST /v1/system/suggest — 1 credit; file utility/improvement/docs ideas for the operators. BILLING - VALIDATION_ERROR is free (body checked before payment). - After payment, charge stands even if execution fails (dead URL, etc.). - Always Idempotency-Key on paid calls (duplicate → 409, no second charge). - Browser: exactly one of url or html. Public web only (URL_BLOCKED for private nets). - Crypto: binary as base64; never logged/stored. - Artifacts under /v1/artifacts/:id — download promptly (≈7 day retention). - Prefer browser.snapshot for agent page understanding (text + links + optional screenshot + contentHash). ERRORS PAYMENT_REQUIRED → pay and retry. RATE_LIMITED → error.details.retryAfterMs. URL_BLOCKED → do not retry. IDEMPOTENCY_CONFLICT → original request already charged. LINKS https://util.beauty · https://util.beauty/start · https://util.beauty/v1/meta · https://util.beauty/openapi.json · https://util.beauty/skill.md · https://util.beauty/mcp · https://util.beauty/docs