Convert HTML to image.
POST/image/html
Convert HTML to image.
Request
Header Parameters
- application/json
Bodyrequired
The image URL
The HTML source. Can be specified instead of url
.
options object
The output image format. Default is png
.
Possible values: [png
, jpg
, jpeg
, webp
]
png
The screenshot quality between 0 and 100. Does not apply to PNG. Default is 80.
Possible values: >= 0
and <= 100
80
Whether to take a screenshot of the full page. Default is false
.
true
Whether to use the default background. Default is true
.
The name of the device that should be emulated. By default, no device is emulated.
The width of the screenshot in pixels. Default is 1920.
1920
The height of the screenshot in pixels. Default is 1080.
1080
The device-specific scale factor. Default is 1.
1
Whether to use dark mode. Default is false
.
clip object
The region the screenshot should capture.
Whether the result image should be returned as a URL. Default is false
.
The file name of the result image. Default is a random ID.
Responses
- 200
- 400
Success
- application/json
- application/octet-stream
- Schema
- Example (auto)
Schema
The result image URL.
{
"url": "string"
}
- Schema
Schema
Bad Request
- application/json
- Schema
- Example (auto)
Schema
{
"status": 0,
"errorMessage": "string"
}