81trust / 100

Screenshots

by DiffiCat in Documents & files

x402 APIPassing, checked 3 h ago

Captures a full-page screenshot of one public web page in Chromium and returns a link to the PNG. Use it for a one-off visual check of a page, or to keep a reference image before a change. 0.02 USD per call.

POST https://app.difficat.com/api/v1/screenshots

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
129 ms typical, 129 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://app.difficat.com/api/v1/screenshots" \
  -H "content-type: application/json" \
  -d '{"url":"https://example.com","viewportWidth":1280}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapp.difficat.com%2Fapi%2Fv1%2Fscreenshots
const res = await pay("https://app.difficat.com/api/v1/screenshots", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"url":"https://example.com","viewportWidth":1280}),
});
console.log(await res.json());

Example input

{
  "url": "https://example.com",
  "viewportWidth": 1280
}

Example output

{
  "dimensions": {
    "height": 2400,
    "width": 1280
  },
  "filename": "example-com.png",
  "jobId": "web-1a2b3c",
  "jobToken": "shown-once",
  "links": {
    "file": "/api/v1/jobs/web-1a2b3c/files/example-com.png"
  },
  "payment": {
    "amount": "0.02",
    "currency": "USD"
  },
  "url": "https://example.com"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402129 ms$0.02