Create image

Before getting started: You will need to create your API key.

Create and return a new image URL

POST https://mtmx.io/v1/image

Headers

NameTypeDescription

Authorization*

String

Bearer YOUR-API-KEY

Request Body

NameTypeDescription

html*

String

The HTML you want to render for creating an image.

content

Object

Updates values when using Handlebars templating syntax. Learn more.

type

String

Defines whether to render JPEG or PNG image. Accepted values are png and jpeg. Default value is png.

quality

Number

Defines the quality of JPG images. Not applicable to PNG images. Default value 80.

selector

String

Target a specific HTML element to perform the screenshot. Default value is body.

transparent

Boolean

Hides default white background and allows capturing screenshots with transparency. Default value is false.

{
    "success": true,
    "url": "https://cdn.mattermix.com/v1/image/62029ad452390ccfd9abcc4f-1644951564719.png"
    "id": "620bfdd2501f2b5c901e2800"
}

Last updated