> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scout.chowmes.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Screenshot

> Capture a full-page screenshot of a rendered URL.

`POST /v1/hosted/screenshot`, costs **3 credits** (browser-render pricing).

## Request

Fields on `ScreenshotRequest`:

| Field             | Type   | Default | Notes                                          |
| ----------------- | ------ | ------- | ---------------------------------------------- |
| `url`             | string | ,       | required                                       |
| `full_page`       | bool   | `true`  | capture full scrollable page vs. viewport only |
| `viewport_width`  | int    | `1280`  |                                                |
| `viewport_height` | int    | `800`   |                                                |
| `wait_for`        | string | `""`    | selector or delay before capture               |
| `use_js`          | bool   | `true`  | screenshots always render with a browser       |

```bash theme={null}
curl -X POST "$SCOUT_HOSTED_BASE_URL/v1/hosted/screenshot" \
  -H "Authorization: Bearer $SCOUT_HOSTED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.cnn.com/","viewport_width":1280,"viewport_height":800}'
```

## Response

`ScreenshotResponse`, wrapped in hosted usage metadata:

```json theme={null}
{
  "success": true,
  "hosted": {
    "tenant_id": "tn_..",
    "key_id": "key_..",
    "credits_charged": 3,
    "credit_type": "standard"
  },
  "screenshot": {
    "success": true,
    "url": "https://www.cnn.com/",
    "screenshot_base64": "iVBORw0KGgoAAAANSUhEUgAA..",
    "width": 1280,
    "height": 800,
    "duration_ms": 2130
  }
}
```

`screenshot_base64` is a base64-encoded PNG. Decode it client-side to render or save the image.
