# switch402 Viewport Screenshot

> switch402 Viewport Screenshot is a paid API for AI agents from api.switch402.com, paid per call via x402, $0.008/call, status unknown (last checked 2026-10-31).

Captures the visible viewport (1280x800) of a public web page as a JavaScript-rendered base64-encoded PNG image.

## Facts

- Endpoint: GET https://api.switch402.com/v1/screenshot?utm_source=zero.xyz
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/switch402-viewport-screenshot-5523af6d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oo7LTteHsjbapuzIm3N-A

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability switch402-viewport-screenshot-5523af6d
```

Example prompt: Can you take a screenshot of https://example.com and show me what it looks like right now — just the visible part of the page, rendered with JavaScript?

## When to prefer this

Choose this endpoint when you need just the above-the-fold visible viewport (1280x800) of a page, not the full scrollable content. It is ideal for generating thumbnail previews, quick visual checks, or capturing the initial user-facing state of a page. Use the full-page screenshot sibling endpoint if you need the entire scrollable page. Prefer this over scrape endpoints when visual fidelity (layout, images, styling) matters rather than extractable text or structured data.

## Known failure modes

- URL is not publicly accessible or requires authentication — returns error
- Page fails to render JavaScript correctly within timeout
- URL is malformed or exceeds 2048 character limit — validation error
- Private/localhost URLs rejected — must be a public http(s) address
- Network timeout if the target page is slow to load

## How this service works

switch402 screenshot: the visible part of a public page (1280x800 viewport, JavaScript rendered) as a base64 PNG. Charged only on success.

## Output

A base64-encoded PNG image of the 1280x800 visible viewport of the requested public web page, captured after JavaScript rendering. Only charged on success.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "maxLength": 2048,
       "description": "Public http(s) page to capture"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/switch402-viewport-screenshot-5523af6d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.switch402.com](https://www.zero.xyz/host/api.switch402.com/llms.txt)
