x402

Pay-per-use Steel API calls with USDC on Base and Solana. No API key, no account.

The x402 integration lets you call Steel's web actions — scrape, screenshot, and PDF — and pay per request with USDC on Base or Solana. It's built on the x402 protocol, so there are no API keys or accounts: you pay for each call with your wallet.

Endpoint: https://x402.steel.dev

How it works

  1. 1Send a request to one of the endpoints below. The server responds with 402 Payment Required and the payment details (amount, networks, and recipient).
  2. 2Sign a payment authorization for the requested amount with your wallet. An x402 client library does this for you.
  3. 3Resend the request with the signed X-PAYMENT header. You receive your data with a 200 OK response.

Available endpoints

All endpoints take a POST with a JSON body and return JSON.

EndpointWhat it does
POST /v1/scrapeFetch a rendered page as HTML, Markdown, or readable text — optionally with a screenshot or PDF
POST /v1/screenshotCapture a screenshot of a page
POST /v1/pdfRender a page to PDF

Request parameters

ParameterTypeEndpointsDescription
urlstringallURL of the page to load. Required.
formatstring[]scrapeOutput formats: html, readability, cleaned_html, markdown. Defaults to html.
screenshotbooleanscrapeInclude a screenshot in the response.
pdfbooleanscrapeInclude a PDF in the response.
fullPagebooleanscreenshotCapture the full scrollable page.
delaynumberallDelay before acting, in milliseconds.
useProxybooleanallRoute through a Steel-provided residential proxy.
regionstringallRegion to run the action in.

Pricing

Each request costs $0.01 in USDC (10000 base units), charged on whichever network you pay from. There's no subscription and no per-hour billing — you pay only for the requests you make.

Requirements

  • Wallet: Base or Solana wallet with USDC

Supported tokens and networks

NetworkUSDC Contract Address
Base (mainnet)0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Solana (mainnet)EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v

Quickstart

First, see the payment requirements by sending an unpaid request:

Terminal
curl -i -X POST https://x402.steel.dev/v1/scrape \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "format": ["markdown"]}'

You'll get a 402 Payment Required describing the amount and the Base and Solana payment options.

To complete the call, use an x402 client library — it reads the 402, signs the payment, and retries automatically. For example, with x402-fetch:

import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);
const res = await fetchWithPay("https://x402.steel.dev/v1/scrape", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ url: "https://example.com", format: ["markdown"] }),
});
const data = await res.json();

FAQ

Resources