# Stableflare Screenshot API

> Stableflare Screenshot API is a paid API for AI agents from stableflare.dev, paid per call via x402, $0.05/call, live (last probed 2026-10-09, last successful call 2026-09-17).

Agents call it through Zero, which pays per call: no API key and no wallet of your own. New accounts start with $5.

Captures a screenshot of any URL or HTML content and returns a PNG or JPEG image, with support for full-page capture, element selection, and custom viewports

## Facts

- Endpoint: POST https://stableflare.dev/api/browser/screenshot?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: healthy
- Last checked: 2026-10-09
- Last successful call: 2026-09-17
- Success rate: 98% of calls made through Zero
- Rating: 4.8 / 5 from 6 reviews
- Activations on Zero: 62
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stableflare-dev-03b71e1d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_V1XyvWKy31y3VqLl0bwEh

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 stableflare-dev-03b71e1d -d '<json body>'
```

Example prompt: Can you take a full-page screenshot of https://example.com and give me a PNG image with a 1280x800 viewport?

## When to prefer this

Use this endpoint when you need a visual image of a live or static webpage, including JavaScript-rendered content. Prefer this over HTML scrapers when the goal is visual verification, thumbnail generation, or capturing styled page layouts. Also useful for archiving visual snapshots of pages or rendering custom HTML to image.

## Known failure modes

- URL is unreachable or returns a non-200 status — screenshot may fail or return blank
- Invalid CSS selector causes element capture to fail
- Timeout if the page takes too long to load JavaScript
- Malformed HTML input causes rendering errors
- Unsupported image format requested
- Payment not accepted or insufficient USDC balance

## How this service works

Pay-per-request access to Replicate AI and Cloudflare Browser Rendering. No API keys, no subscriptions.

## Output

A PNG or JPEG binary image of the rendered webpage or HTML content, reflecting the full page or a specific element, at the specified viewport dimensions.

## Example request

```json
{
 "url": "https://example.com",
 "gotoOptions": {
  "timeout": 30000,
  "waitUntil": "domcontentloaded"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "description": "URL to render"
  },
  "html": {
   "type": "string",
   "description": "HTML content to render instead of URL"
  },
  "cookies": {
   "type": "array",
   "items": {
    "type": "object",
    "propertyNames": {
     "type": "string"
    },
    "additionalProperties": {}
   }
  },
  "selector": {
   "type": "string",
   "description": "CSS selector to screenshot a specific element"
  },
  "viewport": {
   "type": "object",
   "properties": {
    "width": {
     "type": "number"
    },
    "height": {
     "type": "number"
    },
    "deviceScaleFactor": {
     "type": "number"
    }
   },
   "additionalProperties": false
  },
  "userAgent": {
   "type": "string"
  },
  "gotoOptions": {
   "type": "object",
   "properties": {
    "timeout": {
     "type": "number"
    },
    "waitUntil": {
     "enum": [
      "load",
      "domcontentloaded",
      "networkidle0",
      "networkidle2"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "authenticate": {
   "type": "object",
   "required": [
    "username",
    "password"
   ],
   "properties": {
    "password": {
     "type": "string"
    },
    "username": {
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "waitForSelector": {
   "type": "string",
   "description": "CSS selector to wait for"
  },
  "screenshotOptions": {
   "type": "object",
   "properties": {
    "clip": {
     "type": "object",
     "required": [
      "x",
      "y",
      "width",
      "height"
     ],
     "properties": {
      "x": {
       "type": "number"
      },
      "y": {
       "type": "number"
      },
      "width": {
       "type": "number"
      },
      "height": {
       "type": "number"
      }
     },
     "additionalProperties": false
    },
    "type": {
     "enum": [
      "png",
      "jpeg"
     ],
     "type": "string"
    },
    "quality": {
     "type": "number",
     "maximum": 100,
     "minimum": 0
    },
    "fullPage": {
     "type": "boolean"
    },
    "omitBackground": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  },
  "setExtraHTTPHeaders": {
   "type": "object",
   "propertyNames": {
    "type": "string"
   },
   "additionalProperties": {
    "type": "string"
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stableflare-dev-03b71e1d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stableflare.dev](https://www.zero.xyz/host/stableflare.dev/llms.txt)
