Render image
POST/render
Render image
Request
Query Parameters
- application/json
Body
required
Default value: 1
Modifies the pixel density of the screenshot. By default, it is set to 2, mirroring the quality of a 4K monitor. The minimum value allowed is 1, while the maximum is 3.
Possible values: [blackberry_playbook, blackberry_playbook_landscape, blackberry_z30, blackberry_z30_landscape, galaxy_note_3, galaxy_note_3_landscape, galaxy_note_ii, galaxy_note_ii_landscape, galaxy_s_iii, galaxy_s_iii_landscape, galaxy_s5, galaxy_s5_landscape, galaxy_s8, galaxy_s8_landscape, galaxy_s9+, galaxy_s9+_landscape, galaxy_tab_s4, galaxy_tab_s4_landscape, ipad, ipad_landscape, ipad_(gen_6), ipad_(gen_6)_landscape, ipad_(gen_7), ipad_(gen_7)_landscape, ipad_mini, ipad_mini_landscape, ipad_pro, ipad_pro_landscape, ipad_pro_11, ipad_pro_11_landscape, iphone_4, iphone_4_landscape, iphone_5, iphone_5_landscape, iphone_6, iphone_6_landscape, iphone_6_plus, iphone_6_plus_landscape, iphone_7, iphone_7_landscape, iphone_7_plus, iphone_7_plus_landscape, iphone_8, iphone_8_landscape, iphone_8_plus, iphone_8_plus_landscape, iphone_se, iphone_se_landscape, iphone_x, iphone_x_landscape, iphone_xr, iphone_xr_landscape, iphone_11, iphone_11_landscape, iphone_11_pro, iphone_11_pro_landscape, iphone_11_pro_max, iphone_11_pro_max_landscape, iphone_12, iphone_12_landscape, iphone_12_pro, iphone_12_pro_landscape, iphone_12_pro_max, iphone_12_pro_max_landscape, iphone_12_mini, iphone_12_mini_landscape, iphone_13, iphone_13_landscape, iphone_13_pro, iphone_13_pro_landscape, iphone_13_pro_max, iphone_13_pro_max_landscape, iphone_13_mini, iphone_13_mini_landscape, jiophone_2, jiophone_2_landscape, kindle_fire_hdx, kindle_fire_hdx_landscape, lg_optimus_l70, lg_optimus_l70_landscape, microsoft_lumia_550, microsoft_lumia_950, microsoft_lumia_950_landscape, nexus_10, nexus_10_landscape, nexus_4, nexus_4_landscape, nexus_5, nexus_5_landscape, nexus_5x, nexus_5x_landscape, nexus_6, nexus_6_landscape, nexus_6p, nexus_6p_landscape, nexus_7, nexus_7_landscape, nokia_lumia_520, nokia_lumia_520_landscape, nokia_n9, nokia_n9_landscape, pixel_2, pixel_2_landscape, pixel_2_xl, pixel_2_xl_landscape, pixel_3, pixel_3_landscape, pixel_4, pixel_4_landscape, pixel_4a_(5g), pixel_4a_(5g)_landscape, pixel_5, pixel_5_landscape, moto_g4, moto_g4_landscape]
Emulates a given device's metrics and user agent.
Default value: 1920
This allows you to determine the width of Chrome's viewing area, which will deactivate the auto-cropping feature. If you're using either parameter, both the height and width settings need to be specified.
Default value: 1080
This allows you to specify the height of Chrome's viewing area, which in turn deactivates the auto-cropping feature. Both the height and width parameters need to be established if you choose to use either one.
Default value: false
The default value is false. Indicates whether the viewport supports touch events.
Default value: false
The default value is false. Indicates whether the viewport is in landscape mode.
Default value: false
The default value is false. Specifies whether the meta viewport tag is considered.
Advanced Option: Specify a CSS selector corresponding to an element in the HTML. The image will be cropped precisely to this designated element.
Default value: 100
Incorporates additional delay to ensure JavaScript execution is complete. This option is useful if you encounter blank images while using JavaScript. The default setting is 100, but you can begin with a 500 millisecond delay if necessary.
Default value: false
Create screenshot of a full page, otherwise screenshot is limited to default viewport.
A user agent for the request. The default value is the latest version of the browser used by Puppeteer.
Possible values: [png, jpeg, jpg, webp, gif, jp2, tiff, avif, heif]
The format of the output file
Render the image with the specified quality.
The image_width and image_height parameters enable you to create a thumbnail of the screenshot.
The image_width and image_height parameters enable you to create a thumbnail of the screenshot.
This refers to the HTML content you wish to render. You can submit either a snippet of HTML (for example,
This refers to the CSS styling for your rendered image. If used in conjunction with a URL, it will be incorporated into the webpage.
Responses
- 200
- 400
- 401
- 429
- 500
- 503
Rendered image URL.
- application/json
- Schema
- Example (from schema)
Schema
URL to generated image
{
"imageUrl": "https://api.canvasflare.com/image/8d063c49-3f15-46c1-91c7-9cf61e6758c6"
}
Bad Request. The request parameters are invalid.
- application/json
- Schema
- Example (from schema)
- commonInvalidParameter
- selectorNotFound
- networkError
Schema
Message describing error
HTTP status code
{
"message": "Not Found",
"statusCode": 404
}
One of your request parameter is invalid.
{
"statusCode": 400,
"code": "err_request_not_valid",
"message": "You will find detailed error here."
}
Unable to locate requested selector.
{
"statusCode": 400,
"code": "selector_not_found",
"message": "You will find detailed error here."
}
The API can't connect to the provided URL.
{
"statusCode": 400,
"code": "network_error",
"message": "The error occurs when the API can't connect to the provided URL, which may indicate that the site is blocking the API or is temporarily unavailable. Retry your request."
}
Unauthorized. The requested api_key query parameter is missing or invalid.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Message describing error
HTTP status code
{
"message": "Not Found",
"statusCode": 404
}
{
"statusCode": 401,
"code": "api_key_missing_or_invalid",
"message": "API key query param is missing or invalid"
}
Too many concurrent requests or reached your monthly quota.
- application/json
- Schema
- Example (from schema)
- quotaExceeded
- concurrencyLimit
Schema
Message describing error
HTTP status code
{
"message": "Not Found",
"statusCode": 404
}
You've reached the monthly API call limit
{
"statusCode": 429,
"message": "You've reached the monthly API call limit. Consider upgrading your current plan or wait for the next reset.",
"code": "quota_exceeded"
}
You have exceeded the allowed number of simultaneous requests.
{
"statusCode": 429,
"message": "You have exceeded the allowed number of simultaneous requests.",
"code": "concurrency_limit_exceeded"
}
The API failed to process your request.
- application/json
- Schema
- Example (from schema)
- internalServerError
- timeoutError
Schema
Message describing error
HTTP status code
{
"message": "Not Found",
"statusCode": 404
}
The API failed to process your request.
{
"statusCode": 500,
"code": "internal_server_error",
"message": "The API failed to process your request. You can safely retry the request. We have been notified about the issue and are working to resolve it as quickly as possible."
}
The screenshot couldn't be captured within the specified timeout period.
{
"statusCode": 500,
"code": "timeout_error",
"message": "The screenshot couldn't be captured within the specified timeout period. This may be because the site is slow to respond or rendering is taking longer than anticipated."
}
The API is temporarily unavailable.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Message describing error
HTTP status code
{
"message": "Not Found",
"statusCode": 404
}
{
"statusCode": 503,
"code": "temporary_unavailable",
"message": "The API is temporarily unavailable due to an error or overload. Please wait a moment before safely retrying your request."
}