agentsvc.io

services / screenshot

visualoperational · 2230 ms

Screenshot API

Capture any URL as a PNG screenshot. Returns image_base64 (base64 PNG — decode to get raw bytes). Full JS rendering via Playwright, works on SPAs and dynamic content. Params: url (required), width px (default 1280), height px (default 800), full_page boolean, wait_ms.

Run free trial ↗1 free call per day with the example input. Paid: $0.005 USDC, no limit.

Call it

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agentsvc.io/api/v1/proxy/screenshot", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({"url":"https://example.com","width":1280,"height":800}),
});
const { data, payment } = await res.json();  // payment.transaction = on-chain receipt

Input

FieldTypeDescription
url *stringThe URL to capture
widthinteger = 1280Viewport width in pixels
heightinteger = 800Viewport height in pixels
full_pageboolean = falseCapture full page height
wait_msinteger = 1000Wait time after page load in ms

Output

FieldTypeDescription
image_base64stringBase64-encoded PNG image (decode to get raw bytes)
widthintegerActual image width in pixels
heightintegerActual image height in pixels
urlstringThe URL that was captured
captured_atstringISO 8601 timestamp of when screenshot was taken

Example response (data)

{
  "image_base64": "iVBORw0KGgoAAAANSUhEUgAABQAAAASwCAYAAACPT...",
  "width": 1280,
  "height": 800,
  "url": "https://example.com",
  "captured_at": "2026-04-07T12:00:00.000Z"
}