Screenshot API

Capture full-page screenshots of any public URL. Returns a high-quality PNG image rendered via headless Chrome. Payment is handled automatically via x402 — no API key required.

GET https://pylon-screenshot-api.fly.dev/screenshot

Endpoint

Base URL:

https://pylon-screenshot-api.fly.dev

The screenshot endpoint accepts GET requests with the target URL as a query parameter.

Parameters

ParameterTypeRequiredDescription
urlstringYesThe URL to screenshot (must be publicly accessible)

Response

Returns a PNG image on success (200 OK with Content-Type: image/png).

On first request without payment, returns 402 Payment Required with x402 payment challenge headers.

StatusDescription
200Screenshot returned as PNG binary
402Payment required — x402 challenge returned
400Missing or invalid url parameter
500Screenshot capture failed

Pricing

$0.01 USDC per screenshot — paid via x402 on Base (Coinbase L2). No minimum. No subscription. No free tier games.

Code Examples

# Using x402 client (handles 402 flow automatically)
# Install: npm install -g x402-client

curl "https://pylon-screenshot-api.fly.dev/screenshot?url=https://example.com" \
  --output screenshot.png

# Without x402 client, first request returns 402:
# HTTP/1.1 402 Payment Required
# X-Payment-Amount: 10000
# X-Payment-Token: USDC
# X-Payment-Network: base
# X-Payment-Recipient: 0x...
import { createClient } from "x402-client";

const client = createClient({
  network: "base",
  privateKey: process.env.PRIVATE_KEY,
});

const response = await client.get(
  "https://pylon-screenshot-api.fly.dev/screenshot",
  { params: { url: "https://example.com" } }
);

// response.data is the PNG buffer
fs.writeFileSync("screenshot.png", response.data);
from x402_client import Client

client = Client(
    network="base",
    private_key=os.environ["PRIVATE_KEY"],
)

response = client.get(
    "https://pylon-screenshot-api.fly.dev/screenshot",
    params={"url": "https://example.com"},
)

# Save the screenshot
with open("screenshot.png", "wb") as f:
    f.write(response.content)

x402 Setup

To use Pylon APIs, you need an x402-compatible client with a funded wallet on Base. Here's the quick setup:

  1. Get a wallet with USDC on Base (Coinbase L2)
  2. Install an x402 client library (x402.org Status Terms Privacy for options)
  3. Configure it with your private key
  4. Make requests — the client handles the 402 payment flow automatically

The x402 client intercepts 402 responses, signs a USDC payment, and retries the request with the payment proof attached as a header. All of this happens in milliseconds.