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]
pngThe screenshot quality between 0 and 100. Does not apply to PNG. Default is 80.
Possible values: >= 0 and <= 100
80Whether to take a screenshot of the full page. Default is false.
trueWhether 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.
1920The height of the screenshot in pixels. Default is 1080.
1080The device-specific scale factor. Default is 1.
1Whether 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"
}