Switchboard Canvas

sizes

The sizes array determines the resolution of one or more images to be created in the request.

Specify an object consisting of width and height properties, and optionally a filename property if you wish to specify the resulting image's filename for the resolution.

Not specifying a filename will result in a random identifier being used.

{
    "template": "sample-image",
    "sizes": [
        {
            "width": 1080,
            "height": 1080,
            "filename": "my-image.png"
        }
    ]
}

You can also include modifiers in the filename specifier to aid in filename generation:

ModifierResult
%wwill be replaced with the width
%hwill be replaced with the height
%dwill be replaced with the date
%twill be replaced with the time
{
    "template": "sample-image",
    "sizes": [
        {
            "width": 1080,
            "height": 800,
            "filename": "output-%wx%h.png"
        }
    ]
}

# output-1080x800.png

We care about the protection of your data. Read our Privacy Policy.

© 2022 switchboard.ai. All rights reserved.
Privacy Terms Cookies