Pay with x402
x402 is an open HTTP-native payment protocol. A client requests a resource, the server returns 402 Payment Required with machine-readable terms, the client signs a stablecoin payment (typically USDC) and retries, and the server verifies settlement and returns the resource. There are no accounts, API keys, or checkout forms. That is why it is the default rail for agents that must buy services mid-task.
The fastest way to get up and running is to fund a Base wallet, wrap fetch with the official client SDK, and call this API’s URL Metadata Fetcher. The SDK intercepts the 402, signs the payload, retries, and returns a normal 200.
Use Base (eip155:8453) and native USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913). The qocgpiywhm Agent Utilities API uses live mainnet. Your client only needs a signer and USDC.
Fund Base USDC from Coinbase or Circle. Set a hard spend cap before the first live call. Validate Email charges the quoted amount. The five URL tools can settle a lower amount when some items return an error.
Setup
Base URL:
https://fz6tm056j6.execute-api.us-east-2.amazonaws.com/prodExport:
export ORIGIN='https://fz6tm056j6.execute-api.us-east-2.amazonaws.com/prod'export EVM_PRIVATE_KEY='0xYOUR_PRIVATE_KEY' # never commit thisMinimal buyer client
Install with:
npm install @x402/fetch @x402/evm @x402/core viemCall URL Metadata Fetcher with the official x402 client:
import { wrapFetchWithPayment } from "@x402/fetch";import { x402Client } from "@x402/core/client";import { ExactEvmScheme } from "@x402/evm/exact/client";import { privateKeyToAccount } from "viem/accounts";const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);const client = new x402Client();client.register("eip155:*", new ExactEvmScheme(signer));const origin = process.env.ORIGIN as string;const paidFetch = wrapFetchWithPayment(fetch, client); // pays the 402 and retriesconst res = await paidFetch(`${origin}/api/v1/tools/get_url_metadata`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ items: [ // Up to 200 URLs per request { url: "https://www.python.org/" }, { url: "https://www.nasa.gov/" }, { url: "https://www.ietf.org/" }, ], include_content: false, // metadata only; no page body }),});console.log(await res.json());URL Metadata Fetcher returns the title, description, and favicon:
{ "results": [ { "data": { "title": "Welcome to Python.org", "description": "The official home of the Python Programming Language", "favicon": "https://www.python.org/static/favicon.ico", "og": { "type": "website", "site_name": "Python.org", "title": "Welcome to Python.org", "description": "The official home of the Python Programming Language", "image": "https://www.python.org/static/opengraph-icon-200x200.png", "image:secure_url": "https://www.python.org/static/opengraph-icon-200x200.png", "url": "https://www.python.org/" }, "twitter": null, "json_ld": [ { "@context": "https://schema.org", "@type": "WebSite", "url": "https://www.python.org/", "potentialAction": { "@type": "SearchAction", "target": "https://www.python.org/search/?q={search_term_string}", "query-input": "required name=search_term_string" } } ], "javascript_rendered": false, "main_content": null }, "meta": { "url": "https://www.python.org/", "final_url": "https://www.python.org/", "status_code": 200, "content_type": "text/html; charset=utf-8" }, "error": null, "detail": null }, { "data": { "title": "NASA", "description": "NASA.gov brings you the latest news, images and videos from America's space agency, pioneering the future in space exploration, scientific discovery and aeronautics research.", "favicon": "https://www.nasa.gov/wp-content/plugins/nasa-hds-core-setup/assets/favicons/favicon-228x228.png", "og": { "locale": "en_US", "type": "website", "title": "NASA", "description": "NASA.gov brings you the latest news, images and videos from America's space agency, pioneering the future in space exploration, scientific discovery and aeronautics research.", "url": "https://www.nasa.gov/", "site_name": "NASA", "updated_time": "2026-07-31T17:06:21-04:00", "image": "https://www.nasa.gov/wp-content/uploads/2018/07/174116main_2006_01777_highres.jpg", "image:secure_url": "https://www.nasa.gov/wp-content/uploads/2018/07/174116main_2006_01777_highres.jpg", "image:width": "1024", "image:height": "819", "image:alt": "NASA Meatball paint refresh", "image:type": "image/jpeg", "video": "https://www.youtube.com/embed/29ixFQIGZaY" }, "twitter": { "card": "summary_large_image", "title": "NASA", "description": "NASA.gov brings you the latest news, images and videos from America's space agency, pioneering the future in space exploration, scientific discovery and aeronautics research.", "image": "https://www.nasa.gov/wp-content/uploads/2018/07/174116main_2006_01777_highres.jpg" }, "json_ld": [ { "@context": "https://schema.org", "@graph": [ { "@type": "Organization", "@id": "https://www.nasa.gov/#organization", "name": "NASA" }, { "@type": "WebSite", "@id": "https://www.nasa.gov/#website", "url": "https://www.nasa.gov", "name": "NASA", "publisher": { "@id": "https://www.nasa.gov/#organization" }, "inLanguage": "en-US", "potentialAction": { "@type": "SearchAction", "target": "https://www.nasa.gov/?s={search_term_string}", "query-input": "required name=search_term_string" } }, { "@type": "ImageObject", "@id": "https://www.nasa.gov/wp-content/uploads/2016/01/meatball_hires.jpg", "url": "https://www.nasa.gov/wp-content/uploads/2016/01/meatball_hires.jpg", "width": "946", "height": "473", "caption": "NASA Meatball", "inLanguage": "en-US" }, { "@type": "WebPage", "@id": "https://www.nasa.gov/#webpage", "url": "https://www.nasa.gov/", "name": "NASA", "datePublished": "2022-12-07T13:25:23-05:00", "dateModified": "2026-07-31T17:06:21-04:00", "about": { "@id": "https://www.nasa.gov/#organization" }, "isPartOf": { "@id": "https://www.nasa.gov/#website" }, "primaryImageOfPage": { "@id": "https://www.nasa.gov/wp-content/uploads/2016/01/meatball_hires.jpg" }, "inLanguage": "en-US" }, { "@type": "Person", "@id": "https://www.nasa.gov/#author", "name": "Dacia Massengill", "image": { "@type": "ImageObject", "@id": "https://www.nasa.gov/wp-content/uploads/2023/12/nasainsigniargb150px-96x96.png", "url": "https://www.nasa.gov/wp-content/uploads/2023/12/nasainsigniargb150px-96x96.png", "caption": "Dacia Massengill", "inLanguage": "en-US" }, "worksFor": { "@id": "https://www.nasa.gov/#organization" } }, { "headline": "NASA", "description": "NASA.gov brings you the latest news, images and videos from America's space agency, pioneering the future in space exploration, scientific discovery and aeronautics research.", "datePublished": "2022-12-07T13:25:23-05:00", "dateModified": "2026-07-31T17:06:21-04:00", "image": { "@id": "https://www.nasa.gov/wp-content/uploads/2016/01/meatball_hires.jpg" }, "author": { "@id": "https://www.nasa.gov/#author", "name": "Dacia Massengill" }, "@type": "Article", "name": "NASA", "@id": "https://www.nasa.gov/#schema-4458063", "isPartOf": { "@id": "https://www.nasa.gov/#webpage" }, "publisher": { "@id": "https://www.nasa.gov/#organization" }, "inLanguage": "en-US", "mainEntityOfPage": { "@id": "https://www.nasa.gov/#webpage" } }, { "@type": "VideoObject", "name": "2026 Total Solar Eclipse (Official NASA Trailer)", "description": "The Sun and Moon are coming together to put on a show for Earth, and we'll be sharing it with you.On Aug. 12, 2026, a total solar eclipse will be visible in ...", "uploadDate": "2026-07-29T08:55:03-07:00", "thumbnailUrl": "https://www.nasa.gov/wp-content/uploads/2016/01/meatball_hires.jpg", "embedUrl": "https://www.youtube.com/embed/29ixFQIGZaY", "duration": "PT0M45S", "width": "1280", "height": "720", "isFamilyFriendly": "True", "@id": "https://www.nasa.gov/#schema-7763809", "isPartOf": { "@id": "https://www.nasa.gov/#webpage" }, "publisher": { "@id": "https://www.nasa.gov/#organization" }, "inLanguage": "en-US" } ] } ], "javascript_rendered": false, "main_content": null }, "meta": { "url": "https://www.nasa.gov/", "final_url": "https://www.nasa.gov/", "status_code": 200, "content_type": "text/html; charset=UTF-8" }, "error": null, "detail": null }, { "data": { "title": "IETF | Internet Engineering Task Force", "description": "The Internet Engineering Task Force (IETF) is the premier Internet standards body, developing open standards through open processes.", "favicon": "https://www.ietf.org/favicon.ico", "og": { "type": "website", "url": "/", "title": "Home", "image": "/media/images/ietf-logo-500-square-250x250.original.jpg", "description": "Read more about the Internet Engineering Task Force (IETF), the premier standards development organization (SDO) for the Internet.", "site_name": "IETF" }, "twitter": { "card": "summary", "title": "Home", "description": "Read more about the Internet Engineering Task Force (IETF), the premier standards development organization (SDO) for the Internet.", "image": "/media/images/ietf-logo-500-square-250x250.original.jpg" }, "json_ld": null, "javascript_rendered": false, "main_content": null }, "meta": { "url": "https://www.ietf.org/", "final_url": "https://www.ietf.org/", "status_code": 200, "content_type": "text/html; charset=utf-8" }, "error": null, "detail": null } ]}Discovery
Agents can query this URL without an API key to get a list of tools. Call any of them using the same client.
$ORIGIN/.well-known/x402For more details visit x402.org.