/generate/screenshot/webpage/image-fileCaptures a screenshot of the webpage at the provided URL and returns it as a streamed PNG download. The request is configured through query parameters for the target URL and optional capture settings.
Capture webpage screenshot and stream PNG download
**Method:** GET
**Apiosk URL:** https://gateway.apiosk.com/apyhub-generate-webpage-screenshot/generate/screenshot/webpage/image-file
**Request content type:** application/json
**Response content type:** image/png
What it does
Captures a screenshot of the webpage at the provided URL and returns it as a streamed PNG download. The request is configured through query parameters for the target URL and optional capture settings.
Query Parameter(s)
| Attribute | Type | Mandatory | Description |
| --------- | ------ | --------- | ----------- |
| url | String | Yes | The webpage URL to capture. Must be a valid URI. |
| delay | Integer | No | Delay before capture, in seconds. Default: 3. Minimum: 0, maximum: 10. |
| output | String | No | Output filename for the downloaded image. Default: output.png. |
| quality | Integer | No | Screenshot quality level. Default: 5. Minimum: 1, maximum: 5. |
Response
Returns a binary string representing the downloaded screenshot file as PNG content. The success response is a streamed file download, not a JSON object.
| Parameter | Type | Mandatory | Description |
| --------- | ---- | --------- | ----------- |
| binary payload | String | Yes | PNG file content returned by the endpoint. |
Quickstart
Download a screenshot of a webpage by passing the page URL as a query parameter.
bash
curl -X GET "https://gateway.apiosk.com/apyhub-generate-webpage-screenshot/generate/screenshot/webpage/image-file?url=https://apyhub.com" \
-H "PAYMENT-SIGNATURE: $PAYMENT_SIGNATURE"
What you'll get back
Returns a binary file containing the screenshot image.
Payment and authentication
Do not send an apy-token. Apiosk injects the APYHub credential server-side. The first unpaid request returns HTTP 402 Payment Required with a PAYMENT-REQUIRED header. Sign an accepted USDC payment and retry the same request with the proof in PAYMENT-SIGNATURE (or use an Apiosk/x402-aware agent client that performs this exchange automatically).
The $PAYMENT_SIGNATURE placeholder in the example is the signed proof obtained from that initial 402 response.
Source
Parameter definitions and limits were synchronized from [APYHub's official documentation](https://apyhub.com/apyhub/service/capture-webpage-screenshot) on 2026-07-18.
Pay per request through Apiosk using x402. Do not send an apy-token; the gateway injects the selected APYHub key server-side.
{
"properties": {
"delay": {
"default": 3,
"maximum": 10,
"minimum": 0,
"type": "integer"
},
"output": {
"default": "output.png",
"type": "string"
},
"quality": {
"default": 5,
"maximum": 5,
"minimum": 1,
"type": "integer"
},
"url": {
"format": "uri",
"type": "string"
}
},
"required": [
"url"
],
"type": "object"
}{
"format": "binary",
"type": "string"
}{
"properties": {
"PAYMENT-SIGNATURE": {
"description": "Signed x402 v2 payment proof. Obtain the payment requirements from the initial HTTP 402 response.",
"type": "string"
}
},
"required": [],
"type": "object"
}{
"query": {
"delay": 3,
"output": "output.png",
"quality": 5,
"url": "https://example.com"
}
}{
"content_type": "image/png",
"note": "Binary PNG bytes are returned; save the response as a .png file."
}