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
- 1Send a request to one of the endpoints below. The server responds with
402 Payment Requiredand the payment details (amount, networks, and recipient). - 2Sign a payment authorization for the requested amount with your wallet. An x402 client library does this for you.
- 3Resend the request with the signed
X-PAYMENTheader. You receive your data with a200 OKresponse.
Available endpoints
All endpoints take a POST with a JSON body and return JSON.
| Endpoint | What it does |
|---|---|
POST /v1/scrape | Fetch a rendered page as HTML, Markdown, or readable text — optionally with a screenshot or PDF |
POST /v1/screenshot | Capture a screenshot of a page |
POST /v1/pdf | Render a page to PDF |
Request parameters
| Parameter | Type | Endpoints | Description |
|---|---|---|---|
url | string | all | URL of the page to load. Required. |
format | string[] | scrape | Output formats: html, readability, cleaned_html, markdown. Defaults to html. |
screenshot | boolean | scrape | Include a screenshot in the response. |
pdf | boolean | scrape | Include a PDF in the response. |
fullPage | boolean | screenshot | Capture the full scrollable page. |
delay | number | all | Delay before acting, in milliseconds. |
useProxy | boolean | all | Route through a Steel-provided residential proxy. |
region | string | all | Region 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
| Network | USDC Contract Address |
|---|---|
| Base (mainnet) | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| Solana (mainnet) | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
Quickstart
First, see the payment requirements by sending an unpaid request:
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
- x402 protocol – Learn more about the x402 protocol
- Steel API reference – Full reference for the scrape, screenshot, and PDF endpoints
- Steel Discord – Get help and share your implementations