Render HTML to image
POST
/render
const url = 'http://localhost:8080/render';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"baseUrl":"example","format":"example","html":"example","width":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/render \ --header 'Content-Type: application/json' \ --data '{ "baseUrl": "example", "format": "example", "html": "example", "width": 1 }'Renders HTML to a PNG or JPEG image. Returns the image binary.
Request Body required
Section titled “Request Body required ” Media type application/json
object
baseUrl
string
format
string
html
required
string
width
integer
Example generated
{ "baseUrl": "example", "format": "example", "html": "example", "width": 1}Responses
Section titled “ Responses ”Rendered image
string format: binary
string format: binary
Invalid request
Rendering failed