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

# Capture Parameters

> Complete reference of all capture request parameters

## Input Parameters

| Parameter | Type   | Required | Default | Description                      |
| --------- | ------ | -------- | ------- | -------------------------------- |
| `url`     | string | Yes\*    | -       | URL to capture (max 2048 chars)  |
| `html`    | string | No       | -       | HTML content to render (max 1MB) |

<Note>
  Either `url` or `html` is required, but not both.
</Note>

## Output Parameters

| Parameter      | Type    | Default | Description                                 |
| -------------- | ------- | ------- | ------------------------------------------- |
| `format`       | enum    | `png`   | Output format: `png`, `jpeg`, `webp`, `pdf` |
| `responseType` | enum    | `json`  | Response type: `json` or `file`             |
| `async`        | boolean | `false` | Process asynchronously                      |

## Viewport Parameters

| Parameter         | Type    | Default | Range    | Description               |
| ----------------- | ------- | ------- | -------- | ------------------------- |
| `viewport.width`  | integer | 1920    | 100-3840 | Viewport width in pixels  |
| `viewport.height` | integer | 1080    | 100-2160 | Viewport height in pixels |
| `isFullPage`      | boolean | `false` | -        | Capture entire page       |

## Quality Parameters

| Parameter | Type    | Default | Range | Description                    |
| --------- | ------- | ------- | ----- | ------------------------------ |
| `quality` | integer | 95      | 1-100 | Image quality (JPEG/WebP only) |

## Timing Parameters

| Parameter   | Type    | Default            | Range       | Description                  |
| ----------- | ------- | ------------------ | ----------- | ---------------------------- |
| `timeout`   | integer | 30000              | 5000-120000 | Navigation timeout in ms     |
| `waitUntil` | enum    | `domcontentloaded` | -           | When to consider page loaded |

### waitUntil Options

| Value              | Description                              |
| ------------------ | ---------------------------------------- |
| `load`             | Wait for `load` event                    |
| `domcontentloaded` | Wait for `DOMContentLoaded` event        |
| `networkidle`      | Wait until no network activity for 500ms |
| `commit`           | Wait for first network response          |

## Cache Parameters

| Parameter               | Type    | Default | Range        | Description             |
| ----------------------- | ------- | ------- | ------------ | ----------------------- |
| `responseCache.enabled` | boolean | `false` | -            | Enable response caching |
| `responseCache.ttl`     | integer | 86400   | 60-2592000   | Cache TTL in seconds    |
| `responseCache.nonce`   | string  | -       | max 32 chars | Cache-busting nonce     |

## Storage Parameters

| Parameter                     | Type    | Default | Range              | Description           |
| ----------------------------- | ------- | ------- | ------------------ | --------------------- |
| `cdnTtl`                      | integer | 86400   | 60-2592000         | CDN storage duration  |
| `persistence.enabled`         | boolean | `false` | -                  | Store permanently     |
| `persistence.refreshInterval` | integer | 0       | 0 or 21600-2592000 | Auto-refresh interval |

## Advanced Parameters

| Parameter | Type    | Default | Description         |
| --------- | ------- | ------- | ------------------- |
| `antiBot` | boolean | `false` | Use anti-bot bypass |
| `region`  | enum    | `auto`  | Capture region      |

### Region Options

| Value            | Location            |
| ---------------- | ------------------- |
| `auto`           | Automatic selection |
| `us-east`        | US East Coast       |
| `us-west`        | US West Coast       |
| `eu-west`        | Western Europe      |
| `eu-central`     | Central Europe      |
| `asia-east`      | East Asia           |
| `asia-southeast` | Southeast Asia      |

## Example Request

```json theme={null}
{
  "url": "https://example.com",
  "format": "png",
  "viewport": {
    "width": 1280,
    "height": 720
  },
  "isFullPage": true,
  "quality": 90,
  "timeout": 60000,
  "waitUntil": "networkidle",
  "responseCache": {
    "enabled": true,
    "ttl": 604800
  },
  "antiBot": true,
  "region": "us-east"
}
```
