Skip to main content

Convert HTML to image.

POST 

/image/html

Convert HTML to image.

Request

Header Parameters

    ipaas string

Bodyrequired

    urlstring

    The image URL

    htmlstring

    The HTML source. Can be specified instead of url.

    options object
    typestring

    The output image format. Default is png.

    Possible values: [png, jpg, jpeg, webp]

    Example: png
    qualitynumber

    The screenshot quality between 0 and 100. Does not apply to PNG. Default is 80.

    Possible values: >= 0 and <= 100

    Example: 80
    fullPageboolean

    Whether to take a screenshot of the full page. Default is false.

    Example: true
    defaultBackgroundboolean

    Whether to use the default background. Default is true.

    emulateDevicestring

    The name of the device that should be emulated. By default, no device is emulated.

    widthnumber

    The width of the screenshot in pixels. Default is 1920.

    Example: 1920
    heightnumber

    The height of the screenshot in pixels. Default is 1080.

    Example: 1080
    scaleFactornumber

    The device-specific scale factor. Default is 1.

    Example: 1
    darkModeboolean

    Whether to use dark mode. Default is false.

    clip object

    The region the screenshot should capture.

    xnumberrequired
    ynumberrequired
    widthnumberrequired
    heightnumberrequired
    getAsUrlboolean

    Whether the result image should be returned as a URL. Default is false.

    fileNamestring

    The file name of the result image. Default is a random ID.

Responses

Success

Schema
    urlstringrequired

    The result image URL.